Datasets
The data files the slides read, where each one comes from, and how it was prepared
The decks read their data from materials/data/. Every file there is a cleaned extract; the scripts that produced them are in data-raw/, next to a note on the source. The raw downloads themselves are not in the repository. The .rds files open in R with readr::read_rds() or readRDS().
Several examples use datasets shipped with R packages rather than files; those are listed at the end.
Files in materials/data
Provenance
Nutrition surveys (Congo, Brazil, Burkina Faso)
Individual food consumption surveys shared through the FAO/WHO GIFT platform (Global Individual Food consumption data Tool). Prepared by congo-consumption.R, brazil-food-consumption.R and burkin-faso-consumption.R: the consumption file is joined to the subject file and summed to daily intake per subject.
The contributors ask to be acknowledged whenever the data or its derivatives are presented:
- Burkina Faso (BFA-00001): Institut de Recherche pour le Développement (IRD); Institut de Recherche en Sciences de la Santé (IRSS); HarvestPlus, International Food Policy Research Institute (IFPRI), 2016, “The 2010 Food consumption and iron status survey in two provinces of rural Burkina Faso”, doi:10.7910/DVN/5CXCLX.
- Democratic Republic of the Congo (COD-00091): University of Colorado School of Medicine, Anschutz Medical Campus and their collaborators in Kinshasa; Sud-Ubangi, Democratic Republic of the Congo; 2014/2016; Women First Dietary Recall Data.
congo-consumption.R reads the Congo consumption file but joins it to the Burkina Faso subject file (line 14 of the script). The country and region columns of congo-nutrition.rds therefore read “Burkina Faso” and its provinces, and the subject attributes (sex, age, weight, height) come from that survey too, while the nutrient columns are from the Congo survey. The slides use only the nutrient columns.
World income distribution
Lakner and Milanovic’s global income distribution, as made available to Our World in Data and published on Max Roser’s website. The data up to 2008 accompany Lakner and Milanovic (2015), Global Income Distribution: From the Fall of the Berlin Wall to the Great Recession, World Bank. The JSON series were saved from the website’s console and parsed by income-distribution.R; the six yearly folders of raw series are in data-raw/income-distribution/.
WHO child growth standards
The length/height-for-age z-score expanded tables for boys and girls from the WHO Child Growth Standards, stacked by who.R.
UN World Population Prospects
Population on 1 January by single age and sex, medium variant, from the UN World Population Prospects 2022, filtered to 1960, 1990 and 2020 by un-population.R. The raw download was too large to keep.
The Datasaurus Dozen
From Matejka and Fitzmaurice (2017), Same Stats, Different Graphs (Autodesk Research), via Alberto Cairo’s Download the Datasaurus.
CFC-11 at Mauna Loa
Monthly mean CFC-11 (F11) mixing ratios by station from the NOAA Global Monitoring Laboratory’s HATS programme, gml.noaa.gov.
Not in the repository
Two files the decks read are deliberately excluded by the .gitignore:
materials/data/poverty-population.csv, a country-level extract of extreme poverty rates and population used for the weighted-mean example in Week 1, Part 2. The slide credits Our World in Data and the World Bank’s Poverty and Inequality Platform.data-raw/uganda-poject/Uganda_B_E_agri and nutrition 04.06.2018.sav, the baseline and endline survey of the Uganda nutrition project used for the scatter-plot section of Week 3 (Jordan et al., 2022, Foods 11(3):344, doi:10.3390/foods11030344).uganda-poject.Rexplores its variable dictionary.
Two further scripts in data-raw/ are not used by any deck: read-geojson.R (parses SO_geojson_2020_A.json) and summarystata.R (helper for cleaning skimr summaries). The progressa/ folder holds a PROGRESA extract with a variable list, taken from a public replication repository, and cambodia/ a pointer to a PLOS ONE article; neither is read by the current decks.
Datasets from R packages
| Dataset | Package | Used in |
|---|---|---|
penguins |
palmerpenguins | Week 3: bi-variate data, scatter plots, correlation matrix |
UN11 |
alr4 | Week 3: correlation and causation (life expectancy and fertility) |
RiceFarms |
plm | Week 3: rice yields and fertiliser; Week 7: production function |
sleep |
base R (datasets) |
Week 5: one-sample t-test |
gomez.splitsplit |
agridat | Week 6: t-test recap |
fuel2001 |
alr4 | Week 6: multiple regression example |
MinnLand |
alr4 | Week 7: hedonic land prices |
The sampling, confidence-interval and simple-regression sections simulate their populations in the slides themselves, with fixed seeds.