Commands

Every command, argument and option of regstat 0.0.5, read from the CLI itself.

Global options

These options work with every command.

OptionDescriptionDefault
-V, --version output the version number
--base-url <url> API base URL https://www.regionalstatistik.de
--token <token> GENESIS API token (env: REGIONALSTATISTIK_API_TOKEN)
--username <user> GENESIS account username (env: REGIONALSTATISTIK_USERNAME)
--password <pass> GENESIS account password (env: REGIONALSTATISTIK_PASSWORD)
--language <lang> response language Choices: de, en de
--pagelength <n> max list results for find/catalogue (1..25000; ignored by data/metadata)
--timeout <ms> time limit per request in ms, whole response included (0 = no timeout)
--user-agent <ua> User-Agent header value
--max-retries <n> retries for transient 429/503 responses (0..10)
--max-response-bytes <n> cap response body size in bytes (0 = unlimited; default 100 MiB)
--compact print JSON on a single line instead of pretty-printed
-o, --output <file> write output (JSON, or a download) to this file
--force overwrite the --output file if it already exists

regstat hello

Connectivity check (helloworld/whoami) — needs no credentials

regstat hello [options]

regstat logincheck

Validate your credentials (helloworld/logincheck)

regstat logincheck [options]

regstat find

Full-text search across statistics, tables, cubes, variables and time series (e.g. `regstat find "bevölkerung kreise" --category tables`)

regstat find [options] <term>

Arguments

<term> required
search term (must be non-empty)

Options

OptionDescriptionDefault
--category <cat> restrict to an object type Choices: all, tables, statistics, cubes, variables, time-series all

regstat catalogue

Browse the catalogue: list objects by code selection (e.g. `12411*`)

regstat catalogue tables

List tables (Tabellen)

regstat catalogue tables [options] [selection]

Arguments

[selection] optional

Options

OptionDescriptionDefault
--area <area> data area (default server-side; try `all`)
--search-criterion <c> field `selection` matches Choices: Code, Content
--sort-criterion <c> result sort order Choices: Code, Content
--type <type> object subtype filter

regstat catalogue statistics

List statistics (Statistiken)

regstat catalogue statistics [options] [selection]

Arguments

[selection] optional

Options

OptionDescriptionDefault
--area <area> data area (default server-side; try `all`)
--search-criterion <c> field `selection` matches Choices: Code, Content
--sort-criterion <c> result sort order Choices: Code, Content
--type <type> object subtype filter

regstat catalogue cubes

List data cubes (Datenquader)

regstat catalogue cubes [options] [selection]

Arguments

[selection] optional

Options

OptionDescriptionDefault
--area <area> data area (default server-side; try `all`)
--search-criterion <c> field `selection` matches Choices: Code, Content
--sort-criterion <c> result sort order Choices: Code, Content
--type <type> object subtype filter

regstat catalogue timeseries

List time series (Zeitreihen)

regstat catalogue timeseries [options] [selection]

Arguments

[selection] optional

Options

OptionDescriptionDefault
--area <area> data area (default server-side; try `all`)
--search-criterion <c> field `selection` matches Choices: Code, Content
--sort-criterion <c> result sort order Choices: Code, Content
--type <type> object subtype filter

regstat catalogue variables

List variables (Merkmale)

regstat catalogue variables [options] [selection]

Arguments

[selection] optional

Options

OptionDescriptionDefault
--area <area> data area (default server-side; try `all`)
--search-criterion <c> field `selection` matches Choices: Code, Content
--sort-criterion <c> result sort order Choices: Code, Content
--type <type> object subtype filter

regstat catalogue values

List variable values (Ausprägungen)

regstat catalogue values [options] [selection]

Arguments

[selection] optional

Options

OptionDescriptionDefault
--area <area> data area (default server-side; try `all`)
--search-criterion <c> field `selection` matches Choices: Code, Content
--sort-criterion <c> result sort order Choices: Code, Content
--type <type> object subtype filter

regstat catalogue terms

List search terms (Begriffe)

regstat catalogue terms [options] [selection]

Arguments

[selection] optional

Options

OptionDescriptionDefault
--area <area> data area (default server-side; try `all`)
--search-criterion <c> field `selection` matches Choices: Code, Content
--sort-criterion <c> result sort order Choices: Code, Content
--type <type> object subtype filter

regstat catalogue jobs

List background jobs (Aufträge)

regstat catalogue jobs [options] [selection]

Arguments

