| Title: | Access INKAR Database |
| Version: | 1.0.3 |
| 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. |
| Depends: | R (≥ 3.3.1) |
| License: | GPL-3 |
| URL: | https://github.com/sumtxt/bonn/ |
| BugReports: | https://github.com/sumtxt/bonn/issues |
| Encoding: | UTF-8 |
| Imports: | httr (≥ 1.2.1), jsonlite (≥ 1.6.0) |
| RoxygenNote: | 7.3.2 |
| NeedsCompilation: | no |
| Packaged: | 2025-07-21 11:27:56 UTC; mmarbach |
| Author: | Moritz Marbach |
| Maintainer: | Moritz Marbach <m.marbach@ucl.ac.uk> |
| Repository: | CRAN |
| Date/Publication: | 2025-07-21 12:30:12 UTC |
Data retrieval client for the 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.
Author(s)
Moritz Marbach <m.marbach@ucl.ac.uk>
See Also
Useful links:
Get Data
Description
get_data retrieves a data frame with all available values for a variable
Usage
get_data(variable, geography, time = NULL)
Arguments
variable |
variable identifier as character string |
geography |
geography identifier as character string |
time |
time identifier as vector of character strings |
Details
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.
Value
a data.frame with columns Schlüssel (unit identifier),
Raumbezug (geography identifier), Indikator (variable identifier),
Wert (value) and time (year or time period).
See Also
get_geographies get_variables get_metadata
Examples
# 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 Available Geographies
Description
get_geographies either retrieves a data frame with all available geographies or all existing units for a given geography
Usage
get_geographies(geography = NULL)
Arguments
geography |
geography as string or |
Value
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).
Examples
# 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 for a Variable
Description
get_metadata retrieves the metadata for a single variable
Usage
get_metadata(variable)
Arguments
variable |
variable identifier as character string |
Details
To get a list of available variables use get_variables.
Value
a data.frame with columns Name (variable name), Kurzname (short name),
Algorithmus (information on measurement), Quelle (source) and Anmerkungen (notes).
See Also
Examples
# 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 Available Themes
Description
get_themes retrieves a data frame with all available themes
Usage
get_themes(geography)
Arguments
geography |
geography as character string |
Details
To get a list of available geographies use get_geographies.
Value
a data.frame with columns ID (theme identifier), Bereich (theme name)
and Unterbereich (sub-theme name).
See Also
Examples
# 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 Available Variables
Description
get_variables retrieves a data frame with available variables
Usage
get_variables(theme, geography)
Arguments
theme |
theme as character string |
geography |
geography as character string |
Details
To get a list of available geographies use get_geographies. To
get a list of available themes use get_themes.
Value
a data.frame with columns KurznamePlus (variable name), Bereich (theme identifier),
Gruppe (variable identifier), BU, EU, Zeitreihe (all three unknown).
See Also
Examples
# 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()