Vega-Lite starter notes

Each file in this directory is a stub: $schema and data are filled in, mark and encoding are not. Open ../index-vl.html from a server rooted at the repo root (see hw1.md for the python -m http.server command) and you’ll see nothing render until you fill them in — that’s expected.

These three views are static and independent. Unlike the D3 build, they do not link to each other. Build each against what you wrote in ../index.html, not against what was easiest to make Vega-Lite do.

A few facts about the data you’ll need, not design decisions to make:

  • data/world.json is TopoJSON. The country outlines are at objects.countries; each feature’s id is an ISO alpha-3 code (e.g. "USA"), matching the iso_code column in owid-covid.csv. To color countries by a COVID value, join the two with a lookup transform.
  • data/owid-covid.csv has per-country rows and per-continent rollup rows, distinguished by iso_code — continent rows use codes like OWID_AFR, OWID_ASI, OWID_EUR, etc. (iso_code starting with OWID_). Filter to the rows the chart in question actually needs.
  • total_cases_per_million has real missing values (blank cells) — decide, per your ../index.html, how each chart should represent that rather than letting Vega-Lite drop them silently.