Package 'bonn'

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

Help Index


Data retrieval client for the INKAR Database

Description

Data retrieval client for the INKAR Database

Author(s)

Moritz Marbach [email protected]


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

# GDP for all districts/all available years
 get_data(variable="011", geography="KRE")

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 NULL

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

# Available geographies  
 get_geographies()

	# All districts 
	get_geographies("KRS")

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

get_variables get_data

Examples

# Metadata for GDP variable
 get_metadata("010")

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

get_geographies

Examples

# Available themes  
 get_themes("KRE")

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

get_geographies get_themes

Examples

# Retrieves list of available variables in the  
 # theme "unemployment" for districts 
 get_variables(theme="011", geography="KRE")