Setup
Julia, Quarto, and the data
1. Install Julia
Use juliaup, the official version manager, rather than a bare Julia install — it handles updates and lets you pin a version per project.
winget install --id Julialang.Juliaup -e --source wingetThis comes from winget’s default source, so no Microsoft Store account is involved.
curl -fsSL https://install.julialang.org | shThen open a new terminal — the installer edits PATH, and the shell you ran it in won’t have picked that up:
julia --version # 1.12.x
juliaup status2. Install Quarto
Project pages are .qmd files: prose with Julia code cells, rendered by Quarto’s native Julia engine.
winget install --id Posit.Quarto -e --source wingetDownload the installer from quarto.org/docs/get-started, or on macOS brew install --cask quarto.
Check that the Julia engine can start. The first run installs QuartoNotebookRunner into a private environment that Quarto owns, so it won’t touch this project’s dependencies or your global one:
quarto --version # 1.10.x
quarto check julia3. Instantiate the environment
Manifest.toml is committed, so this resolves to the exact package versions the published figures were produced with:
git clone https://github.com/nehalahmedshaikh/doing-economics
cd doing-economics
julia --project=. -e 'using Pkg; Pkg.instantiate()'The first run downloads and precompiles the stack — CairoMakie is the slow part, expect a few minutes. Subsequent runs are fast.
Confirm the shared helpers work:
julia --project=. -e 'using Pkg; Pkg.test()'4. The data is already there
The datasets are committed under data/raw/ — 7.9 MB — so there is no download step. Clone and the projects run offline.
This is deliberate rather than lazy. Project 5’s upstream, the Global Consumption and Income Project site, has been taken over by an unrelated operation; the copy in this repository came from a pre-takeover Internet Archive capture and is the only reliable one left. Any project that depends on a live URL is one dead link from breaking.
data/MANIFEST.toml is the provenance record — publisher, licence, SHA-256 and vintage for each file. To check your working copy against it:
julia --project=. scripts/verify_data.jl # all of them
julia --project=. scripts/verify_data.jl 1 # just project 1Some sources are reissued over time — NASA GISS revises its whole temperature record monthly, the World Bank revises continuously. To pull current versions:
julia --project=. scripts/fetch_data.jl # refresh everything
julia --project=. scripts/fetch_data.jl 1 # refresh project 1The script enforces the checksum on sources marked frozen and reports drift on the rest, so you can see what moved. Numbers on the rendered pages come from the vintages recorded in the manifest; refreshing may shift them in the last decimal place.
5. Render
quarto render # whole site into docs/
quarto render projects/01-measuring-climate-change/index.qmd # one project
quarto preview # live-reloading serverComputed output is cached in _freeze/, which is committed. That is what lets the site build in CI without the datasets present — useful given the gated sources above. To force a project to actually re-run, delete its folder under _freeze/ first.
Working on this in an editor
For VS Code, install the Julia and Quarto extensions. The Quarto extension runs individual cells against a persistent Julia session, which avoids paying CairoMakie’s startup cost on every edit.