Learn R Programming

bonn (version 1.0.3)

get_data: Get Data

Description

get_data retrieves a data frame with all available values for a variable

Usage

get_data(variable, geography, time = NULL)

Value

a data.frame with columns Schlüssel (unit identifier), Raumbezug (geography identifier), Indikator (variable identifier), Wert (value) and time (year or time period).

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.

See Also

get_geographies get_variables get_metadata

Examples

Run this code
# 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()





Run the code above in your browser using DataLab