The Datasets
All four datasets used in Making Sense of Social Data, free to download, in CSV and in R format. Each one ships with a plain-text codebook, so a file you downloaded six months ago is never separated from the document that explains it.
All of this data is simulated. It was generated for teaching. Some tables use real country and place names, but no row describes an actual person, household, city, or country, and nothing here should be cited as a fact about the world. Appendix B of the book explains how each dataset was built and what it is for.
Download
The files are not up yet. The book is still in preparation and the datasets go online with it. The links below show exactly what will be here and under what names, so that a syllabus or a lab handout written now will still work later.
| Dataset | Unit of analysis | Files |
|---|---|---|
worldsim |
Countries |
CSV R Codebook |
cma_panel |
Metropolitan area × wave |
CSV R Codebook |
socsurvey |
Survey respondents |
CSV R Codebook |
censuspop |
People, within households |
CSV R Codebook |
pool |
People, within households |
CSV R Codebook |
The tables, if you would rather read than load
Appendix B of the book documents every dataset — what it contains, how it was built, and every variable with its permitted values. What it does not print is the rows themselves: in full they run to some sixty pages, and a table of two thousand rows is not something anyone reads on paper. Those tables are published here instead, laid out exactly as the appendix describes them.
If you are going to analyse the data rather than
read it, take the CSV or the .rds above instead. The PDF
is for looking something up, for checking a figure by hand, and for
printing the sampling pool so you can draw from it with a pencil.
What to know before you open a file
These conventions are the same ones the printed codebooks use, so what you see in a downloaded file means what the book says it means.
- Categories are stored as numbers. A variable
like
regionholds 1, 2, 3 rather than "Africa", "Asia", "Europe". The codebook gives the mapping, and the printed tables show the codes too. - Missing-value codes are left in place. The
sentinel codes 97, 98 and 99 are not converted to
NA. Recoding them is an exercise in several chapters, and doing it for you would remove the lesson. If you compute a mean without recoding them first, you will get a wrong answer that looks perfectly reasonable — which is the point. - Two variables come in two versions.
socsurveycarriesincome, complete for every respondent, and — in the download only —income_rep, the same variable with the pattern of refusals a real survey would have produced.worldsimdoes the same withginiandgini_rep. - Encoding is UTF-8, with one header row, no row names, and missing values written as empty.
Reading the files
# R — either format works; .rds preserves variable types exactly
socsurvey <- read.csv("socsurvey.csv")
socsurvey <- readRDS("socsurvey.rds")
In Excel or Google Sheets, open the .csv directly. In
SPSS, use File → Import Data → CSV Data.
The French files
The French edition ships the same data with two differences that matter if you mix the two sets up, so they are kept in a separate folder rather than side by side.
- The CSV uses the European convention: semicolon
as the separator and comma as the decimal mark, so
that the file opens as a table rather than as one mangled column in
a French-language Excel. Read it in R with
read.csv2(), notread.csv(). - Country names are in French. ISO country codes, Canadian province codes and metropolitan area names are not translated — a student joining this file to a real one needs those to match.
French files will be listed here once the French edition is published.
Replication code
Every dataset, every table and every figure in the book is generated by R, and the scripts are published so that you can see exactly how, change what you like, and check the book against its own data.
The archive contains the generating scripts, the verification scripts that fail the build if a dataset stops matching what the book says about it, and a README naming which script produces which table and figure.
Licence and attribution
The datasets and the R code are released under a Creative Commons Attribution 4.0 International licence (CC BY 4.0). Use them, change them, redistribute them, including commercially and in your own teaching materials — just credit the source.
Paradis, M. (2026). Making Sense of Social Data [Data set]. https://www.markparadispolitics.com/books/making-sense-of-social-data/online/data.html
My intention is that instructors elsewhere should be able to teach from this data without asking permission. The datasets exist to be used.
Something wrong with a file?
If a download is corrupt, a codebook disagrees with the data, or a variable does not behave as Appendix B says it should, tell me. A dataset that contradicts its own documentation is a bug, not a quirk.