Exports a FOKUS survey dataset generated via TODO to the private FOKUS repository.
Usage
export_survey_data(
data,
lang = NULL,
merged = NULL,
auth_token = pal::pkg_config_val("token_repo_private")
)
Arguments
- data
FOKUS survey dataset. A tibble.
- lang
Language. Either
NULL
to read the language fromdata
'sfokus_lang
attribute or one of"de"
or"en"
.- merged
Whether or not
data
is a merged dataset, i.e. one that includes the data from all ballot dates that were covered by FOKUS surveys up until the most recentballot_date
contained indata
. See section Merged data below for details.If
NULL
, a merged dataset is assumed ifdata
covers multipleballot_date
s.- auth_token
Personal access token of a gitlab.com account with access to the private FOKUS repository.
Merged data
Merged datasets differ from single-ballot-date datasets in two ways:
Column labels (the
label
attribute) are ballot-date-independent, i.e. do not include proposal or election names, and in case of question rewordings over time, the very latest question wording of all FOKUS surveys in that canton is used (which might have been introduced only afterballot_date
). So be aware that the questions in the labels do not necessarily correspond to the actual questions asked in the FOKUS survey forballot_date
.Variables whose factor levels vary across ballot dates, such as those capturing skill questions, are converted to type character. Be aware that these variables usually aren’t really comparable over time.
See also
Other data export functions:
export_easyvote_municipalities()
,
export_print_recipients()
,
export_qr_codes()
,
export_qstnr()
,
write_private_file()