JLM Air Quality Analysis
April 28, 2026 · View on GitHub
Visualisation and methodology repository for the Jerusalem-Air-Quality-Shabbat Hugging Face dataset. The dataset itself is the data; this repo holds the analysis layer on top of it: halachic time-window relabeling, comparison against secular control cities (London and New York), and the chart set.
The hypothesis
Jerusalem has an unusually strong weekly traffic cycle. Many streets in Shabbat-observant neighbourhoods empty out between candle-lighting on Friday and tzeit hakochavim on Saturday. The same is true (more universally) on the biblical chagim where driving is prohibited, and most starkly on Yom Kippur, when traffic effectively ceases nationwide — including among the non-observant.
If anthropogenic emissions drive a meaningful fraction of urban air pollution, the halachic calendar should produce a periodic, predictable dip in traffic-derived pollutants (NO, NO₂, NOx). Comparing the magnitude of that dip against the milder weekend cycle in secular cities lets us isolate the "Shabbat-as-natural-experiment" effect from the generic "weekend dip" seen in any city.
Headline result
NO₂ off-day vs workweek, median across stations, same 12-month window (2025-04-28 → 2026-04-28):
| City | Off-day definition | Workweek definition | NO₂ % change |
|---|---|---|---|
| Jerusalem | Shabbat (candle-lighting → tzeit, exact) | Sun–Thu daytime | −62 % |
| New York | Sat + Sun | Mon–Fri | −31 % |
| London | Sat + Sun | Mon–Fri | −20 % |
Jerusalem's Shabbat NO₂ drop is roughly 2× New York's weekend drop and 3× London's. The same direction holds for NO and NOx; PM2.5 is a far weaker and noisier signal in all three cities; ozone moves the opposite way (it rises slightly on off-days everywhere, consistent with reduced NOx scavenging).

