From 1d2b0b0c47162819133ac8b302a8f6b1e3215b08 Mon Sep 17 00:00:00 2001 From: MM <> Date: Mon, 22 Jul 2024 21:39:47 +0000 Subject: [PATCH] Built site for wiesbaden: 1.2.10@ --- pkgdown.yml | 2 +- reference/read_gv100.html | 7 +++---- reference/save_credentials.html | 2 +- reference/wiesbaden-package.html | 2 +- search.json | 2 +- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/pkgdown.yml b/pkgdown.yml index fd90eff..f3025bc 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -3,7 +3,7 @@ pkgdown: 2.0.7 pkgdown_sha: ~ articles: wiesbaden: wiesbaden.html -last_built: 2024-07-22T20:55Z +last_built: 2024-07-22T21:39Z urls: reference: https://sumtxt.github.io/wiesbaden/reference article: https://sumtxt.github.io/wiesbaden/articles diff --git a/reference/read_gv100.html b/reference/read_gv100.html index 5d32eb9..6614695 100644 --- a/reference/read_gv100.html +++ b/reference/read_gv100.html @@ -91,7 +91,7 @@

Details + around read_fwf.

There are two types of files: One feature the administrative information (version="AD") and one with non-administrative (version="NAD"). If version=NULL, read_gv100() guess the @@ -109,12 +109,11 @@

Details41 - Kreise (counties) 61 - Gemeinden (municipalities)

Since about 2019, the Gemeindeverzeichnis is using UTF-8 encoding rather -than ISO-8859-1.

+than ISO-8859-1. See also DESTATIS Website:
GV-ISys

diff --git a/reference/save_credentials.html b/reference/save_credentials.html index 2dea946..921ac78 100644 --- a/reference/save_credentials.html +++ b/reference/save_credentials.html @@ -79,7 +79,7 @@

Details

