| 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>) of the Federal Office for Building and Regional Planning (BBSR) in Bonn using their JSON API. |
| Authors: | Moritz Marbach [aut, cre] (ORCID: <https://orcid.org/0000-0002-7101-2821>) |
| Maintainer: | Moritz Marbach <[email protected]> |
| License: | GPL-3 |
| Version: | 1.0.3 |
| Built: | 2026-05-17 06:54:43 UTC |
| Source: | https://github.com/sumtxt/bonn |
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
# The SSL vertification seems to fail for some Linux systems. # This is likely because of a SSL certificate issue on the INKAR server. # Disabling SSL verification comes with risks: # https://curl.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html httr::set_config(httr::config(ssl_verifypeer = 0L)) # GDP for all districts/all available years get_data(variable="011", geography="KRE") # Reset configuration httr::reset_config()# The SSL vertification seems to fail for some Linux systems. # This is likely because of a SSL certificate issue on the INKAR server. # Disabling SSL verification comes with risks: # https://curl.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html httr::set_config(httr::config(ssl_verifypeer = 0L)) # GDP for all districts/all available years get_data(variable="011", geography="KRE") # Reset configuration httr::reset_config()
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).
# The SSL vertification seems to fail for some Linux systems. # This is likely because of a SSL certificate issue on the INKAR server. # Disabling SSL verification comes with risks: # https://curl.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html httr::set_config(httr::config(ssl_verifypeer = 0L)) # Available geographies get_geographies() # All districts get_geographies("KRS") # Reset configuration httr::reset_config()# The SSL vertification seems to fail for some Linux systems. # This is likely because of a SSL certificate issue on the INKAR server. # Disabling SSL verification comes with risks: # https://curl.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html httr::set_config(httr::config(ssl_verifypeer = 0L)) # Available geographies get_geographies() # All districts get_geographies("KRS") # Reset configuration httr::reset_config()
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).
# The SSL vertification seems to fail for some Linux systems. # This is likely because of a SSL certificate issue on the INKAR server. # Disabling SSL verification comes with risks: # https://curl.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html httr::set_config(httr::config(ssl_verifypeer = 0L)) # Metadata for GDP variable get_metadata("010") # Reset configuration httr::reset_config()# The SSL vertification seems to fail for some Linux systems. # This is likely because of a SSL certificate issue on the INKAR server. # Disabling SSL verification comes with risks: # https://curl.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html httr::set_config(httr::config(ssl_verifypeer = 0L)) # Metadata for GDP variable get_metadata("010") # Reset configuration httr::reset_config()
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).
# The SSL vertification seems to fail for some Linux systems. # This is likely because of a SSL certificate issue on the INKAR server. # Disabling SSL verification comes with risks: # https://curl.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html httr::set_config(httr::config(ssl_verifypeer = 0L)) # Available themes get_themes("KRE") # Reset configuration httr::reset_config()# The SSL vertification seems to fail for some Linux systems. # This is likely because of a SSL certificate issue on the INKAR server. # Disabling SSL verification comes with risks: # https://curl.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html httr::set_config(httr::config(ssl_verifypeer = 0L)) # Available themes get_themes("KRE") # Reset configuration httr::reset_config()
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).
# The SSL vertification seems to fail for some Linux systems. # This is likely because of a SSL certificate issue on the INKAR server. # Disabling SSL verification comes with risks: # https://curl.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html httr::set_config(httr::config(ssl_verifypeer = 0L)) # Retrieves list of available variables in the # theme "unemployment" for districts get_variables(theme="011", geography="KRE") # Reset configuration httr::reset_config()# The SSL vertification seems to fail for some Linux systems. # This is likely because of a SSL certificate issue on the INKAR server. # Disabling SSL verification comes with risks: # https://curl.se/libcurl/c/CURLOPT_SSL_VERIFYPEER.html httr::set_config(httr::config(ssl_verifypeer = 0L)) # Retrieves list of available variables in the # theme "unemployment" for districts get_variables(theme="011", geography="KRE") # Reset configuration httr::reset_config()