[selection] optional

Options

OptionDescriptionDefault
--area <area> data area (default server-side; try `all`)
--search-criterion <c> field `selection` matches Choices: Code, Content
--sort-criterion <c> result sort order Choices: Code, Content
--type <type> object subtype filter

regstat catalogue modified

List recently modified objects

regstat catalogue modified [options] [selection]

Arguments

[selection] optional

Options

OptionDescriptionDefault
--area <area> data area (default server-side; try `all`)
--search-criterion <c> field `selection` matches Choices: Code, Content
--sort-criterion <c> result sort order Choices: Code, Content
--type <type> object subtype filter

regstat catalogue results

List saved result tables (Ergebnistabellen)

regstat catalogue results [options] [selection]

Arguments

[selection] optional

Options

OptionDescriptionDefault
--area <area> data area (default server-side; try `all`)
--search-criterion <c> field `selection` matches Choices: Code, Content
--sort-criterion <c> result sort order Choices: Code, Content
--type <type> object subtype filter

regstat catalogue qualitysigns

List quality-sign symbols

regstat catalogue qualitysigns [options] [selection]

Arguments

[selection] optional

Options

OptionDescriptionDefault
--area <area> data area (default server-side; try `all`)
--search-criterion <c> field `selection` matches Choices: Code, Content
--sort-criterion <c> result sort order Choices: Code, Content
--type <type> object subtype filter

regstat metadata

Describe an object's structure (metadata) by its code

regstat metadata table

Describe a table (e.g. 12411-01-01-4)

regstat metadata table [options] <name>

Arguments

<name> required
object code (must be non-empty)

Options

OptionDescriptionDefault
--area <area> data area

regstat metadata statistic

Describe a statistic (e.g. 12411)

regstat metadata statistic [options] <name>

Arguments

<name> required
object code (must be non-empty)

Options

OptionDescriptionDefault
--area <area> data area

regstat metadata cube

Describe a data cube

regstat metadata cube [options] <name>

Arguments

<name> required
object code (must be non-empty)

Options

OptionDescriptionDefault
--area <area> data area

regstat metadata timeseries

Describe a time series

regstat metadata timeseries [options] <name>

Arguments

<name> required
object code (must be non-empty)

Options

OptionDescriptionDefault
--area <area> data area

regstat metadata variable

Describe a variable (e.g. KREISE)

regstat metadata variable [options] <name>

Arguments

<name> required
object code (must be non-empty)

Options

OptionDescriptionDefault
--area <area> data area

regstat metadata value

Describe a variable value

regstat metadata value [options] <name>

Arguments

<name> required
object code (must be non-empty)

Options

OptionDescriptionDefault
--area <area> data area

regstat data

Retrieve statistical data (tables, cubes, time series, results)

regstat data table

Fetch a table's data (data/table) — CSV in Object.Content

regstat data table [options] <name>

Arguments

<name> required
object code (must be non-empty)

Options

OptionDescriptionDefault
--area <area> data area
--start-year <year> earliest year (YYYY)
--end-year <year> latest year (YYYY)
--timeslices <n> number of time slices from the end
--region-var <code> regional level variable (e.g. KREISE, GEMEIN)
--region-key <key> regional key: AGS/ARS code(s), `*` wildcard ok (e.g. `08*`, `08221`)
--contents <labels> restrict to these value labels (comma-separated)
--stand <date> only data newer than this date (DD.MM.YYYY)
--structure include the dimension structure tree
--transpose transpose rows and columns
--compress compress repeated labels
--class-var1 <code> classifying variable 1 code
--class-key1 <key> classifying key 1 (value selection)
--class-var2 <code> classifying variable 2 code
--class-key2 <key> classifying key 2 (value selection)
--class-var3 <code> classifying variable 3 code
--class-key3 <key> classifying key 3 (value selection)
--class-var4 <code> classifying variable 4 code
--class-key4 <key> classifying key 4 (value selection)
--class-var5 <code> classifying variable 5 code
--class-key5 <key> classifying key 5 (value selection)

regstat data cube

Fetch a data cube (data/cube)

regstat data cube [options] <name>

Arguments

<name> required
object code (must be non-empty)

Options

