Doing Economics in Julia
Working through CORE Econ’s empirical projects, one at a time
Doing Economics is CORE Econ’s set of fourteen empirical projects, each built on a real dataset. It ships walk-throughs in Excel, R, Google Sheets, and Python — not Julia. This is the Julia version.
Each project page follows the book’s structure: every Part, every numbered question, with the Julia code and a written answer. Results are checked against the book’s published solutions.
Two departures:
- The analysis follows the book; some charts don’t. Where the book’s chart form misleads — the dual-axis temperature/CO₂ chart in Project 1 — this uses one that doesn’t, with a note saying why. The numbers are unchanged.
- Live data moves. NASA GISS reissues its series monthly, so figures differ from the published solutions in the last decimal. Each page states its data vintage;
data/MANIFEST.tomlrecords the checksum.
Projects
| # | Project | Status |
|---|---|---|
| 1 | Measuring climate change | Done |
| 2 | Collecting and analysing data from experiments | Done |
| 3 | Measuring the effect of a sugar tax | Done |
| 4 | Measuring wellbeing | Done |
| 5 | Measuring inequality: Lorenz curves and Gini coefficients | Done |
| 6 | Measuring management practices | Done |
| 7 | Supply and demand | Done |
| 8 | Measuring the non-monetary cost of unemployment | Done |
| 9 | Credit-excluded households in a developing country | Done |
| 10 | Characteristics of banking systems around the world | Done |
| 11 | Measuring willingness to pay for climate change mitigation | Done |
| 12 | Government policies and popularity: Hong Kong cash handout | Done |
| 13 | Extra 1: Female labour supply and the macroeconomy | Planned |
| 14 | Extra 2: The politics of carbon taxation | Done |
Getting started
Setup covers installing Julia, instantiating the environment, and fetching the data. In short:
git clone https://github.com/nehalahmedshaikh/doing-economics
cd doing-economics
julia --project=. -e 'using Pkg; Pkg.instantiate()'
julia --project=. scripts/fetch_data.jl 1
quarto render projects/01-measuring-climate-change/index.qmdAlso here
- R → Julia — what each R idiom from the walk-throughs becomes in Julia, and where the two genuinely differ.
- Technical reference — the statistical measures, with the conventions used here.
Credit and licensing
The projects, questions, and published solutions are the work of CORE Econ and remain their copyright. This repository restates the tasks in its own words and links to the source pages. The Julia code and prose are MIT-licensed.
The data
The datasets are included in the repository under data/raw/ (39 MB), so the projects run offline. Licensing was checked per file before redistributing: most are public domain or CC BY. data/MANIFEST.toml records the publisher, licence, checksum and vintage of every file.
Credit to the publishers: NASA GISS and NOAA (climate), CORE Econ and Herrmann, Thöni & Gächter (public goods experiment), the UNC Global Food Research Program and Silver et al. (Berkeley sugar tax), the UN Statistics Division (national accounts), UNDP (Human Development Report), the World Bank (development indicators), Our World in Data (health and education), the Global Consumption and Income Project (income distribution), the European Values Study (life satisfaction), and the Central Statistical Agency of Ethiopia with the World Bank LSMS-ISA (the Ethiopian Socioeconomic Survey), and the World Bank Global Financial Development Report team (banking systems).
Two of those are the reason the data is committed rather than fetched. The GCIP site has been taken over by an unrelated operation, and the GFDD June 2017 file is still linked from the World Bank’s own page but returns a 404. Both copies here came from the Internet Archive, and both are now the only reliable ones.