SPECTRA
- Enrol and choose a password: spectra-enrol.html (already enrolled? check your status there).
- Sign in to the SPECTRA app with your enrolment email and password: portal.placealert.org/apex/
- Work through the lessons on this page.
- Take the final assessment: spectra-assessment.html. Score 80% or more and your certificate is issued straight away.
About this course
SPECTRA is the trajectory‑and‑exposure web app on the Place Alert Labs platform (the PALs Portal, from placealert.org → portal.placealert.org). It turns raw GPS tracks from wearables, phones, or low‑cost sensors into personal air‑pollution & heat exposure estimates by working out, point by point, where a person was, whether they were indoors or outdoors, how long they stayed, and how much they were exposed to there.
This course takes a non‑technical user from a raw CSV to a finished, publishable analysis, using only the buttons that exist in the live app. It mirrors SPECTRA's eight modules exactly.
Course map
| # | Lesson | App module | You will be able to… |
|---|---|---|---|
| 0 | Account & sign‑in | Login page | Register, verify email, log in |
| 1 | What SPECTRA does | concept | Explain the pipeline end‑to‑end |
| 2 | Preparing your data | off‑app | Build a CSV that maps first time |
| 3 | Load & map fields | Input & Configuration | Upload & map columns |
| 4 | Configure & run | Input & Configuration | Set parameters, choose buildings, run |
| 5 | Dashboard | Dashboard | Interpret exposure summaries |
| 6 | Maps & tracks | Geospatial & Tracks | Read points, tracks, grid cells |
| 7 | Quality | Quality Assessment | Read accuracy, precision, recall, F1 |
| 8 | Segmentation | Segmentation | Interpret micro‑environments |
| 9 | Export & sessions | Data & Export | Download CSV/GeoJSON/JSON + session |
| 10 | Troubleshooting | all | Fix the common failures |
Sample datasets — Zimbabwe
Synthetic GPS + exposure data for the exercises (fabricated for teaching, not real measurements). Column names auto‑map in SPECTRA. Built‑in story: indoor biomass cooking → PM2.5 spikes; commuting → NO₂; midday outdoors → WBGT heat stress.
Quick‑start · PM2.5
One participant, one day, PM2.5 only. Use for your first run (Lessons 3–5).
Download CSVMaster · all exposures
6 people × 3 days. PM2.5, NO₂, WBGT, temp, humidity, heat index + ground truth.
Download CSVHeat stress · WBGT
Harare participants with WBGT as the headline exposure. Map wbgt → Exposure 1.
wbgt (optionally + Add Exposure Variable for
air_temp_c / heat_index_c). See
datasets README.Getting an account & signing in
- Open SPECTRA at portal.placealert.org/apex/.
- On the dark login page click Sign up, enter email + password.
- Confirm via the verification email (check spam; ask a PALS admin if none arrives).
- Log in → you land on the SPECTRA home menu: seven module cards + About.
What SPECTRA actually does
CSV/GPS upload → Field mapping (lat? lon? person? time? exposure?) → Boundary filter (keep points in your study area) → Dwell time (how long at each point; remove "teleports") → Building footprints (OSM / Microsoft / Overture / custom) → Indoor / Outdoor classification (point-in-building + buffer + speed) → Micro-environment segmentation (indoor / outdoor / in-transport) → Grid aggregation (e.g. 100 m cells) → Daily summaries + dashboard + maps + quality metrics → Export
Key idea — time‑weighted exposure
SPECTRA weights each reading by how long the person dwelled there, so 8 hours indoors counts far more than a 2‑minute walk past a busy road. That is the “Personal Exposure” in the name.
Preparing your data
SPECTRA auto‑detects columns, but a clean file maps first time. One row per GPS point:
| Field | Required? | Auto‑detected names |
|---|---|---|
| Latitude (WGS‑84) | ✅ | lat, latitude |
| Longitude (WGS‑84) | ✅ | lon, lng, longitude |
| Person ID | ✅ | PID, participant, id |
| Date/Time | ✅ | datetime, timestamp, date |
| Exposure 1 (e.g. PM2.5) | ✅ (≥1) | pm25, pm2.5 |
| Exposure 2 (e.g. NO₂) | optional | no2 |
| Ground‑truth indoor/outdoor | optional | indoor_truth, label |
Rules that save time: decimal‑degree coordinates; one consistent timestamp
format; a real Person ID column (the engine batches per person); up to ~1 GB per file.
Also accepted: .rds, .geojson, .gpx (wearables),
or a direct CSV / published Google‑Sheet URL.
zim_spectra_master.csv and confirm each
required field exists and is clean.Load data & map fields · Input & Configuration
- From home click the Input & Configuration card.
- Section 1 · Data Input — pick the File Format toggle (CSV / RDS / GeoJSON / GPX / URL) and upload, or paste a URL and Load from URL.
- Section 2 · Field Mapping — confirm/fix the auto‑filled guesses: Coordinates (Lat, Lon), Identification (Person ID, Date/Time), Exposure Variables (map your pollutant to Exposure 1; + Add Exposure Variable for more), and the optional Ground‑truth.
.gpx from a wearable exposes heart rate / cadence / speed /
temperature — map any to an Exposure slot to analyse it like a pollutant.gweru_pm25_quickstart.csv and confirm
all five required fields map and the preview shows real data.Configure & run
| Parameter | Default | Controls |
|---|---|---|
| Grid size | 100 m | Map/aggregation cell size |
| Speed limit | 100–120 km/h | Flags impossible jumps (“teleports”) |
| Max dwell | 10–20 min | Caps a single stationary point |
| Building buffer | 5 m | Tolerance around building edges |
| Remove teleports | Yes | Drops GPS glitches |
| Exclude indoor | No | Optionally remove indoor points from grid |
Building source (for indoor/outdoor)
| Source | Speed | Notes |
|---|---|---|
| Microsoft Footprints | Fast (local) | Recommended; download for study area |
| Overture Maps | Fast (local) | Merged global sources |
| OSM auto‑fetch | Slow (API) | No setup; fine for the sample data |
| Custom GeoJSON/GPKG | Fast | Your own / government footprints |
Click Run. Large datasets process in per‑person batches; a progress indicator shows the stage, and the live map previews your points.
zim_spectra_master.csv with OSM
auto‑fetch; note the runtime.Reading the Dashboard
The Dashboard summarises the run: total points, participants, days, indoor‑vs‑outdoor share, and time‑weighted mean exposure per pollutant, with plotly charts. This is your headline result — note how indoor cooking dominates the PM2.5 dose.
Maps & trajectories · Geospatial & Tracks
Interactive Leaflet maps with switchable basemaps show classified points (indoor/outdoor), trajectory lines per person‑day, and grid cells shaded by exposure. Use them to sanity‑check classification and spot hotspots.
Quality Assessment
With a ground‑truth label, this module shows a confusion matrix plus accuracy, precision, recall, F1 for the indoor/outdoor classifier — use it to defend your method. No ground truth → informational only.
gweru_quality_labelled.csv, map
indoor_truth as Ground‑truth, and report accuracy and F1.Segmentation (micro‑environments)
Breaks each track into themes — typically indoor, outdoor, in‑transport — using building location, dwell time and speed. This is what lets you say “most of this person’s PM2.5 dose came from indoor cooking, not commuting.”
Exporting & saving sessions · Data & Export
Download classified points / grid cells / daily summaries as CSV, GeoJSON, or JSON, and a Session RDS snapshot of the whole analysis.
Troubleshooting & good practice
| Symptom | Likely cause | Fix |
|---|---|---|
| Fields won’t auto‑map | Odd names / coords as text | Rename; use decimal‑degree numbers |
| Everything reads “outdoor” | No buildings in area | Use Microsoft/Overture or custom footprints |
| Run is very slow | OSM over a big area | Use a local building file; narrow boundary |
| Points jump on the map | GPS glitches | Keep Remove teleports on; lower speed limit |
| Indoor over‑counted at edges | Buffer too large | Reduce building buffer from 5 m |
| No verification email | SMTP not configured | Contact a PALS admin |
Capstone project
Take one participant‑week from zim_spectra_master.csv and produce:
(1) time‑weighted mean exposure per pollutant, (2) a hotspot map, (3) an indoor‑vs‑transport
dose split, (4) a quality figure. Export everything plus a Session RDS and write a
one‑paragraph interpretation — that is a CHEAQI‑MNCH mini‑analysis.
Final assessment and certificate
When you have finished the lessons and the capstone, take the final assessment: 15 multiple-choice questions, pass mark 80%, up to 3 attempts in 24 hours. Passing issues your Place Alert Labs certificate straight away, with a QR code that anyone can scan to verify it.
Quick reference
- Always start at Input & Configuration → upload → map fields → run.
- Five required fields: Lat, Lon, Person ID, Date/Time, ≥1 Exposure.
- Faster & more accurate indoor/outdoor: use a local building footprint file.
- Reproducibility: export the Session RDS every time.
- Modules in order: Input → Dashboard → Geospatial → Quality → Segmentation → Export.