{"id":31565647,"url":"https://github.com/correlaid/restatis","last_synced_at":"2025-10-05T07:14:10.142Z","repository":{"id":54350262,"uuid":"473957909","full_name":"CorrelAid/restatis","owner":"CorrelAid","description":"R API Client for the Three Main Databases of German Official Statistics","archived":false,"fork":false,"pushed_at":"2025-09-28T09:51:29.000Z","size":2729,"stargazers_count":26,"open_issues_count":11,"forks_count":5,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-09-28T11:41:43.207Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://correlaid.github.io/restatis/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CorrelAid.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-03-25T10:05:50.000Z","updated_at":"2025-08-28T14:03:15.000Z","dependencies_parsed_at":"2025-07-17T23:47:19.334Z","dependency_job_id":"b8477cb7-f6a8-4eed-bdde-58bc500836a4","html_url":"https://github.com/CorrelAid/restatis","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":"CorrelAid/r-bare-template","purl":"pkg:github/CorrelAid/restatis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorrelAid%2Frestatis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorrelAid%2Frestatis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorrelAid%2Frestatis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorrelAid%2Frestatis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CorrelAid","download_url":"https://codeload.github.com/CorrelAid/restatis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CorrelAid%2Frestatis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277365235,"owners_count":25805839,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-28T02:00:08.834Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-05T07:14:09.204Z","updated_at":"2025-10-05T07:14:10.131Z","avatar_url":"https://github.com/CorrelAid.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n# restatis \u003cimg src=\"man/figures/hexsticker_restatis.png\" width=\"160px\" align=\"right\" /\u003e\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\"\n)\n```\n\n\u003c!-- badges: start --\u003e\n[![CRAN status](https://www.r-pkg.org/badges/version/restatis)](https://CRAN.R-project.org/package=restatis)\n[![R-CMD-check](https://github.com/CorrelAid/restatis/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/CorrelAid/restatis/actions/workflows/R-CMD-check.yaml)\n[![Codecov test coverage](https://codecov.io/gh/CorrelAid/restatis/graph/badge.svg)](https://app.codecov.io/gh/CorrelAid/restatis)\n[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)\n[![Awesome](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/sindresorhus/awesome)\n\u003c!-- badges: end --\u003e\n\n**{restatis}** is a wrapper around the RESTful APIs that provide access to the three main databases of German official statistics:\n\n- The [**GENESIS database** of the Federal Statistical Office of Germany (Destatis)](https://www-genesis.destatis.de/genesis/online),\n- [**regionalstatistik.de** which is the database of the German Länder (Regionaldatenbank)](https://www.regionalstatistik.de/genesis/online/),\n- The [database of the **German 2022 Census** (Zensus 2022)](https://ergebnisse.zensus2022.de/datenbank/online/).\n\nAlmost all functions work on either one of them, on all of them or just on a selection.\n\n#### Current (known) performance issues\n- The function `gen_download_job` currently does not work in the CRAN release version for the GENESIS database. This is because the mode of downloading the tables has changed. A fix has been deployed to the development version and will be coming with the next CRAN update.\n- It might be that the creation of jobs with `gen_table` is currently buggy in the release version (jobs not being created despite of `job = TRUE`). A fix has been deployed to the development version and will be coming with the next CRAN update.\n\n## Installation\n\nYou can install the released version of `{restatis}` from CRAN:\n\n``` r\ninstall.packages(\"restatis\")\n```\n\nOr install a development version of `{restatis}` from [GitHub](https://github.com/CorrelAid/restatis) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"CorrelAid/restatis\")\n```\n\n## Usage\n\n### Authentication\n\nTo access each one of the APIs, you need to have an account that you can create on the homepage (see links to them above) and store your username and password for use in R with `restatis::gen_auth_save()` (see `?gen_auth_save` for more details). \n\n**Note:** The GENESIS and Zensus 2022 databases do support authentication with an API token as well. You can set the token as credential by using setting the parameter `use_token = TRUE` for `restatis::gen_auth_save()`. The token itself can be found when logging into the respective webpage with your account and by clicking on *Webservice (API)* (EN) or *Webservice-Schnittstelle (API)* (DE) in the bottom left corner. **Important:** The GENESIS database will not let you create jobs when using API tokens to authenticate. This is why `{restatis}` will check your credential type once you set `job = TRUE` for `gen_table()` and error in case a token is used. To enable the use of jobs, use `gen_auth_save()` and input your username and password (by setting `use_token = FALSE`).\n\n### Main features\n\n{restatis} provides functions (prefixed with `gen_`) for finding, exploring, and retrieving data from the three supported APIs. See the [\"Basic restatis workflow\" vignette](https://correlaid.github.io/restatis/articles/restatis.html) for an overview of the main features of the package.\n\nIn short, there are functions divided in two main parts, searching for (meta)data and retrieving data:\n\n#### Searching for (meta)data\n- **gen_catalogue()**: Search the API's catalogue of data\n- **gen_find()**: Find objects related to a search term\n- **gen_metadata()**: Find meta data to an objects\n- **gen_alternative_terms()**: Find alternative terms to a search term\n- **gen_modified_data()**: Find out when an object has last been modified\n- **gen_objects2stat()**, **gen_objects2var()**, **gen_var2stat()**, **gen_val2var()**, **gen_val2var2stat()** and **gen_search_vars()**: Find objects, statistics, variables and values related to each other\n\n#### Retrieving data\n- **gen_cube()**: Using this function, you can download 'cube' objects\n- **gen_table()**: Using this function, you can download 'table' objects \n- **gen_list_jobs()** and **gen_download_job()**: Using this function, you can find and download previously created jobs (large tables)\n\n#### Other functions\n- **gen_logincheck()**: Perform a logincheck to test your credentials\n- **gen_signs()**: Get a list of quality signs (special characters) found in the API's tables\n- **gen_update_evas()**: Manually scrape a newer version of the EVAS numbers (official statistic IDs)\n\n### Caching\n\n`{restatis}` uses [**memoisation**](https://github.com/r-lib/memoise) to cache query results. This means that if you call a function multiple times with the same exact input, the values returned the first time are stored and reused from the second time on. Cached objects are stored in memory and do not persist across R sessions. With version 0.3.0, we have enabled users to turn off caching. The caching option is set to TRUE by default and can be changed by setting `options(restatis.use_cache = TRUE)` (or `FALSE`, respectively). You can get the current state of the option by using `getOption(\"restatis.use_cache\")`. **Note:** Memoisation is *never* used for the functions `gen_list_jobs()` and `gen_logincheck()` because there is no use-case for a cached version of the results of these functions (e.g., login checks should always be executed when called). \n\n## Disclaimer\n\nThis package is in no way affiliated with the German Federal Statistical Office (Destatis) or the 'Verbund Statistische Ämter des Bundes und der Länder'. It is a simple wrapper providing R functions to access different official statistics APIs. The package authors are in no way responsible for the data that can be retrieved using its functions and do not provide support for any problems arising from the APIs' functionality itself. Conversely, support for problems related to this package is **exclusively** provided by the package authors. The license of this package solely applies to its source code. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorrelaid%2Frestatis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcorrelaid%2Frestatis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcorrelaid%2Frestatis/lists"}