Air Justice Lab is a community air monitoring and educational initiative based at NATURE Lab and serving the greater Capital Region.
This repository archives historical air quality data (stored in the data
directory) and scripts for archiving via the PurpleAir API (stored in the scripts
directory.
Each day a GitHub Actions workflow runs node scripts/load.js
to incrementally load historical sensor data and new data. And then the same workflow runs node scripts/index.js
and node scripts/analyze.js
to produce data/time-series.csv
, visualized below.
- Run
npm install
- Copy
.env.example
to.env
and replacePURPLEAIR_API_KEY
- Run
npm start
The file data/sensors.csv
has a list of Air Justice Lab affiliated PurpleAir sensors.
id
- PurpleAir sensor IDname
- the public sensor namestart
- date/time of earliest recordsend
- date/time of most recent records
Each sensor's historical records are stored in data/sensor-[id]
folders. Batches of records are stored in files named sensor-[id]-[start timestamp]-[end timestamp].csv
.
id
- PurpleAir sensor IDtime_stamp
- Unix epoch timestamppm2.5_alt_a
- PM 2.5 ALT cf=3 channel Apm2.5_alt_b
- PM 2.5 ALT cf=3 channel Bpm2.5_atm_a
- PM 2.5 ATM channel Apm2.5_atm_b
- PM 2.5 ATM channel Bpm2.5_cf_1_a
- PM 2.5 CF1 channel Apm2.5_cf_1_b
- PM 2.5 CF1 channel Btemperature
- degrees Fahrenheithumidity
- relative percentage humiditypressure
- pressure in Millibars
Combined readings from all sensors over the last 7 days is available in data/time-series.csv
.
Sensor columns are sorted numerically by ID.
Time
- date/time in ISO 8601 format (UTC timezone)North Central Troy #1 (87173)
- 10 minute averaged AQI readingsSouth Troy #2 (149970)
- 10 minute averaged AQI readingsRensselaer #6 (151502)
- 10 minute averaged AQI readingsCohoes (156051)
- 10 minute averaged AQI readingsCohoes #17 (156171)
- 10 minute averaged AQI readingsCohoes (164327)
- 10 minute averaged AQI readingsCohoes #15 (164351)
- 10 minute averaged AQI readingsRensselaer #10 (166327)
- 10 minute averaged AQI readingsLansingburgh #8 (166331)
- 10 minute averaged AQI readingsCohoes #14 (166371)
- 10 minute averaged AQI readingsStephentown #22 (166653)
- 10 minute averaged AQI readings
Source: PurpleAir
Source: PurpleAir