Title: | Access INKAR Database |
---|---|
Description: | Retrieve and import data from the INKAR database (Indikatoren und Karten zur Raum- und Stadtentwicklung Datenbank, <[https://www.inkar.de]https://www.inkar.de>) of the Federal Office for Building and Regional Planning (BBSR) in Bonn using their JSON API. |
Authors: | Moritz Marbach [aut, cre] |
Maintainer: | Moritz Marbach <[email protected]> |
License: | GPL-3 |
Version: | 1.0.2 |
Built: | 2025-01-08 02:40:43 UTC |
Source: | https://github.com/sumtxt/bonn |
Data retrieval client for the INKAR Database
Moritz Marbach [email protected]
get_data
retrieves a data frame with all available values for a variable
get_data(variable, geography, time = NULL)
get_data(variable, geography, time = NULL)
variable |
variable identifier as character string |
geography |
geography identifier as character string |
time |
time identifier as vector of character strings |
To get a list of available geographies use get_geographies
. To
get a list of available variables use get_variables
.
The function retrieves all values for all available years by default.
a data.frame
with columns Schlüssel
(unit identifier),
Raumbezug
(geography identifier), Indikator
(variable identifier),
Wert
(value) and time
(year or time period).
get_geographies
get_variables
get_metadata
# GDP for all districts/all available years get_data(variable="011", geography="KRE")
# GDP for all districts/all available years get_data(variable="011", geography="KRE")
get_geographies
either retrieves a data frame with all available geographies or all existing units for a given geography
get_geographies(geography = NULL)
get_geographies(geography = NULL)
geography |
geography as string or |
a data.frame
either with the columns Kurzname
(geography name), ID
(geography identifier)
and NGeb
(number of units) or with the columns Schlüssel
(unit identifier) and Name
(unit name).
# Available geographies get_geographies() # All districts get_geographies("KRS")
# Available geographies get_geographies() # All districts get_geographies("KRS")
get_metadata
retrieves the metadata for a single variable
get_metadata(variable)
get_metadata(variable)
variable |
variable identifier as character string |
To get a list of available variables use get_variables
.
a data.frame
with columns Name
(variable name), Kurzname
(short name),
Algorithmus
(information on measurement), Quelle
(source) and Anmerkungen
(notes).
# Metadata for GDP variable get_metadata("010")
# Metadata for GDP variable get_metadata("010")
get_themes
retrieves a data frame with all available themes
get_themes(geography)
get_themes(geography)
geography |
geography as character string |
To get a list of available geographies use get_geographies
.
a data.frame
with columns ID
(theme identifier), Bereich
(theme name)
and Unterbereich
(sub-theme name).
# Available themes get_themes("KRE")
# Available themes get_themes("KRE")
get_variables
retrieves a data frame with available variables
get_variables(theme, geography)
get_variables(theme, geography)
theme |
theme as character string |
geography |
geography as character string |
To get a list of available geographies use get_geographies
. To
get a list of available themes use get_themes
.
a data.frame
with columns KurznamePlus
(variable name), Bereich
(theme identifier),
Gruppe
(variable identifier), BU
, EU
, Zeitreihe
(all three unknown).
# Retrieves list of available variables in the # theme "unemployment" for districts get_variables(theme="011", geography="KRE")
# Retrieves list of available variables in the # theme "unemployment" for districts get_variables(theme="011", geography="KRE")