OptionDescriptionDefault
--area <area> data area
--start-year <year> earliest year (YYYY)
--end-year <year> latest year (YYYY)
--timeslices <n> number of time slices from the end
--region-var <code> regional level variable (e.g. KREISE, GEMEIN)
--region-key <key> regional key: AGS/ARS code(s), `*` wildcard ok (e.g. `08*`, `08221`)
--contents <labels> restrict to these value labels (comma-separated)
--stand <date> only data newer than this date (DD.MM.YYYY)
--structure include the dimension structure tree
--transpose transpose rows and columns
--compress compress repeated labels
--class-var1 <code> classifying variable 1 code
--class-key1 <key> classifying key 1 (value selection)
--class-var2 <code> classifying variable 2 code
--class-key2 <key> classifying key 2 (value selection)
--class-var3 <code> classifying variable 3 code
--class-key3 <key> classifying key 3 (value selection)
--class-var4 <code> classifying variable 4 code
--class-key4 <key> classifying key 4 (value selection)
--class-var5 <code> classifying variable 5 code
--class-key5 <key> classifying key 5 (value selection)

regstat data timeseries

Fetch a time series (data/timeseries)

regstat data timeseries [options] <name>

Arguments

<name> required
object code (must be non-empty)

Options

OptionDescriptionDefault
--area <area> data area
--start-year <year> earliest year (YYYY)
--end-year <year> latest year (YYYY)
--timeslices <n> number of time slices from the end
--region-var <code> regional level variable (e.g. KREISE, GEMEIN)
--region-key <key> regional key: AGS/ARS code(s), `*` wildcard ok (e.g. `08*`, `08221`)
--contents <labels> restrict to these value labels (comma-separated)
--stand <date> only data newer than this date (DD.MM.YYYY)
--structure include the dimension structure tree
--transpose transpose rows and columns
--compress compress repeated labels
--class-var1 <code> classifying variable 1 code
--class-key1 <key> classifying key 1 (value selection)
--class-var2 <code> classifying variable 2 code
--class-key2 <key> classifying key 2 (value selection)
--class-var3 <code> classifying variable 3 code
--class-key3 <key> classifying key 3 (value selection)
--class-var4 <code> classifying variable 4 code
--class-key4 <key> classifying key 4 (value selection)
--class-var5 <code> classifying variable 5 code
--class-key5 <key> classifying key 5 (value selection)

regstat data result

Fetch a saved result table (data/result)

regstat data result [options] <name>

Arguments

<name> required
object code (must be non-empty)

Options

OptionDescriptionDefault
--area <area> data area
--start-year <year> earliest year (YYYY)
--end-year <year> latest year (YYYY)
--timeslices <n> number of time slices from the end
--region-var <code> regional level variable (e.g. KREISE, GEMEIN)
--region-key <key> regional key: AGS/ARS code(s), `*` wildcard ok (e.g. `08*`, `08221`)
--contents <labels> restrict to these value labels (comma-separated)
--stand <date> only data newer than this date (DD.MM.YYYY)
--structure include the dimension structure tree
--transpose transpose rows and columns
--compress compress repeated labels
--class-var1 <code> classifying variable 1 code
--class-key1 <key> classifying key 1 (value selection)
--class-var2 <code> classifying variable 2 code
--class-key2 <key> classifying key 2 (value selection)
--class-var3 <code> classifying variable 3 code
--class-key3 <key> classifying key 3 (value selection)
--class-var4 <code> classifying variable 4 code
--class-key4 <key> classifying key 4 (value selection)
--class-var5 <code> classifying variable 5 code
--class-key5 <key> classifying key 5 (value selection)

regstat data tablefile

Download a table as a file (ZIP) — use -o <file>

regstat data tablefile [options] <name>

Arguments

<name> required
object code (must be non-empty)

Options

OptionDescriptionDefault
--format <fmt> download format Choices: datencsv, csv, ffcsv, xlsx, html, genml
--area <area> data area
--start-year <year> earliest year (YYYY)
--end-year <year> latest year (YYYY)
--timeslices <n> number of time slices from the end
--region-var <code> regional level variable (e.g. KREISE, GEMEIN)
--region-key <key> regional key: AGS/ARS code(s), `*` wildcard ok (e.g. `08*`, `08221`)
--contents <labels> restrict to these value labels (comma-separated)
--stand <date> only data newer than this date (DD.MM.YYYY)
--structure include the dimension structure tree
--transpose transpose rows and columns
--compress compress repeated labels
--class-var1 <code> classifying variable 1 code
--class-key1 <key> classifying key 1 (value selection)
--class-var2 <code> classifying variable 2 code
--class-key2 <key> classifying key 2 (value selection)
--class-var3 <code> classifying variable 3 code
--class-key3 <key> classifying key 3 (value selection)
--class-var4 <code> classifying variable 4 code
--class-key4 <key> classifying key 4 (value selection)
--class-var5 <code> classifying variable 5 code
--class-key5 <key> classifying key 5 (value selection)

