Skip to contents

Generates the questionnaire tibble, the Markdown questionnaire and optionally a CSV, an HTML and an XLSX version of it, and writes all of them to path and optionally uploads them to a Google Drive folder.

Usage

export_qstnr(
  qstnr_tibble,
  path,
  verbose = FALSE,
  incl_csv = TRUE,
  incl_html = TRUE,
  incl_xlsx = incl_html,
  upload_to_g_drive = FALSE,
  g_drive_folder = "fokus/aargau/Umfragen/Dateien für Umfrageinstitut/Fragebogen/"
)

Arguments

qstnr_tibble

Questionnaire tibble as returned by gen_qstnr_tibble().

path

Path to the directory to write the generated questionnaire files to. A character scalar.

verbose

Whether or not to print detailed progress information during questionnaire generation and Google Drive file upload. Note that questionnaire generation takes considerably more time when this is set to TRUE.

incl_csv

Whether or not to also generate and export a CSV version of the questionnaire.

incl_html

Whether or not to also generate and export an HTML version of the questionnaire.

incl_xlsx

Whether or not to also generate and export an XLSX version of the questionnaire.

upload_to_g_drive

Whether or not to upload the generated files to the Google Drive folder g_drive_folder.

g_drive_folder

Google Drive folder to upload the generated files to. Ignored if upload_to_g_drive = FALSE.

Value

path, invisibly.

Details

The generated files are named according to the scheme {ballot_date}_{canton}.{ext}, so if the qstnr_tibble of the 2018-09-23 survey in the canton of Aargau is input, the following files will be written to path by default:

  • 2018-09-23_aargau.csv

  • 2018-09-23_aargau.html

  • 2018-09-23_aargau.md

  • 2018-09-23_aargau.xlsx