Glossary
Regionalatlas terms and fields, as the CLI surfaces them.
| Term | In the CLI | What it is |
|---|---|---|
| Regionalatlas Deutschland | — | The regional-statistics map/indicator collection of the Statistische Ämter des Bundes und der Länder. |
| Regionaldatenbank Deutschland | data source | The underlying regional-statistics database (GENESIS, regionalstatistik.de) the indicators draw on. |
| Themenbereich (theme) | themes |
A subject area, e.g. Bevölkerung, Wahlen, Umwelt. There are 21. |
| Indikator (indicator) | indicators, query <code> |
A single measurable variable, identified by a code (e.g. AI002-1-5). There are 71 (on 2026-09-26; the catalogue changes). |
| code | AI002-1-5 |
The catalogue identifier for an indicator (accepted case-insensitively, hyphen or underscore). |
| table code | ai002_1_5 |
The SQL table name derived from the code: code.toLowerCase().replace(/-/g,"_"). Also accepted by query. |
| typ / geo level | --level |
The geographic aggregation level. land=1 (Bundesländer, 16), regierungsbezirk/rb=2 (38 rows in recent years), kreis/landkreis=3 (400 rows in recent years), gemeinde=5 (~11 000 rows). Row counts follow the boundaries of the reporting year: for 2000, rb has 40 rows and kreis 440, among them two Kreise named Hannover (03201, 03253) from before the Region Hannover. Every level covers all of Germany — see level fill-in. Not every indicator is published at every level (AIGG-01 only per Land, AI005 not per Gemeinde): the catalogue’s geom_levels say which levels have figures in a year, and query refuses another level (exit 2, naming the published ones) instead of returning a row per region with every value null. |
| level fill-in | ags length |
Where a finer unit does not exist, a level fills in with the next coarser one, so each level is a complete, non-overlapping cover of Germany and ags length varies within it. regierungsbezirk returns 38 rows for recent years: the 29 actual Regierungsbezirke (3-digit AGS) plus the 9 Bundesländer that have none (2-digit: Schleswig-Holstein, Hamburg, Bremen, Saarland, Berlin, Brandenburg, Mecklenburg-Vorpommern, Sachsen-Anhalt, Thüringen). kreis and gemeinde carry Berlin (11) and Hamburg (02) at 2 digits; gemeinde also carries 104 kreisfreie Städte at their 5-digit Kreis key. So “the 38 Regierungsbezirke” is wrong, but summing or mapping a level is safe. |
| AGS (Amtlicher Gemeindeschlüssel) | ags |
The official regional key of a Land/Kreis/Gemeinde (a string, e.g. 03 for Niedersachsen, 03361 for a Kreis). Leading zeros matter — --region ignores them for numeric matches. A filled-in row keeps its short key, so --region also takes the zero-padded official key: 09162000 (München’s 8-digit Gemeindeschlüssel) matches the 09162 row at gemeinde, 11000 Berlin’s 11 row at kreis, with a note saying so. |
| Gebietsname | name |
The region name (gen in the data), e.g. Niedersachsen, Bremen. |
| jahr / year | --year, year |
The reporting year (a 4-digit integer, 1000–9999; a padded value, a leading zero or a fraction is refused by --year and the library alike). Each indicator offers a specific set of years, often with gaps; indicators lists them all in years (e.g. only the election years for AI005) and the levels with figures per year in levels. Leaving out --year uses the newest catalogue year, which the data host may not have loaded yet: query then returns [] and notes it on stderr. |
| value field | values |
An indicator value column (e.g. ai0201) — a number or null. --fields keeps only named ones (case-insensitive, - and _ alike). indicators lists every column of an indicator with its title and unit, under the key it has in values — the Zensus 2011 indicators’ catalogue writes AI-Z01, the data host ai_z01, and the CLI uses ai_z01 for both. |
Veränderungsrate (v field) |
values |
A <field>v column (e.g. ai0201v) is the year-on-year rate of change of the matching value field — a published value in its own right, not a precision flag. Its unit is percent, or percentage points for a share indicator (ai0208v); indicators gives the unit per column. |
| Sonderwert (special-value code) | missing |
A number above 2,000,000,000 that stands for a table symbol, not a figure: 2222222222 nichts vorhanden (-), 5555555555 Wert geheim zu halten (.), 6666666666 Aussage nicht sinnvoll (x), 7777777777 Wert nicht sicher genug (/), 8888888888 Angabe fällt später an (...) — the codes and labels of the Regionalatlas web app. The CLI prints 2222222222 (nichts vorhanden, the - that means exactly zero) as 0 and every other code as null, and names the code’s meaning in the row’s missing object either way ("values": {"ai0507": 0}, "missing": {"ai0507": "nichts vorhanden"}, the AfD share in 1998). The upstream also writes 2222222222 for a Veränderungsrate without a previous year (ai0201v in 2000), where 0 is no real rate — missing tells the cases apart. |
| gen2 / ags2 / jahr2 | (internal) | The joined side of the SQL LEFT OUTER JOIN. gen2 is leading-space padded in the raw data — the client trims it; the parsed row uses gen/ags/jahr. |
| dynamicLayer / queryTable | (internal) | The ArcGIS mechanism that runs the raw SQL join behind query. |
--base-url / --catalog-url |
options | The ArcGIS data host / the indicator catalogue URL (the two upstream hosts). |
| Log record | stderr, --log-format |
Every diagnostic line the CLI writes to stderr: a timestamp, a level (ERROR, WARN, INFO) and a topic regionalatlas.<area>, as text (log4j style) or with --log-format jsonl as one JSON object per line. The areas: cli (usage errors, commander’s messages, unexpected errors), api (the hosts’ answers and the notes on them: an error status, the ArcGIS error envelope, a malformed answer — bad JSON, the wrong shape, an empty body, a catalogue the CLI refuses — and the notes on an empty, cut-off or ambiguous result), http (the connection, the size-cap hints, the cleartext warning, and one WARN per retry before it waits) and output (a failed write to stdout). A record is always one line; control characters in it are escaped. |
Reading the data
queryreturns one row per region at the chosen--level:{ ags, name, typ, level, year, values }.- A
nullvalue means the indicator has no figure for that region/year. When the upstream sent a special-value code instead, the row’smissingobject names the reason (Wert geheim zu halten,Aussage nicht sinnvoll, …); a row without such codes has nomissingkey. - A
0withmissing: "nichts vorhanden"is the table symbol-: nothing there, exactly zero. It counts in a sum, an average or a ranking like any other 0 (it used to benull, since 0.5.0 it is0). - It joins geography to statistics — every region present at the level appears; a
region with no indicator row still appears (its
valuesarenull), thanks to theLEFT OUTER JOIN. - The indicator catalogue is the allowlist — only catalogued codes/tables can be
queried; use
indicatorsto discover them.