Skip to content

pycensus.census.countries.germany.ba.loader

Loader for BA (Bundesagentur fuer Arbeit) jobs-by-workplace data.

Technical aspects

Germany's real, independent LODES-WAC equivalent: the Bundesagentur fuer Arbeit's "Arbeitsmarkt kommunal" (AMK) annual municipal report, built from mandatory social-security registrations (like US LEHD LODES is built from unemployment-insurance wage records) rather than from Destatis/GENESIS census-style data. No API key/account is needed -- files are public, keyless downloads, unlike :mod:..destatis.

Real, keyless, versioned bulk download (verified live 2026-08-23): https://statistik.arbeitsagentur.de/Statistikdaten/Detail/{period}/ arbeitsmarkt-kommunal/amk/amk-{ags5}-0-{period}-zip.zip -- one ZIP per Kreis (5-digit AGS). Its contents are Gemeinde-level, not Kreis-level -- for a multi-Gemeinde Kreis (e.g. AGS 10042, Landkreis Merzig-Wadern), the real ZIP contains one real .xlsx workbook per Gemeinde (verified live: 7 files, Arbeitsmarkt-kommunal_10042111_Beckingen.xlsx etc., each with its own real "Sozialversicherungspflichtig Beschaeftigte am Arbeitsort" / "Insgesamt" row -- Beckingen 2025: 1,883). A single-Gemeinde Kreis (Germany's city-states -- Hamburg AGS 02000, Berlin, Bremen) has exactly one file, whose own AGS already equals the Kreis AGS. This means AMK's real granularity is Gemeinde (municipality), genuinely finer than initially assumed and finer than Destatis' GENESIS-Online district-only population table (see ..destatis) -- the real LODES-WAC equivalent at the finest level this project's other Germany sources reach.

Municipality GEOID needs no crosswalk: each workbook's embedded 8-digit AGS is GISCO's LAU_ID (verified for Germany in :mod:..geography's module docstring), so it's used directly as GEOID against the same real GISCO LAU boundaries already wired up there. District-level totals are a real spatial aggregation (each real municipality centroid point-in-polygon'd against real GISCO NUTS3 boundaries, then summed) rather than a second name-matching crosswalk -- simpler and no less real than :mod:..destatis.crosswalk's approach, since both municipality and district geometries here come from the same GISCO source.

No live, queryable API was found for this product (BA's "Datenbank Beschaeftigung" interactive tool covers only nation/state/Kreis aggregate indicators, not a discoverable JSON backend for this specific per-Gemeinde workbook product) -- this is a real, stable, versioned bulk-download source, the same "not a live API but still legitimately wired in" pattern as Chile's CASEN bulk files.

Not yet wired: "am Wohnort" (residence, the LODES-RAC equivalent) and "Arbeitslose" (unemployment) rows, both present in the same real downloaded workbook -- left out because only workplace jobs are needed for this project's transit-access study; add a second schema feature + a second row-lookup in :func:_parse_amk_workbook if either is wanted later.

Source

https://statistik.arbeitsagentur.de/DE/Navigation/Statistiken/Statistiken-nach-Regionen/Statistiken-nach-Regionen-Nav.html ("Arbeitsmarkt kommunal - Gemeindeverbaende und Gemeinden (Jahreszahlen)")

kreis_ags_in_state(state, data_dir=None)

Return every real 5-digit Kreis AGS code within state.

Derived from the real GISCO LAU municipality boundaries already wired up in :mod:..geography -- every German Gemeinde's 8-digit AGS (GEOID) starts with its containing Kreis's 5-digit AGS, so no separate keyless Kreis list is needed.

Parameters:

Name Type Description Default
state str

State name, abbreviation or code.

required
data_dir Optional[str]

Folder of the raw downloads; None = the pycensus cache.

None

Returns:

Type Description
List[str]

Sorted Kreis codes.

load(aoi=None, regions=None, level='municipality', year='latest', cache_dir=None, cache=True, data_dir=None)

Load real BA (Bundesagentur fuer Arbeit) jobs-by-workplace data.

Parameters:

Name Type Description Default
aoi

Area of interest. Used to auto-detect regions (German states) if not given, and to clip the final result.

None
regions

German state name(s)/abbreviation(s)/code(s). Derived from aoi if omitted (aoi is then required).

None
level str

Standard geometry level. "municipality" (Gemeinde, AMK's real native granularity) or "district" (Kreis, a real spatial aggregation of it) -- see :data:IMPLEMENTED_LEVELS.

'municipality'
year

Vintage year present in the AMK workbook's year columns, or "latest" (the workbook's own most recent year, currently 2025 -- see :data:LATEST_AMK_PERIOD).

'latest'
cache_dir

Root of pyCensus' parquet cache.

None
cache bool

If False, bypass the cache entirely.

True
data_dir Optional[str]

Root directory for the raw AMK zip download cache (separate from the parquet cache, like every other country module's raw/ cache).

None

Returns:

Type Description
GeoDataFrame

GeoDataFrame with GEOID, geometry, and ba_jobsTotal.