regstat data cubefile

Download a cube as a file (ZIP) — use -o <file>

regstat data cubefile [options] <name>

Arguments

<name> required
object code (must be non-empty)

Options

OptionDescriptionDefault
--format <fmt> download format Choices: datencsv, csv, ffcsv, xlsx, html, genml
--area <area> data area
--start-year <year> earliest year (YYYY)
--end-year <year> latest year (YYYY)
--timeslices <n> number of time slices from the end
--region-var <code> regional level variable (e.g. KREISE, GEMEIN)
--region-key <key> regional key: AGS/ARS code(s), `*` wildcard ok (e.g. `08*`, `08221`)
--contents <labels> restrict to these value labels (comma-separated)
--stand <date> only data newer than this date (DD.MM.YYYY)
--structure include the dimension structure tree
--transpose transpose rows and columns
--compress compress repeated labels
--class-var1 <code> classifying variable 1 code
--class-key1 <key> classifying key 1 (value selection)
--class-var2 <code> classifying variable 2 code
--class-key2 <key> classifying key 2 (value selection)
--class-var3 <code> classifying variable 3 code
--class-key3 <key> classifying key 3 (value selection)
--class-var4 <code> classifying variable 4 code
--class-key4 <key> classifying key 4 (value selection)
--class-var5 <code> classifying variable 5 code
--class-key5 <key> classifying key 5 (value selection)

regstat data timeseriesfile

Download a time series as a file (ZIP) — use -o <file>

regstat data timeseriesfile [options] <name>

Arguments

<name> required
object code (must be non-empty)

Options

OptionDescriptionDefault
--format <fmt> download format Choices: datencsv, csv, ffcsv, xlsx, html, genml
--area <area> data area
--start-year <year> earliest year (YYYY)
--end-year <year> latest year (YYYY)
--timeslices <n> number of time slices from the end
--region-var <code> regional level variable (e.g. KREISE, GEMEIN)
--region-key <key> regional key: AGS/ARS code(s), `*` wildcard ok (e.g. `08*`, `08221`)
--contents <labels> restrict to these value labels (comma-separated)
--stand <date> only data newer than this date (DD.MM.YYYY)
--structure include the dimension structure tree
--transpose transpose rows and columns
--compress compress repeated labels
--class-var1 <code> classifying variable 1 code
--class-key1 <key> classifying key 1 (value selection)
--class-var2 <code> classifying variable 2 code
--class-key2 <key> classifying key 2 (value selection)
--class-var3 <code> classifying variable 3 code
--class-key3 <key> classifying key 3 (value selection)
--class-var4 <code> classifying variable 4 code
--class-key4 <key> classifying key 4 (value selection)
--class-var5 <code> classifying variable 5 code
--class-key5 <key> classifying key 5 (value selection)

regstat data resultfile

Download a saved result as a file (ZIP) — use -o <file>

regstat data resultfile [options] <name>

Arguments

<name> required
object code (must be non-empty)

Options

OptionDescriptionDefault
--format <fmt> download format Choices: datencsv, csv, ffcsv, xlsx, html, genml
--area <area> data area
--start-year <year> earliest year (YYYY)
--end-year <year> latest year (YYYY)
--timeslices <n> number of time slices from the end
--region-var <code> regional level variable (e.g. KREISE, GEMEIN)
--region-key <key> regional key: AGS/ARS code(s), `*` wildcard ok (e.g. `08*`, `08221`)
--contents <labels> restrict to these value labels (comma-separated)
--stand <date> only data newer than this date (DD.MM.YYYY)
--structure include the dimension structure tree
--transpose transpose rows and columns
--compress compress repeated labels
--class-var1 <code> classifying variable 1 code
--class-key1 <key> classifying key 1 (value selection)
--class-var2 <code> classifying variable 2 code
--class-key2 <key> classifying key 2 (value selection)
--class-var3 <code> classifying variable 3 code
--class-key3 <key> classifying key 3 (value selection)
--class-var4 <code> classifying variable 4 code
--class-key4 <key> classifying key 4 (value selection)
--class-var5 <code> classifying variable 5 code
--class-key5 <key> classifying key 5 (value selection)