# SPECTRA Sample Datasets — Zimbabwe (dummy / training)

Synthetic GPS‑trajectory + exposure data for the **SPECTRA course**. All data is
**fabricated** for teaching — realistic in shape, not real measurements. Column
names are chosen so SPECTRA auto‑maps the fields on upload.

Cities: Gweru (near MSU), Harare, Bulawayo, Mutare. Dates: 13–15 Oct 2025
(hot season, so heat stress is meaningful). 6 participants × 3 days.

**Built‑in story (so results are interpretable):**
- **Indoor biomass cooking** → big PM2.5 spikes at ~06:00–07:00 and ~18:00–19:30.
- **Commuting on roads** → high NO₂ and roadside PM2.5 (in‑transport).
- **Midday outdoors** (market/lunch) → high **WBGT** heat stress.

## Files

| File | Use in course | Rows | Columns |
|------|---------------|------|---------|
| `gweru_pm25_quickstart.csv` | Lessons 3–5, first run | 201 | PID, datetime, lat, lon, **pm25** |
| `zim_spectra_master.csv` | Lessons 5–9, full demo | 3 618 | PID, datetime, lat, lon, pm25, no2, wbgt, air_temp_c, rel_humidity, heat_index_c, indoor_truth, micro_env, city |
| `zim_heatstress_harare.csv` | Heat‑stress exercise | 1 206 | PID, datetime, lat, lon, **wbgt**, air_temp_c, rel_humidity, heat_index_c, pm25, indoor_truth |
| `gweru_quality_labelled.csv` | Lesson 7 (Quality) | 1 206 | PID, datetime, lat, lon, pm25, no2, **indoor_truth** |

## Field mapping in SPECTRA

Auto‑detected: `lat→Latitude`, `lon→Longitude`, `PID→Person ID`,
`datetime→Date/Time`, `pm25→Exposure 1`, `no2→Exposure 2`,
`indoor_truth→Ground‑truth`.

**Heat‑stress dataset:** there is no automatic "WBGT" slot — after upload, set
**Exposure 1 = `wbgt`** (and optionally use **+ Add Exposure Variable** to add
`air_temp_c` or `heat_index_c`). `pm25` can stay as Exposure 2.

## Recommended run settings

- Grid size **100 m**, building buffer **5 m**, remove teleports **on**.
- Building source: **OSM auto‑fetch** is fine (no setup) since homes/works sit on
  real city coordinates; for speed use a local Microsoft/Overture file.

## What good results look like

- **Dashboard:** indoor cooking dominates the *time‑weighted* PM2.5 dose even
  though outdoor raw averages look higher.
- **Segmentation:** clear indoor / outdoor / in‑transport split (~42% transport
  points, plus home & work indoor, market outdoor).
- **Quality:** the `indoor_truth` column lets the confusion matrix / F1 score
  the indoor‑outdoor classifier.
- **Heat:** WBGT peaks midday outdoors (max ≈ 28 °C WBGT), low indoors.

## Regenerate

Generator script: `scratchpad/gen_zim_datasets.py` (seeded, reproducible).
Edit `PARTICIPANTS` / `DAYS` to add cities or days.

*Dummy data — do not use for analysis or publication.*
