Back to all courses

Survey Analytics in R

From questionnaire to KPIs: tidy survey pipelines

Self-paced Intermediate 5 weeks Work at your own pace Start anytime 1200 Taka
Request access

By the end of this course you will be able to

  • Turn a raw survey export into a clean, labelled, analysis-ready dataset.
  • Recode scales, derive indices, and handle multi-response questions correctly.
  • Apply design and post-stratification weights, and understand what each one fixes.
  • Produce weighted estimates with correct standard errors using the survey and srvyr packages.
  • Build banner tables and track KPIs across survey waves.
  • Automate a recurring survey report so a new wave is one command, not a week of work.

Prerequisites

  • Comfortable with dplyr and the pipe.
  • Able to read data into R and write a basic script.
  • Some exposure to survey or questionnaire data is helpful but not required.
  • The R for Data Analysis course covers everything assumed here.

Tools you will use

  • R and RStudio
  • haven and labelled for SPSS and Stata files
  • survey and srvyr for weighted analysis
  • gt or flextable for tables
  • Quarto for automated reporting

Week by week

Module 1

From questionnaire to dataset

  • How questionnaire structure shows up in the data file.
  • Reading SPSS and Stata exports with haven; keeping value labels intact.
  • Working with labelled vectors instead of stripping labels away.
  • Reading and using a codebook.
  • Single response, multi response and grid questions.

Deliverable: A documented import script and a variable inventory for a sample survey.

Module 2

Cleaning and recoding

  • Validating responses: ranges, skip patterns, straightlining.
  • Treating Don’t know and Refused separately from genuine missing.
  • Recoding Likert scales; collapsing to top box and net scores.
  • Deriving composite indices.
  • Reshaping multi-response questions into a usable form.

Deliverable: A reusable cleaning pipeline with checks that fail loudly on bad input.

Module 3

Weighting and complex designs

  • Why unweighted survey means are usually wrong.
  • Design weights, non-response adjustment and post-stratification.
  • Raking to known population margins.
  • Declaring a design with srvyr::as_survey_design(); strata, clusters, PSUs.
  • Design effects and effective sample size.
  • Trimming extreme weights, and the trade-off involved.

Deliverable: A weighted dataset with a short note justifying the weighting scheme.

Module 4

Analysis and KPIs

  • Weighted means, proportions and quantiles with correct standard errors.
  • Crosstabs and banner tables by demographic breaks.
  • Significance testing on survey data, and why the naive test is wrong.
  • Wave on wave tracking: what actually counts as a real change.
  • Formatting output tables with gt or flextable.

Deliverable: A banner table and a KPI tracker across two waves.

Module 5

Automated reporting

  • Parameterised Quarto reports: one template, one report per market or segment.
  • Wrapping your analysis in functions so it survives the next wave.
  • Exporting to Excel and PowerPoint for stakeholders who expect them.
  • A lightweight dashboard for recurring numbers.
  • Project structure that a colleague can pick up without you.

Deliverable: A parameterised report that regenerates end to end from a fresh data file.

Assessment

  • Module exercises with worked solutions.
  • A final project: take a supplied raw survey through to an automated report.
  • Optional written feedback on the final project by request.

How the self-paced course works

All materials, datasets and worked solutions are available from the start. Work through the modules in order at whatever pace suits you; the exercises build on each other.

Questions

Email before enrolling if you want to check whether your current R level is enough for this course.