Downloads and reads dataset identified by
Unzips if necessary, but only loads CSV files, otherwise returns the path to the downloaded file.
Converts types of columns where known, e.g. value columns to numeric.
1 2 3 4 5 6
a character. Found in the czso_id column of data frame returned by
character. Directory in which downloaded files will be stored.
If left unset, will use the
integer. Whether to redownload data source file even if already cached. Defaults to FALSE.
integer. Order of resource in resource list for the given dataset. Defaults to 1, the normal value for CZSO datasets.
CZSO provides its open data as tidy data, so each row only contains one value
hodnota column and the remaining columns give details on how
that value is defined. See "Included columns" below on how these work.
The schema of the dataset is not yet used, so some columns may be mistyped and are by default returned as character vectors.
The range of columns present in the output varies from one dataset to another, so the package does not attempt to provide English-language names for the known subset, as that would result in a jumble of Czenglish.
Instead, here is a guide to some of the common column names you will encounter:
idhod: a unique ID of the value in the CZSO databse. This does not allow
you to link to any other (meta)data as far as I know, but it does provide unique
identification should you need it.
hodnota: the value.
stapro_kod: code of the statistic/indicator/variable as listed.
in the SMS UKAZ register (https://www.czso.cz/csu/czso/statistical-variables-indicators);
this one has Czech-English documentation - access this by clicking the UK flag top right.
You can also get a data table with the definitions, if you search for
"statistické proměnné" in
title field of the catalogue. Last I checked, the ID of this table was
rok denotes year as YYYY.
ctvrtleti denotes quarter if available.
Other metadata will come in the form
column holds the Czech text name for the category. The
_cis column holds the
ID of the codelist (register) you need to decode the code in
The English codelists are at http://apl.czso.cz/iSMS/en/cislist.jsp,
Czech ones at http://apl.czso.cz/iSMS/cs/cislist.jsp.
You can find the Czech-language codelists in the catalogue retrieved with
czso_get_catalogue(), where their IDs begin with
"cis" followed by the number; the English ones can also be retrieved from
the link above using a permalink URL.
More conveniently, you can use the
czso_get_codelist() function to retrieve the codelist.
Units are denoted in a separate column.
A helper on common breakdowns with their associated columns:
NAs in "breakdown" columns (e.g. gender or age) denote the total.
a tibble, or vector of file paths if file is not CSV or if there are multiple files in the dataset. See Details on the columns contained in the tibble
Do not use this for harvesting datasets from CZSO en masse.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.