Halachic time-window labeling
The source HF dataset already contains coarse calendar-based flags
(is_friday, is_shabbat derived from day-of-week). For this analysis those
flags are superseded by exact halachic windows derived from
Hebcal using Jerusalem coordinates and customs
(40-minute candle-lighting offset; tzeit hakochavim for end-of-Shabbat /
end-of-chag).
scripts/relabel.py walks the Hebcal candle-lighting and havdalah events,
pairs them into closed windows, classifies each window by memo, and writes
data/readings_labeled.parquet with these flags:
| Flag | Window |
|---|---|
is_shabbat | candle-lighting → havdalah, weekly Shabbatot only |
is_yom_tov | onset → conclusion of biblical chagim with driving prohibition (incl. Yom Kippur) |
is_yom_kippur | exact YK window — broken out, since YK is the cleanest natural experiment in the year |
is_pre_shabbat | 2 hours before candle-lighting — captures the erev-Shabbat shopping rush |
is_post_havdalah | 2 hours after havdalah — captures the post-Shabbat rebound |
Plus a derived segment column that resolves these flags into a single
mutually-exclusive bucket (weekday, pre_shabbat, shabbat,
post_havdalah, yom_tov, yom_kippur) for clean grouping.
Chol HaMoed is intentionally not flagged — driving is permitted on those days, so they are indistinguishable from weekdays for the traffic hypothesis.
The 12-month window contains 50 Shabbatot, 9 Yom Tov windows, and 1 Yom
Kippur — all from the Hebcal export at
hebcal-jerusalem-2025-04_to_2026-04.json in the source repo.
Cross-city control
Control data was pulled from OpenAQ for the same window
(hourly cadence, included in the source repo under data/openaq/):
- London: 3 stations (locations 148, 154, 155) — NO₂, O₃, PM10, PM2.5, SO₂, plus CO at 154/155
- New York: 4 stations (384, 626, 857, 1122) — NO₂, NOx, NO, CO, O₃, PM10, PM2.5, SO₂
Because the secular weekly cycle is a different rhythm to Jerusalem's, the control cities use their own segmentation:
| City | Workweek | Off-days |
|---|---|---|
| Jerusalem | Sun–Thu | Shabbat (exact halachic window); Yom Tov / Yom Kippur reported separately |
| London | Mon–Fri | Sat + Sun |
| New York | Mon–Fri | Sat + Sun |
The cross-city headline metric — off-day % change vs workweek — is computed using each city's own convention. This is the apples-to-apples comparison: "what happens when residents are on their conventional rest days?" The size of that delta is the interesting cross-city quantity.
NO₂ values were converted from ppb (Jerusalem source) to µg/m³ (OpenAQ convention, 1 ppb ≈ 1.88 µg/m³ at 25 °C, 1 atm) for the overlay charts.
Figures
All figures live in figures/ and are regenerated by
python scripts/generate_figures.py.
Jerusalem panels
01_jerusalem_hour_of_day.png— NOx / NO₂ / PM2.5 hourly curves, workweek vs Friday vs Shabbat, 12-station median02_jerusalem_segment_bars.png— Per-station % change vs workweek baseline, for every halachic segment (NOx)03_jerusalem_dow_hour_heatmap.png— NOx by day-of-week × hour-of-day; the canonical "Saturday hole" image04_jerusalem_yom_kippur.png— 72-hour line plot bracketing Yom Kippur 2025, NOx / NO₂ / PM2.505_jerusalem_pm_paradox.png— NOx falls on Shabbat; PM2.5 doesn't (and at calendar-day resolution often rises). Twin-panel weekly curve06_jerusalem_friday_split.png— Friday's intermediate signal concentrates in the afternoon (pre-Shabbat block)07_jerusalem_segment_distribution.png— Box plot of NOx by halachic segment, all stations pooled
Cross-city control
08_cross_city_no2_weekly.png— NO₂ day-of-week curve for Jerusalem / London / New York, overlaid09_cross_city_offday_drop.png— Headline: off-day vs workweek % change, three cities, NO₂ + PM2.5 + O₃
Reproduction
# 1. Halachic relabel (reads source parquet + Hebcal JSON)
python scripts/relabel.py
# 2. Build London + NYC tidy parquet from OpenAQ JSONs
python scripts/build_controls.py
# 3. Generate all figures + the cross-city CSV
python scripts/generate_figures.py
Source-data paths are hard-coded to a local clone of
Air-Quality-Shabbat
at /home/daniel/repos/github/my-repos/Air-Quality-Shabbat. Adjust the
SOURCE_REPO constants at the top of each script if the layout differs on
another machine.
Dependencies: pandas, pyarrow, numpy, matplotlib. No statsmodels or
seaborn — kept deliberately light.
Caveats
- 12 months of data means Shabbat samples coincide with whatever weather and dust events happened on those 50 Saturdays. Saharan dust intrusions in spring 2026 inflate PM2.5 on a handful of Saturdays and partly explain why the PM signal is weak/flipped.
- "Weekday baseline" excludes Yom Tov and Yom Kippur hours, but does not control for meteorology, seasonality, or year-over-year trend — a meteorology-residualised version is the obvious next step.
- The pre-Shabbat 2-hour and post-Havdalah 2-hour windows are heuristic; the true "rush in" and "rush out" durations probably vary by season and neighbourhood.
- East Jerusalem stations (notably Rockefeller Museum / 568) carry traffic that does not observe Shabbat — they show the smallest drop, which is itself a useful internal control.
Citation and sources
- Air quality (Jerusalem): Israeli Ministry of Environmental Protection (המשרד להגנת הסביבה) —
https://air.sviva.gov.il/ - Air quality (London / New York): OpenAQ
- Halachic times: Hebcal (Jerusalem coords, 40-min candle-lighting offset, tzeit hakochavim for havdalah)
- Source dataset:
danielrosehill/Jerusalem-Air-Quality-Shabbaton Hugging Face
License
Analysis code: MIT. Figures and the labeled parquet: CC-BY-4.0, matching the upstream HF dataset license. Underlying air-quality measurements remain attributable to the original sources above.