diff --git a/search.json b/search.json index 076918a..f85c395 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://sumtxt.github.io/wiesbaden/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Moritz Marbach. Author, maintainer.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Marbach M (2024). wiesbaden: Access Databases Federal Statistical Office Germany. R package version 1.2.10, https://github.com/sumtxt/wiesbaden/.","code":"@Manual{, title = {wiesbaden: Access Databases from the Federal Statistical Office of Germany}, author = {Moritz Marbach}, year = {2024}, note = {R package version 1.2.10}, url = {https://github.com/sumtxt/wiesbaden/}, }"},{"path":"https://sumtxt.github.io/wiesbaden/index.html","id":"wiesbaden","dir":"","previous_headings":"","what":"wiesbaden - Access Databases from the Federal Statistical Office of Germany","title":"wiesbaden - Access Databases from the Federal Statistical Office of Germany","text":"R package wiesbaden provides functions directly retrieve data databases maintained Federal Statistical Office Germany (DESTATIS) Wiesbaden. package uses SOAP XML web service DESTATIS (PDF Documentation). Access following databases implemented: regionalstatistik.de genesis.destatis.de bildungsmonitoring.de landesdatenbank.nrw.de statistikdaten.bayern.de (data retrieval API disabled) genesis.sachsen-anhalt.de (data retrieval API disabled) statistik.sachsen.de (API disabled) Note, access databases using package, need register respective website get personal login name password. registration free.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"wiesbaden - Access Databases from the Federal Statistical Office of Germany","text":"can install package directly CRAN: install latest version Github using:","code":"install.packages(\"wiesbaden\") remotes::install_github(\"sumtxt/wiesbaden\", force=TRUE)"},{"path":"https://sumtxt.github.io/wiesbaden/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"wiesbaden - Access Databases from the Federal Statistical Office of Germany","text":"package helps retrieving data cubes used construct data tables available csv files via web application database. data cubes long format data tables much easier process compared csv files. details use package: Getting Started wiesbaden. package also helps importing German municipality register files via function read_gv100(). information see help file function. Users wish work csv files might find download_csv() read_header_genesis() package helpful. former can used automate downloads latter facilitates importing downloaded files. Users might also wish check R package destatiscleanr github.com/cutterkom/destatiscleanr.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/index.html","id":"faq","dir":"","previous_headings":"","what":"FAQ","title":"wiesbaden - Access Databases from the Federal Statistical Office of Germany","text":"package work proxy? Yes. Set proxy globally calling package command, e.g.:","code":"httr::set_config(httr::use_proxy( \"your.proxy\", port = 1234, auth = \"basic\")) data <- retrieve_data(tablename=\"14111KJ002\", genesis=c(db=\"regio\"))"},{"path":"https://sumtxt.github.io/wiesbaden/index.html","id":"similar-and-complementary-packages","dir":"","previous_headings":"","what":"Similar and Complementary Packages","title":"wiesbaden - Access Databases from the Federal Statistical Office of Germany","text":"R package destatiscleanr github.com/cutterkom/destatiscleanr provides functions help importing csv files downloaded via web application. R package restatis correlaid.github.io/restatis/ provides similar functions access genesis.destatis.de. R package bonn github.com/sumtxt/bonn provides functions retrieve data INKAR database maintained Federal Office Building Regional Planning (BBSR) Bonn. R package AGS github.com/sumtxt/ags provides functions work Amtlicher Gemeindeschlüssel (AGS), e.g. construct time series statistics Germany’s municipalities districts. Python packages github.com/WZBSocialScienceCenter/gemeindeverzeichnis rohablog.wordpress.com/2011/11/22/gv100-parser-python/ provide functions read GV100 format. node.js package https://github.com/yetzt/node-gv100json provides functions read GV100 format. Python package github.com/pudo/regenesis provides function bulk download data regionalstatistik.de.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/download_csv.html","id":null,"dir":"Reference","previous_headings":"","what":"Download the csv-file of a table — download_csv","title":"Download the csv-file of a table — download_csv","text":"download_csv() downloads csv table","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/download_csv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download the csv-file of a table — download_csv","text":"","code":"download_csv( tablename, startyear = \"\", endyear = \"\", ..., genesis_db = \"de\", save = TRUE )"},{"path":"https://sumtxt.github.io/wiesbaden/reference/download_csv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download the csv-file of a table — download_csv","text":"tablename name table retrieve. startyear retrieve values years equal larger startyear. Default: \"\". endyear retrieve values years smaller equal endyear. Default: \"\". ... parameters supplied URL parameter GENESIS database call genesis_db name database (default: 'de'). save write string text file (default: TRUE)","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/download_csv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download the csv-file of a table — download_csv","text":"Downloads csv file either working directory getwd() outputs string. alternative approach retrieve_*() functions. designed https://www-genesis.destatis.de/genesis/online require login. might work expected databases.","code":""},{"path":[]},{"path":"https://sumtxt.github.io/wiesbaden/reference/download_csv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download the csv-file of a table — download_csv","text":"","code":"if (FALSE) { download_csv(\"12411-0004.csv\") }"},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_gv100.html","id":null,"dir":"Reference","previous_headings":"","what":"Reads the DESTATIS GV100 Format — read_gv100","title":"Reads the DESTATIS GV100 Format — read_gv100","text":"GV100 format used DESTATIS publish German municipality register","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_gv100.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reads the DESTATIS GV100 Format — read_gv100","text":"","code":"read_gv100(file, stzrt, version = NULL, encoding = \"iso-8859-1\", ...)"},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_gv100.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reads the DESTATIS GV100 Format — read_gv100","text":"file path file stzrt integer select administrative level (see details) version GV100 version. NULL version guessed based file name. encoding encoding file ... parameters passed read_fwf","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_gv100.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reads the DESTATIS GV100 Format — read_gv100","text":"data.frame.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_gv100.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Reads the DESTATIS GV100 Format — read_gv100","text":"Gemeindeverzeichnis (municipality register) published fixed width file refered \"GV1000 ASCII Format\" DESTATIS. register features list municipality higher order administrative units. function wrapper around [readr::read_fwf()]. two types files: One feature administrative information (version=\"AD\") one non-administrative (version=\"NAD\"). version=NULL, read_gv100() guess type based file name. select particular administrative unit use stzrt argument (Satzart). AD version, following choices possible: 10 - Länder (states) 20 - Regierungsbezirke 30 - Regionsdaten (Baden-Württemberg) 40 - Kreise (counties) 50 - Gemeindeverbandsdaten 60 - Gemeinden (municipalities) NAD version : 41 - Kreise (counties) 61 - Gemeinden (municipalities) Since 2019, Gemeindeverzeichnis using UTF-8 encoding rather ISO-8859-1.","code":""},{"path":[]},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_gv100.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reads the DESTATIS GV100 Format — read_gv100","text":"","code":"if (FALSE) { d <- read_gv100(\"GV100NAD31122016.asc\", stzrt=60) }"},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_header_genesis.html","id":null,"dir":"Reference","previous_headings":"","what":"Read Header of a GENESIS csv — read_header_genesis","title":"Read Header of a GENESIS csv — read_header_genesis","text":"read_header_genesis reads header GENESIS csv.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_header_genesis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read Header of a GENESIS csv — read_header_genesis","text":"","code":"read_header_genesis( ..., start, lines = 2, readr_locale = locale(encoding = \"windows-1252\"), replacer = NULL, clean_letters = TRUE )"},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_header_genesis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read Header of a GENESIS csv — read_header_genesis","text":"... arguments read_csv2 start number first line header lines number header lines readr_locale definition locale() passed read_csv2() replacer vector used first K column-names clean_letters make proper variable names? (default: TRUE) locale default encoding 'windows-1252'","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_header_genesis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read Header of a GENESIS csv — read_header_genesis","text":"vector column names.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_header_genesis.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read Header of a GENESIS csv — read_header_genesis","text":"generate valid column names, function replaces special characters (e.g. German öüä) ASCII letters removes whitespaces. Multi-line headers joined separated '_'.","code":""},{"path":[]},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_header_genesis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read Header of a GENESIS csv — read_header_genesis","text":"","code":"if (FALSE) { library(readr) download_csv(tablename=\"12411-0004\") d <- read_header_genesis('12411-0004.csv', start=6, replacer=c(\"STAG\")) data <- read_csv2('12411-0004.csv', skip=6, n_max=30-6+1, na=\"-\", locale=locale(encoding=\"windows-1252\") ) colnames(data) <- d }"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieves Data from GENESIS Databases — retrieve_data","title":"Retrieves Data from GENESIS Databases — retrieve_data","text":"retrieve_data retrieves single data table.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieves Data from GENESIS Databases — retrieve_data","text":"","code":"retrieve_data( tablename, startyear = \"\", endyear = \"\", regionalmerkmal = \"\", regionalschluessel = \"\", sachmerkmal = \"\", sachschluessel = \"\", sachmerkmal2 = \"\", sachschluessel2 = \"\", sachmerkmal3 = \"\", sachschluessel3 = \"\", inhalte = \"\", genesis = NULL, language = \"de\", ... )"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieves Data from GENESIS Databases — retrieve_data","text":"tablename name table retrieve. startyear retrieve values years equal larger startyear. Default: \"\". endyear retrieve values years smaller equal endyear. Default: \"\". regionalmerkmal key Regionalklassifikation. See details information. Default: \"\". regionalschluessel retrieve values particular regional units. See details information. Default: \"\". sachmerkmal, sachmerkmal2, sachmerkmal3 key Sachklassifikation. Default: \"\". sachschluessel, sachschluessel2, sachschluessel3 value Sachklassifikation. Default: \"\". inhalte retrieve selected variables. Default retrieve . genesis authenticate user set database (see ). language retrieve information German \"de\" (default) English \"en\" available. ... arguments send httr::GET request.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieves Data from GENESIS Databases — retrieve_data","text":"data.frame. Value variables (_val) come three additional variables (_qual, _lock, _err). exact nature variables unknown, _qual appears indicate _val valid value. _qual==\"e\" value _val valid _qual!=\"e\" (_qual = (\"-\",\"/\", \".\", \"x\", ... ) ) typically zero /might set NA.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Retrieves Data from GENESIS Databases — retrieve_data","text":"Use retrieve_datalist find tablename based table series interested . See package description (wiesbaden) details setting login database. parameter regionalschluessel can either single value (single Amtlicher Gemeindeschlüssel) comma-separated list values supplied string (whitespaces). Wildcard character \"*\" allowed. regionalschluessel set, parameter regionalmerkmal must also set GEMEIN, KREISE, REGBEZ, DLAND. logic applies parameter combination sachmerkmal sachschluessel*. parameter inhalte takes 1-6 character long name variable table. choosing multiple variables, delimit \",\", e.g. \"STNW01,STNW02\" (whitespaces). Limiting data request particular years (via *year parameters), geographical units (via regional* parameters) attributes (via sach* parameters) selected variables (via inhalte parameter) necessary API request fails return data. able download table size, inspect metadata first (using retrieve_metadata retrieve_valuelabel) limit data request accordingly. See also examples .","code":""},{"path":[]},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieves Data from GENESIS Databases — retrieve_data","text":"","code":"if (FALSE) { # Retrieve values for the table 14111KJ002 which contains the # federal election results on the county level. # Assumes that user/password are stored via save_credentials() data <- retrieve_data(tablename=\"14111KJ002\", genesis=c(db=\"regio\") ) # ... only the values for the AfD. data <- retrieve_data(tablename=\"14111KJ002\", sachmerkmal=\"PART04\", sachschluessel=\"AFD\", genesis=c(db=\"regio\") ) # ... or only values from Saxony data <- retrieve_data(tablename=\"14111KJ002\", regionalmerkmal=\"KREISE\", regionalschluessel=\"14*\", genesis=c(db=\"regio\") ) # Limiting the number of data points is in particular important for # large tables. For example, this data request fails: data <- retrieve_data(tablename=\"33111GJ005\", genesis=c(db='regio')) # But after limiting the request to one year, the data is returned: data <- retrieve_data(tablename=\"33111GJ005\", genesis=c(db='regio'), startyear=2019, endyear=2019) # An alternative strategy is to only request a subset of the variables. # For example, this data request fails: data <- retrieve_data(\"12711GJ002\", genesis=c(db=\"regio\")) # But when requesting only one instead of all variables, the data is returned: data <- retrieve_data(\"12711GJ002\", inhalte=\"BEV081\", genesis=c(db=\"regio\")) # Example using the sachschluessel: Number of refugees from Afghanistan (ST423) # and Egypt (ST287) by district (Kreis) in 2022. data <- retrieve_data(\"12531KJ003\", startyear = 2022, endyear = 2022, sachmerkmal=\"STAAG5\", sachschluessel = \"ST423, ST287\", genesis=c(db='de')) }"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_datalist.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieves List of Tables from GENESIS Databases — retrieve_datalist","title":"Retrieves List of Tables from GENESIS Databases — retrieve_datalist","text":"retrieve_datalist retrieves list available data tables series.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_datalist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieves List of Tables from GENESIS Databases — retrieve_datalist","text":"","code":"retrieve_datalist(tableseries, genesis = NULL, language = \"de\", ...)"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_datalist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieves List of Tables from GENESIS Databases — retrieve_datalist","text":"tableseries name series tables retrieved. genesis authenticate user set database (see ). language retrieve information German \"de\" (default) English \"en\" available. ... arguments send httr::GET request.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_datalist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieves List of Tables from GENESIS Databases — retrieve_datalist","text":"data.frame","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_datalist.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Retrieves List of Tables from GENESIS Databases — retrieve_datalist","text":"See package description (wiesbaden) details setting login database. retrieve list available data use tableseries=\"*\" combine wildcard character * prefix (see example).","code":""},{"path":[]},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_datalist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieves List of Tables from GENESIS Databases — retrieve_datalist","text":"","code":"if (FALSE) { # Retrieves list of available tables for the table series 14111 # which contains the federal election results. # Assumes that user/password are stored via save_credentials() d <- retrieve_datalist(tableseries=\"14111*\", genesis=c(db=\"regio\") ) }"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_metadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieves Meta Data from GENESIS Databases — retrieve_metadata","title":"Retrieves Meta Data from GENESIS Databases — retrieve_metadata","text":"retrieve_metadata retrieves meta data.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_metadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieves Meta Data from GENESIS Databases — retrieve_metadata","text":"","code":"retrieve_metadata(tablename, language = \"de\", genesis = NULL, ...)"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_metadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieves Meta Data from GENESIS Databases — retrieve_metadata","text":"tablename name table retrieve. language retrieve information German \"de\" (default) English \"en\" available. genesis authenticate user set database (see ). ... arguments send httr::GET request.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_metadata.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieves Meta Data from GENESIS Databases — retrieve_metadata","text":"data.frame.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_metadata.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Retrieves Meta Data from GENESIS Databases — retrieve_metadata","text":"See package description (wiesbaden) details setting login database.","code":""},{"path":[]},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_metadata.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieves Meta Data from GENESIS Databases — retrieve_metadata","text":"","code":"if (FALSE) { # Meta data contain the explanations to the variable names for the table # federal election results on the county level. # Assumes that user/password are stored via save_credentials() metadata <- retrieve_metadata(tablename=\"14111KJ002\", genesis=c(db=\"regio\") ) }"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_valuelabel.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieves Value Labels from GENESIS Databases — retrieve_valuelabel","title":"Retrieves Value Labels from GENESIS Databases — retrieve_valuelabel","text":"retrieve_valuelabel retrieves value labels variable","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_valuelabel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieves Value Labels from GENESIS Databases — retrieve_valuelabel","text":"","code":"retrieve_valuelabel( variablename, valuelabel = \"*\", genesis = NULL, language = \"de\", ... )"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_valuelabel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieves Value Labels from GENESIS Databases — retrieve_valuelabel","text":"variablename name variable valuelabel \"*\" (default) retrieves value labels. genesis authenticate user set database (see ). language retrieve information German \"de\" (default) English \"en\" available. ... arguments send httr::GET request.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_valuelabel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieves Value Labels from GENESIS Databases — retrieve_valuelabel","text":"data.frame.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_valuelabel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Retrieves Value Labels from GENESIS Databases — retrieve_valuelabel","text":"See package description (wiesbaden) details setting login database.","code":""},{"path":[]},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_valuelabel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieves Value Labels from GENESIS Databases — retrieve_valuelabel","text":"","code":"if (FALSE) { # Value labels contain for the variable 'PART04' in the table with the # federal election results on the county level. # Assumes that user/password are stored via save_credentials() metadata <- retrieve_valuelabel(variablename=\"PART04\", genesis=c(db=\"regio\") ) }"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_varinfo.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieves further information on a variable from GENESIS Databases — retrieve_varinfo","title":"Retrieves further information on a variable from GENESIS Databases — retrieve_varinfo","text":"retrieve_varinfo retrieves information.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_varinfo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieves further information on a variable from GENESIS Databases — retrieve_varinfo","text":"","code":"retrieve_varinfo(variablename, genesis = NULL, language = \"de\", ...)"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_varinfo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieves further information on a variable from GENESIS Databases — retrieve_varinfo","text":"variablename name variable genesis authenticate user set database (see ). language retrieve information German \"de\" (default) English \"en\" available. ... arguments send httr::GET request.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_varinfo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieves further information on a variable from GENESIS Databases — retrieve_varinfo","text":"data.frame.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_varinfo.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Retrieves further information on a variable from GENESIS Databases — retrieve_varinfo","text":"See package description (wiesbaden) details setting login database.","code":""},{"path":[]},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_varinfo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieves further information on a variable from GENESIS Databases — retrieve_varinfo","text":"","code":"if (FALSE) { # Variable information 'AI2105' (Anteil der Empfänger von Arbeitslosengeld II im Alter # von 15 bis 24 Jahren an der Bevölkerung gleichen Alters) # Assumes that user/password are stored via save_credentials() metadata <- retrieve_varinfo(variablename=\"AI2105\", genesis=c(db=\"regio\") ) }"},{"path":"https://sumtxt.github.io/wiesbaden/reference/save_credentials.html","id":null,"dir":"Reference","previous_headings":"","what":"Saves database credentials — save_credentials","title":"Saves database credentials — save_credentials","text":"save_credentials saves set database credentials using keyring package.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/save_credentials.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Saves database credentials — save_credentials","text":"","code":"save_credentials(db, user, password)"},{"path":"https://sumtxt.github.io/wiesbaden/reference/save_credentials.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Saves database credentials — save_credentials","text":"db database name, either 'nrw', 'regio', 'de' 'bm'. user user name. password password.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/save_credentials.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Saves database credentials — save_credentials","text":"User/password stored Keychain macOS, Credential Store Windows Secret Service API Linux. user/password pair database already exists, silently replaced new pair. function relies keyring package.","code":""},{"path":[]},{"path":"https://sumtxt.github.io/wiesbaden/reference/test_login.html","id":null,"dir":"Reference","previous_headings":"","what":"Tests Login in GENESIS Databases — test_login","title":"Tests Login in GENESIS Databases — test_login","text":"test_login tests login works.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/test_login.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tests Login in GENESIS Databases — test_login","text":"","code":"test_login(genesis = NULL, ...)"},{"path":"https://sumtxt.github.io/wiesbaden/reference/test_login.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tests Login in GENESIS Databases — test_login","text":"genesis authenticate user set database (see ). ... arguments send httr::GET request.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/test_login.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tests Login in GENESIS Databases — test_login","text":"string server return message.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/test_login.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tests Login in GENESIS Databases — test_login","text":"","code":"if (FALSE) { test_login(genesis=c(db=\"regio\") ) }"},{"path":"https://sumtxt.github.io/wiesbaden/reference/wiesbaden-package.html","id":null,"dir":"Reference","previous_headings":"","what":"Client to access the data from the Federal Statistical Office, Germany — wiesbaden-package","title":"Client to access the data from the Federal Statistical Office, Germany — wiesbaden-package","text":"Data retrieval client Federal Statistical Office Germany","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/wiesbaden-package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Client to access the data from the Federal Statistical Office, Germany — wiesbaden-package","text":"authenticate, supply vector user name, password, database shortcut (\"regio\", \"de\", \"nrw\", \"bm\") argument genesis parameter whenever call retrieve_* function: c(user=\"-username\", password=\"-password\", db=\"database-shortname\") Alternatively, store credentials computer using save_credentials function. function relies keyring package. Available databases regionalstatistik.de (shortname: \"regio\"), landesdatenbank.nrw.de (\"nrw\"), www-genesis.destatis.de (\"de\") bildungsmonitoring.de (\"bm\").","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/wiesbaden-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Client to access the data from the Federal Statistical Office, Germany — wiesbaden-package","text":"Moritz Marbach moritz.marbach@tamu.edu","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-1210-2024-07-22","dir":"Changelog","previous_headings":"","what":"Version 1.2.10 (2024-07-22)","title":"Version 1.2.10 (2024-07-22)","text":"read_gv100() now uses stri_encode() instead iconv(). seems work better recent DESTATIS files.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-129-2022-01-17","dir":"Changelog","previous_headings":"","what":"Version 1.2.9 (2022-01-17)","title":"Version 1.2.9 (2022-01-17)","text":"CRAN release: 2023-02-17 Removed tidyverse package suggest","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-128-2022-12-17","dir":"Changelog","previous_headings":"","what":"Version 1.2.8 (2022-12-17)","title":"Version 1.2.8 (2022-12-17)","text":"CRAN release: 2022-12-18 New Parameter inhalte retrieve_data Revised help files include tips dealing large tables","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-126-2022-02-14","dir":"Changelog","previous_headings":"","what":"Version 1.2.6 (2022-02-14)","title":"Version 1.2.6 (2022-02-14)","text":"Fixed bug read_gv100() let error reading UTF-8 files Allow save credentials databases Bavaria Saxony-Anhalt","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-125-2022-01-03","dir":"Changelog","previous_headings":"","what":"Version 1.2.5 (2022-01-03)","title":"Version 1.2.5 (2022-01-03)","text":"CRAN release: 2022-01-03 Add connection databases Bavaria Saxony-Anhalt","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-124-2021-03-15","dir":"Changelog","previous_headings":"","what":"Version 1.2.4 (2021-03-15)","title":"Version 1.2.4 (2021-03-15)","text":"CRAN release: 2021-04-20 Change TestService_2010 options supply sachmerkmal Fixed bugs","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-123-2020-06-17","dir":"Changelog","previous_headings":"","what":"Version 1.2.3 (2020-06-17)","title":"Version 1.2.3 (2020-06-17)","text":"CRAN release: 2020-06-18 Fixed bug using regionalschluessel parameter retrieve_data() Revised vignette.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-122-2020-02-14","dir":"Changelog","previous_headings":"","what":"Version 1.2.2 (2020-02-14)","title":"Version 1.2.2 (2020-02-14)","text":"CRAN release: 2020-02-15 Allow switch language German English. Allow supply sachmerkmal sachschluessel parameter Revised help files.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-121-2020-01-26","dir":"Changelog","previous_headings":"","what":"Version 1.2.1 (2020-01-26)","title":"Version 1.2.1 (2020-01-26)","text":"CRAN release: 2020-01-26 Fixed bug leads keyring fail trying retrieve credentials Windows machine. Fixed bugs package documentation/vignette. Anticipating DESTATIS API changes February, increase default value 25000 number retrievable value labels via retrieve_valuelabel().","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-120-2019-10-14","dir":"Changelog","previous_headings":"","what":"Version 1.2.0 (2019-10-14)","title":"Version 1.2.0 (2019-10-14)","text":"CRAN release: 2019-11-10 Database usernames passwords now stored securely via keyring package instead file root directory.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-111-2019-10-14","dir":"Changelog","previous_headings":"","what":"Version 1.1.1 (2019-10-14)","title":"Version 1.1.1 (2019-10-14)","text":"Allow retrieve 2500 value labels using retrieve_valuelabel() (instead 500)","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-110-2019-10-13","dir":"Changelog","previous_headings":"","what":"Version 1.1.0 (2019-10-13)","title":"Version 1.1.0 (2019-10-13)","text":"Added vignette revised documentation functions. read_header_genesis() uses stri_trans_general() non-ASCII character replacement dplyr dependency removed reduced number dependencies Code read_gv100() rewritten using base functions","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-100","dir":"Changelog","previous_headings":"","what":"Version 1.0.0","title":"Version 1.0.0","text":"First release","code":""}] +[{"path":"https://sumtxt.github.io/wiesbaden/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Moritz Marbach. Author, maintainer.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Marbach M (2024). wiesbaden: Access Databases Federal Statistical Office Germany. R package version 1.2.10, https://github.com/sumtxt/wiesbaden/.","code":"@Manual{, title = {wiesbaden: Access Databases from the Federal Statistical Office of Germany}, author = {Moritz Marbach}, year = {2024}, note = {R package version 1.2.10}, url = {https://github.com/sumtxt/wiesbaden/}, }"},{"path":"https://sumtxt.github.io/wiesbaden/index.html","id":"wiesbaden","dir":"","previous_headings":"","what":"wiesbaden - Access Databases from the Federal Statistical Office of Germany","title":"wiesbaden - Access Databases from the Federal Statistical Office of Germany","text":"R package wiesbaden provides functions directly retrieve data databases maintained Federal Statistical Office Germany (DESTATIS) Wiesbaden. package uses SOAP XML web service DESTATIS (PDF Documentation). Access following databases implemented: regionalstatistik.de genesis.destatis.de bildungsmonitoring.de landesdatenbank.nrw.de statistikdaten.bayern.de (data retrieval API disabled) genesis.sachsen-anhalt.de (data retrieval API disabled) statistik.sachsen.de (API disabled) Note, access databases using package, need register respective website get personal login name password. registration free.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"wiesbaden - Access Databases from the Federal Statistical Office of Germany","text":"can install package directly CRAN: install latest version Github using:","code":"install.packages(\"wiesbaden\") remotes::install_github(\"sumtxt/wiesbaden\", force=TRUE)"},{"path":"https://sumtxt.github.io/wiesbaden/index.html","id":"usage","dir":"","previous_headings":"","what":"Usage","title":"wiesbaden - Access Databases from the Federal Statistical Office of Germany","text":"package helps retrieving data cubes used construct data tables available csv files via web application database. data cubes long format data tables much easier process compared csv files. details use package: Getting Started wiesbaden. package also helps importing German municipality register files via function read_gv100(). information see help file function. Users wish work csv files might find download_csv() read_header_genesis() package helpful. former can used automate downloads latter facilitates importing downloaded files. Users might also wish check R package destatiscleanr github.com/cutterkom/destatiscleanr.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/index.html","id":"faq","dir":"","previous_headings":"","what":"FAQ","title":"wiesbaden - Access Databases from the Federal Statistical Office of Germany","text":"package work proxy? Yes. Set proxy globally calling package command, e.g.:","code":"httr::set_config(httr::use_proxy( \"your.proxy\", port = 1234, auth = \"basic\")) data <- retrieve_data(tablename=\"14111KJ002\", genesis=c(db=\"regio\"))"},{"path":"https://sumtxt.github.io/wiesbaden/index.html","id":"similar-and-complementary-packages","dir":"","previous_headings":"","what":"Similar and Complementary Packages","title":"wiesbaden - Access Databases from the Federal Statistical Office of Germany","text":"R package destatiscleanr github.com/cutterkom/destatiscleanr provides functions help importing csv files downloaded via web application. R package restatis correlaid.github.io/restatis/ provides similar functions access genesis.destatis.de. R package bonn github.com/sumtxt/bonn provides functions retrieve data INKAR database maintained Federal Office Building Regional Planning (BBSR) Bonn. R package AGS github.com/sumtxt/ags provides functions work Amtlicher Gemeindeschlüssel (AGS), e.g. construct time series statistics Germany’s municipalities districts. Python packages github.com/WZBSocialScienceCenter/gemeindeverzeichnis rohablog.wordpress.com/2011/11/22/gv100-parser-python/ provide functions read GV100 format. node.js package https://github.com/yetzt/node-gv100json provides functions read GV100 format. Python package github.com/pudo/regenesis provides function bulk download data regionalstatistik.de.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/download_csv.html","id":null,"dir":"Reference","previous_headings":"","what":"Download the csv-file of a table — download_csv","title":"Download the csv-file of a table — download_csv","text":"download_csv() downloads csv table","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/download_csv.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Download the csv-file of a table — download_csv","text":"","code":"download_csv( tablename, startyear = \"\", endyear = \"\", ..., genesis_db = \"de\", save = TRUE )"},{"path":"https://sumtxt.github.io/wiesbaden/reference/download_csv.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Download the csv-file of a table — download_csv","text":"tablename name table retrieve. startyear retrieve values years equal larger startyear. Default: \"\". endyear retrieve values years smaller equal endyear. Default: \"\". ... parameters supplied URL parameter GENESIS database call genesis_db name database (default: 'de'). save write string text file (default: TRUE)","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/download_csv.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Download the csv-file of a table — download_csv","text":"Downloads csv file either working directory getwd() outputs string. alternative approach retrieve_*() functions. designed https://www-genesis.destatis.de/genesis/online require login. might work expected databases.","code":""},{"path":[]},{"path":"https://sumtxt.github.io/wiesbaden/reference/download_csv.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Download the csv-file of a table — download_csv","text":"","code":"if (FALSE) { download_csv(\"12411-0004.csv\") }"},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_gv100.html","id":null,"dir":"Reference","previous_headings":"","what":"Reads the DESTATIS GV100 Format — read_gv100","title":"Reads the DESTATIS GV100 Format — read_gv100","text":"GV100 format used DESTATIS publish German municipality register","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_gv100.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Reads the DESTATIS GV100 Format — read_gv100","text":"","code":"read_gv100(file, stzrt, version = NULL, encoding = \"iso-8859-1\", ...)"},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_gv100.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Reads the DESTATIS GV100 Format — read_gv100","text":"file path file stzrt integer select administrative level (see details) version GV100 version. NULL version guessed based file name. encoding encoding file ... parameters passed read_fwf","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_gv100.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Reads the DESTATIS GV100 Format — read_gv100","text":"data.frame.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_gv100.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Reads the DESTATIS GV100 Format — read_gv100","text":"Gemeindeverzeichnis (municipality register) published fixed width file refered \"GV1000 ASCII Format\" DESTATIS. register features list municipality higher order administrative units. function wrapper around read_fwf. two types files: One feature administrative information (version=\"AD\") one non-administrative (version=\"NAD\"). version=NULL, read_gv100() guess type based file name. select particular administrative unit use stzrt argument (Satzart). AD version, following choices possible: 10 - Länder (states) 20 - Regierungsbezirke 30 - Regionsdaten (Baden-Württemberg) 40 - Kreise (counties) 50 - Gemeindeverbandsdaten 60 - Gemeinden (municipalities) NAD version : 41 - Kreise (counties) 61 - Gemeinden (municipalities) Since 2019, Gemeindeverzeichnis using UTF-8 encoding rather ISO-8859-1. See also DESTATIS Website: GV-ISys","code":""},{"path":[]},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_gv100.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Reads the DESTATIS GV100 Format — read_gv100","text":"","code":"if (FALSE) { d <- read_gv100(\"GV100NAD31122016.asc\", stzrt=60) }"},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_header_genesis.html","id":null,"dir":"Reference","previous_headings":"","what":"Read Header of a GENESIS csv — read_header_genesis","title":"Read Header of a GENESIS csv — read_header_genesis","text":"read_header_genesis reads header GENESIS csv.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_header_genesis.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read Header of a GENESIS csv — read_header_genesis","text":"","code":"read_header_genesis( ..., start, lines = 2, readr_locale = locale(encoding = \"windows-1252\"), replacer = NULL, clean_letters = TRUE )"},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_header_genesis.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read Header of a GENESIS csv — read_header_genesis","text":"... arguments read_csv2 start number first line header lines number header lines readr_locale definition locale() passed read_csv2() replacer vector used first K column-names clean_letters make proper variable names? (default: TRUE) locale default encoding 'windows-1252'","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_header_genesis.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read Header of a GENESIS csv — read_header_genesis","text":"vector column names.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_header_genesis.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Read Header of a GENESIS csv — read_header_genesis","text":"generate valid column names, function replaces special characters (e.g. German öüä) ASCII letters removes whitespaces. Multi-line headers joined separated '_'.","code":""},{"path":[]},{"path":"https://sumtxt.github.io/wiesbaden/reference/read_header_genesis.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read Header of a GENESIS csv — read_header_genesis","text":"","code":"if (FALSE) { library(readr) download_csv(tablename=\"12411-0004\") d <- read_header_genesis('12411-0004.csv', start=6, replacer=c(\"STAG\")) data <- read_csv2('12411-0004.csv', skip=6, n_max=30-6+1, na=\"-\", locale=locale(encoding=\"windows-1252\") ) colnames(data) <- d }"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieves Data from GENESIS Databases — retrieve_data","title":"Retrieves Data from GENESIS Databases — retrieve_data","text":"retrieve_data retrieves single data table.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieves Data from GENESIS Databases — retrieve_data","text":"","code":"retrieve_data( tablename, startyear = \"\", endyear = \"\", regionalmerkmal = \"\", regionalschluessel = \"\", sachmerkmal = \"\", sachschluessel = \"\", sachmerkmal2 = \"\", sachschluessel2 = \"\", sachmerkmal3 = \"\", sachschluessel3 = \"\", inhalte = \"\", genesis = NULL, language = \"de\", ... )"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieves Data from GENESIS Databases — retrieve_data","text":"tablename name table retrieve. startyear retrieve values years equal larger startyear. Default: \"\". endyear retrieve values years smaller equal endyear. Default: \"\". regionalmerkmal key Regionalklassifikation. See details information. Default: \"\". regionalschluessel retrieve values particular regional units. See details information. Default: \"\". sachmerkmal, sachmerkmal2, sachmerkmal3 key Sachklassifikation. Default: \"\". sachschluessel, sachschluessel2, sachschluessel3 value Sachklassifikation. Default: \"\". inhalte retrieve selected variables. Default retrieve . genesis authenticate user set database (see ). language retrieve information German \"de\" (default) English \"en\" available. ... arguments send httr::GET request.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_data.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieves Data from GENESIS Databases — retrieve_data","text":"data.frame. Value variables (_val) come three additional variables (_qual, _lock, _err). exact nature variables unknown, _qual appears indicate _val valid value. _qual==\"e\" value _val valid _qual!=\"e\" (_qual = (\"-\",\"/\", \".\", \"x\", ... ) ) typically zero /might set NA.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Retrieves Data from GENESIS Databases — retrieve_data","text":"Use retrieve_datalist find tablename based table series interested . See package description (wiesbaden) details setting login database. parameter regionalschluessel can either single value (single Amtlicher Gemeindeschlüssel) comma-separated list values supplied string (whitespaces). Wildcard character \"*\" allowed. regionalschluessel set, parameter regionalmerkmal must also set GEMEIN, KREISE, REGBEZ, DLAND. logic applies parameter combination sachmerkmal sachschluessel*. parameter inhalte takes 1-6 character long name variable table. choosing multiple variables, delimit \",\", e.g. \"STNW01,STNW02\" (whitespaces). Limiting data request particular years (via *year parameters), geographical units (via regional* parameters) attributes (via sach* parameters) selected variables (via inhalte parameter) necessary API request fails return data. able download table size, inspect metadata first (using retrieve_metadata retrieve_valuelabel) limit data request accordingly. See also examples .","code":""},{"path":[]},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_data.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieves Data from GENESIS Databases — retrieve_data","text":"","code":"if (FALSE) { # Retrieve values for the table 14111KJ002 which contains the # federal election results on the county level. # Assumes that user/password are stored via save_credentials() data <- retrieve_data(tablename=\"14111KJ002\", genesis=c(db=\"regio\") ) # ... only the values for the AfD. data <- retrieve_data(tablename=\"14111KJ002\", sachmerkmal=\"PART04\", sachschluessel=\"AFD\", genesis=c(db=\"regio\") ) # ... or only values from Saxony data <- retrieve_data(tablename=\"14111KJ002\", regionalmerkmal=\"KREISE\", regionalschluessel=\"14*\", genesis=c(db=\"regio\") ) # Limiting the number of data points is in particular important for # large tables. For example, this data request fails: data <- retrieve_data(tablename=\"33111GJ005\", genesis=c(db='regio')) # But after limiting the request to one year, the data is returned: data <- retrieve_data(tablename=\"33111GJ005\", genesis=c(db='regio'), startyear=2019, endyear=2019) # An alternative strategy is to only request a subset of the variables. # For example, this data request fails: data <- retrieve_data(\"12711GJ002\", genesis=c(db=\"regio\")) # But when requesting only one instead of all variables, the data is returned: data <- retrieve_data(\"12711GJ002\", inhalte=\"BEV081\", genesis=c(db=\"regio\")) # Example using the sachschluessel: Number of refugees from Afghanistan (ST423) # and Egypt (ST287) by district (Kreis) in 2022. data <- retrieve_data(\"12531KJ003\", startyear = 2022, endyear = 2022, sachmerkmal=\"STAAG5\", sachschluessel = \"ST423, ST287\", genesis=c(db='de')) }"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_datalist.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieves List of Tables from GENESIS Databases — retrieve_datalist","title":"Retrieves List of Tables from GENESIS Databases — retrieve_datalist","text":"retrieve_datalist retrieves list available data tables series.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_datalist.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieves List of Tables from GENESIS Databases — retrieve_datalist","text":"","code":"retrieve_datalist(tableseries, genesis = NULL, language = \"de\", ...)"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_datalist.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieves List of Tables from GENESIS Databases — retrieve_datalist","text":"tableseries name series tables retrieved. genesis authenticate user set database (see ). language retrieve information German \"de\" (default) English \"en\" available. ... arguments send httr::GET request.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_datalist.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieves List of Tables from GENESIS Databases — retrieve_datalist","text":"data.frame","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_datalist.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Retrieves List of Tables from GENESIS Databases — retrieve_datalist","text":"See package description (wiesbaden) details setting login database. retrieve list available data use tableseries=\"*\" combine wildcard character * prefix (see example).","code":""},{"path":[]},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_datalist.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieves List of Tables from GENESIS Databases — retrieve_datalist","text":"","code":"if (FALSE) { # Retrieves list of available tables for the table series 14111 # which contains the federal election results. # Assumes that user/password are stored via save_credentials() d <- retrieve_datalist(tableseries=\"14111*\", genesis=c(db=\"regio\") ) }"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_metadata.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieves Meta Data from GENESIS Databases — retrieve_metadata","title":"Retrieves Meta Data from GENESIS Databases — retrieve_metadata","text":"retrieve_metadata retrieves meta data.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_metadata.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieves Meta Data from GENESIS Databases — retrieve_metadata","text":"","code":"retrieve_metadata(tablename, language = \"de\", genesis = NULL, ...)"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_metadata.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieves Meta Data from GENESIS Databases — retrieve_metadata","text":"tablename name table retrieve. language retrieve information German \"de\" (default) English \"en\" available. genesis authenticate user set database (see ). ... arguments send httr::GET request.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_metadata.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieves Meta Data from GENESIS Databases — retrieve_metadata","text":"data.frame.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_metadata.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Retrieves Meta Data from GENESIS Databases — retrieve_metadata","text":"See package description (wiesbaden) details setting login database.","code":""},{"path":[]},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_metadata.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieves Meta Data from GENESIS Databases — retrieve_metadata","text":"","code":"if (FALSE) { # Meta data contain the explanations to the variable names for the table # federal election results on the county level. # Assumes that user/password are stored via save_credentials() metadata <- retrieve_metadata(tablename=\"14111KJ002\", genesis=c(db=\"regio\") ) }"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_valuelabel.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieves Value Labels from GENESIS Databases — retrieve_valuelabel","title":"Retrieves Value Labels from GENESIS Databases — retrieve_valuelabel","text":"retrieve_valuelabel retrieves value labels variable","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_valuelabel.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieves Value Labels from GENESIS Databases — retrieve_valuelabel","text":"","code":"retrieve_valuelabel( variablename, valuelabel = \"*\", genesis = NULL, language = \"de\", ... )"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_valuelabel.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieves Value Labels from GENESIS Databases — retrieve_valuelabel","text":"variablename name variable valuelabel \"*\" (default) retrieves value labels. genesis authenticate user set database (see ). language retrieve information German \"de\" (default) English \"en\" available. ... arguments send httr::GET request.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_valuelabel.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieves Value Labels from GENESIS Databases — retrieve_valuelabel","text":"data.frame.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_valuelabel.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Retrieves Value Labels from GENESIS Databases — retrieve_valuelabel","text":"See package description (wiesbaden) details setting login database.","code":""},{"path":[]},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_valuelabel.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieves Value Labels from GENESIS Databases — retrieve_valuelabel","text":"","code":"if (FALSE) { # Value labels contain for the variable 'PART04' in the table with the # federal election results on the county level. # Assumes that user/password are stored via save_credentials() metadata <- retrieve_valuelabel(variablename=\"PART04\", genesis=c(db=\"regio\") ) }"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_varinfo.html","id":null,"dir":"Reference","previous_headings":"","what":"Retrieves further information on a variable from GENESIS Databases — retrieve_varinfo","title":"Retrieves further information on a variable from GENESIS Databases — retrieve_varinfo","text":"retrieve_varinfo retrieves information.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_varinfo.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Retrieves further information on a variable from GENESIS Databases — retrieve_varinfo","text":"","code":"retrieve_varinfo(variablename, genesis = NULL, language = \"de\", ...)"},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_varinfo.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Retrieves further information on a variable from GENESIS Databases — retrieve_varinfo","text":"variablename name variable genesis authenticate user set database (see ). language retrieve information German \"de\" (default) English \"en\" available. ... arguments send httr::GET request.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_varinfo.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Retrieves further information on a variable from GENESIS Databases — retrieve_varinfo","text":"data.frame.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_varinfo.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Retrieves further information on a variable from GENESIS Databases — retrieve_varinfo","text":"See package description (wiesbaden) details setting login database.","code":""},{"path":[]},{"path":"https://sumtxt.github.io/wiesbaden/reference/retrieve_varinfo.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Retrieves further information on a variable from GENESIS Databases — retrieve_varinfo","text":"","code":"if (FALSE) { # Variable information 'AI2105' (Anteil der Empfänger von Arbeitslosengeld II im Alter # von 15 bis 24 Jahren an der Bevölkerung gleichen Alters) # Assumes that user/password are stored via save_credentials() metadata <- retrieve_varinfo(variablename=\"AI2105\", genesis=c(db=\"regio\") ) }"},{"path":"https://sumtxt.github.io/wiesbaden/reference/save_credentials.html","id":null,"dir":"Reference","previous_headings":"","what":"Saves database credentials — save_credentials","title":"Saves database credentials — save_credentials","text":"save_credentials saves set database credentials using keyring package.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/save_credentials.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Saves database credentials — save_credentials","text":"","code":"save_credentials(db, user, password)"},{"path":"https://sumtxt.github.io/wiesbaden/reference/save_credentials.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Saves database credentials — save_credentials","text":"db database name, either 'nrw', 'regio', 'de' 'bm'. user user name. password password.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/save_credentials.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Saves database credentials — save_credentials","text":"User/password stored Keychain macOS, Credential Store Windows Secret Service API Linux. user/password pair database already exists, silently replaced new pair. function relies keyring package.","code":""},{"path":[]},{"path":"https://sumtxt.github.io/wiesbaden/reference/test_login.html","id":null,"dir":"Reference","previous_headings":"","what":"Tests Login in GENESIS Databases — test_login","title":"Tests Login in GENESIS Databases — test_login","text":"test_login tests login works.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/test_login.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Tests Login in GENESIS Databases — test_login","text":"","code":"test_login(genesis = NULL, ...)"},{"path":"https://sumtxt.github.io/wiesbaden/reference/test_login.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Tests Login in GENESIS Databases — test_login","text":"genesis authenticate user set database (see ). ... arguments send httr::GET request.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/test_login.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Tests Login in GENESIS Databases — test_login","text":"string server return message.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/test_login.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Tests Login in GENESIS Databases — test_login","text":"","code":"if (FALSE) { test_login(genesis=c(db=\"regio\") ) }"},{"path":"https://sumtxt.github.io/wiesbaden/reference/wiesbaden-package.html","id":null,"dir":"Reference","previous_headings":"","what":"Client to access the data from the Federal Statistical Office, Germany — wiesbaden-package","title":"Client to access the data from the Federal Statistical Office, Germany — wiesbaden-package","text":"Data retrieval client Federal Statistical Office Germany","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/wiesbaden-package.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Client to access the data from the Federal Statistical Office, Germany — wiesbaden-package","text":"authenticate, supply vector user name, password, database shortcut (\"regio\", \"de\", \"nrw\", \"bm\") argument genesis parameter whenever call retrieve_* function: c(user=\"-username\", password=\"-password\", db=\"database-shortname\") Alternatively, store credentials computer using save_credentials function. function relies keyring package. Available databases regionalstatistik.de (shortname: \"regio\"), landesdatenbank.nrw.de (\"nrw\"), www-genesis.destatis.de (\"de\") bildungsmonitoring.de (\"bm\").","code":""},{"path":"https://sumtxt.github.io/wiesbaden/reference/wiesbaden-package.html","id":"author","dir":"Reference","previous_headings":"","what":"Author","title":"Client to access the data from the Federal Statistical Office, Germany — wiesbaden-package","text":"Moritz Marbach moritz.marbach@tamu.edu","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-1210-2024-07-22","dir":"Changelog","previous_headings":"","what":"Version 1.2.10 (2024-07-22)","title":"Version 1.2.10 (2024-07-22)","text":"read_gv100() now uses stri_encode() instead iconv(). seems work better recent DESTATIS files.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-129-2022-01-17","dir":"Changelog","previous_headings":"","what":"Version 1.2.9 (2022-01-17)","title":"Version 1.2.9 (2022-01-17)","text":"CRAN release: 2023-02-17 Removed tidyverse package suggest","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-128-2022-12-17","dir":"Changelog","previous_headings":"","what":"Version 1.2.8 (2022-12-17)","title":"Version 1.2.8 (2022-12-17)","text":"CRAN release: 2022-12-18 New Parameter inhalte retrieve_data Revised help files include tips dealing large tables","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-126-2022-02-14","dir":"Changelog","previous_headings":"","what":"Version 1.2.6 (2022-02-14)","title":"Version 1.2.6 (2022-02-14)","text":"Fixed bug read_gv100() let error reading UTF-8 files Allow save credentials databases Bavaria Saxony-Anhalt","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-125-2022-01-03","dir":"Changelog","previous_headings":"","what":"Version 1.2.5 (2022-01-03)","title":"Version 1.2.5 (2022-01-03)","text":"CRAN release: 2022-01-03 Add connection databases Bavaria Saxony-Anhalt","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-124-2021-03-15","dir":"Changelog","previous_headings":"","what":"Version 1.2.4 (2021-03-15)","title":"Version 1.2.4 (2021-03-15)","text":"CRAN release: 2021-04-20 Change TestService_2010 options supply sachmerkmal Fixed bugs","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-123-2020-06-17","dir":"Changelog","previous_headings":"","what":"Version 1.2.3 (2020-06-17)","title":"Version 1.2.3 (2020-06-17)","text":"CRAN release: 2020-06-18 Fixed bug using regionalschluessel parameter retrieve_data() Revised vignette.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-122-2020-02-14","dir":"Changelog","previous_headings":"","what":"Version 1.2.2 (2020-02-14)","title":"Version 1.2.2 (2020-02-14)","text":"CRAN release: 2020-02-15 Allow switch language German English. Allow supply sachmerkmal sachschluessel parameter Revised help files.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-121-2020-01-26","dir":"Changelog","previous_headings":"","what":"Version 1.2.1 (2020-01-26)","title":"Version 1.2.1 (2020-01-26)","text":"CRAN release: 2020-01-26 Fixed bug leads keyring fail trying retrieve credentials Windows machine. Fixed bugs package documentation/vignette. Anticipating DESTATIS API changes February, increase default value 25000 number retrievable value labels via retrieve_valuelabel().","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-120-2019-10-14","dir":"Changelog","previous_headings":"","what":"Version 1.2.0 (2019-10-14)","title":"Version 1.2.0 (2019-10-14)","text":"CRAN release: 2019-11-10 Database usernames passwords now stored securely via keyring package instead file root directory.","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-111-2019-10-14","dir":"Changelog","previous_headings":"","what":"Version 1.1.1 (2019-10-14)","title":"Version 1.1.1 (2019-10-14)","text":"Allow retrieve 2500 value labels using retrieve_valuelabel() (instead 500)","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-110-2019-10-13","dir":"Changelog","previous_headings":"","what":"Version 1.1.0 (2019-10-13)","title":"Version 1.1.0 (2019-10-13)","text":"Added vignette revised documentation functions. read_header_genesis() uses stri_trans_general() non-ASCII character replacement dplyr dependency removed reduced number dependencies Code read_gv100() rewritten using base functions","code":""},{"path":"https://sumtxt.github.io/wiesbaden/news/index.html","id":"version-100","dir":"Changelog","previous_headings":"","what":"Version 1.0.0","title":"Version 1.0.0","text":"First release","code":""}]