The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

restatis

CRAN status R-CMD-check Codecov test coverage Lifecycle: experimental

restatis is a wrapper around the RESTful API that provides access to the three main databases of German official statistics:

All functions work on either one of them, on all of them or just on a selection.

Installation

You can install the released version of {restatis} from CRAN:

install.packages("restatis")

Or install the development version of {restatis} from GitHub with:

# install.packages("devtools")
devtools::install_github("CorrelAid/restatis")

Usage

Authentication

To 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). The Zensus 2022 database does support authentication with an API token as well.

Main features

{restatis} provides functions (prefixed with gen_) for finding, exploring, and retrieving data from the three supported APIs. See the “Basic restatis workflow” vignette for an overview of the main features of the package.

In a short overview, there are functions divided in two main parts, searching for (meta)data and retrieving data:

Searching for (meta)data

Retrieving data

Other functions

Caching

{restatis} uses memoisation to cache query results. This means that if you call a function multiple times with the same input, the values returned the first time are stored and reused from the second time.

Cached objects are stored in the memory and do not persist across R sessions.

Disclaimer

This 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 Destatis’ API. The package authors are in no way responsible for the data that can be retrieved using its functions. The license of this package solely applies to its source code.

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.