CSPS 2021 Response Rate Tracker
This repo contains the code to generate, and the resulting webpage, of the high-level response rates for the 2021 Civil Service People Survey.
The data is processed in R, the site is built with Hugo using the govuk-hugo theme.
LICENCE
The R code in this repository (files under the R directory) are licensed under the MIT Licence, see R/LICENSE
.
The content published in the output documents is published under the Open Government Licence v3.0.
Data
No data files are tracked in this repo - data should be stored on your local machine in the (R/data
) folder and backed up to shared drive.
Dependencies
You will need:
- R
- The {qualtRics} package and set up your credentials for the Qualtrics API
- The {govukhugo} package
Workflow
- If you need to re-process headcounts use the file
1_process_headcounts.R
, this requires an export of the Qualtrics hierarchy to be stored inR/data/raw_hierarcy
- Use the file
2_get_responses.R
to download the latest response data, this will download raw output toR/data/qualtrics_raw
and process the response rates to create a daily output of response rates by organisation and a a tally of overall responses by day. - Run
govukhugo::build_hugo()
to process the Rmarkdown and build the site.
If interactively processing the Rmd file you will need to manually set the data_dir
variable in the conosle to ../data
or R/data
depending on how RStudio chooses to process the chunk you are working in.