Doing Economics in Julia
  • Home
  • Setup
  • R → Julia
  1. Getting started
  2. Overview
  • Getting started
    • Overview
    • Setup
  • Empirical projects
    • 1. Measuring climate change
    • 2. Data from experiments
    • 3. Measuring a sugar tax
    • 4. Measuring wellbeing
    • 5. Measuring inequality
    • 6. Management practices
    • 7. Supply and demand
    • 8. Cost of unemployment
    • 9. Credit-excluded households
    • 10. Banking systems
    • 11. Willingness to pay
    • 12. Hong Kong cash handout
    • Extra 2. Carbon taxation
  • Reference
    • R → Julia
    • Technical reference

On this page

  • Projects
  • Getting started
  • Also here
  • Credit and licensing
  • The data
  • View source
  • Report an issue
  1. Getting started
  2. Overview

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.toml records 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.qmd

Also 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.

Setup
Source Code
---
title: "Doing Economics in Julia"
subtitle: "Working through CORE Econ's empirical projects, one at a time"
engine: markdown
---

[*Doing Economics*](https://books.core-econ.org/doing-economics/index.html) 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.toml` records the checksum.

## Projects

| # | Project | Status |
|---|---------|--------|
| 1 | [Measuring climate change](projects/01-measuring-climate-change/index.qmd) | Done |
| 2 | [Collecting and analysing data from experiments](projects/02-data-from-experiments/index.qmd) | Done |
| 3 | [Measuring the effect of a sugar tax](projects/03-sugar-tax/index.qmd) | Done |
| 4 | [Measuring wellbeing](projects/04-measuring-wellbeing/index.qmd) | Done |
| 5 | [Measuring inequality: Lorenz curves and Gini coefficients](projects/05-measuring-inequality/index.qmd) | Done |
| 6 | [Measuring management practices](projects/06-management-practices/index.qmd) | Done |
| 7 | [Supply and demand](projects/07-supply-and-demand/index.qmd) | Done |
| 8 | [Measuring the non-monetary cost of unemployment](projects/08-unemployment-cost/index.qmd) | Done |
| 9 | [Credit-excluded households in a developing country](projects/09-credit-excluded/index.qmd) | Done |
| 10 | [Characteristics of banking systems around the world](projects/10-banking-systems/index.qmd) | Done |
| 11 | [Measuring willingness to pay for climate change mitigation](projects/11-willingness-to-pay/index.qmd) | Done |
| 12 | [Government policies and popularity: Hong Kong cash handout](projects/12-hong-kong-handout/index.qmd) | Done |
| 13 | Extra 1: Female labour supply and the macroeconomy | Planned |
| 14 | [Extra 2: The politics of carbon taxation](projects/14-carbon-taxation/index.qmd) | Done |

## Getting started

[Setup](setup.qmd) covers installing Julia, instantiating the environment, and fetching the
data. In short:

```bash
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.qmd
```

## Also here

- [**R → Julia**](reference/r-to-julia.qmd) — what each R idiom from the walk-throughs becomes
  in Julia, and where the two genuinely differ.
- [**Technical reference**](reference/technical-reference.qmd) — the statistical measures, with
  the conventions used here.

## Credit and licensing

The projects, questions, and published solutions are the work of
[CORE Econ](https://www.core-econ.org) 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.

Code MIT-licensed. Projects and solutions © CORE Econ.

 
  • View source
  • Report an issue

Built with Quarto and Julia.