data wrangling for various environmental sensors
- clone from github
- install dependencies with
npm ci --omit=dev - assign the value of your Mapbox access token to the
MAPBOX_TOKENenvironment variable - start the server with
npm start - navigate a web browser to the url displayed at startup
- drag or pick data files to import
| variable | description | default |
|---|---|---|
| MAPBOX_TOKEN | Mapbox access token | none |
| HTTP_HOST | network interface to bind to | localhost |
| HTTP_PORT | TCP port to listen on | 0 (auto) |
| DB_PATH | location for SQLite database file | ./measurements.db |
- @robireton/chrono
- adm-zip
- better-sqlite3
- express
- express-fileupload
- express-handlebars
- serve-favicon
- uuid
- coordinates for measurements are interpolated (linear) from position data
- coordinates values are retained with enough precision to locate measurement within a few meters
- measurements are rounded to the nearest integer
- might work on Windows, but hasn’t been tested
Note: You must have updated your Flow App to at least version V1.2.0 (iOS) / V1.3.00 (Android)
You can export your entire data history right from the application! Follow these steps to have your Flow data sent right to your account email address. You'll receive a zip file containing a set of .csv files with your pollution measures, and a set with your GPS data. Every measure is timestamped and is expressed in Plume AQI and in ppb or µg/m³.
| timestamp | date | NO2 (ppb) | VOC (ppb) | pm 10 (ug/m3) | pm25 (ug/m3) | NO2 (Plume AQI) | VOC (Plume AQI) | pm 10 (Plume AQI) | pm 25 (Plume AQI) |
|---|---|---|---|---|---|---|---|---|---|
| 1540905674 | 2020-01-01 00:00:00 | 15.292587280273 | 4946 | 14 | 7 | 14 | 147 | 14 | 14 |
Please remember that your Flow data may contain GPS information so be careful about how you share it!
- measurements consisting of missing particulate matter values and zero NO₂ and VOC values are discarded
- only a single set of measurements for a given time and place are stored
- NO₂ and VOC measurements stored with units ppb (parts per billion)
- pm10, pm2.5 & pm1 measurements stored with units μg/m³ (micrograms per cubic meter)
- Important data files swap latitude and longitude values! We correct on import.
- data for different sensors are concatenated vertically in one CSV file
- measurements are stored per element, except
LEwhich is the total of all light elements - null measurements are skipped
- dates and times are assumed to be local time
- lines of data are very wide and look like:
| Instrument Serial Num | Reading # | Date | Time | Method Name | User Factor Name | Test Label | Collimation Status | Latitude | Longitude | Units |
|---|---|---|---|---|---|---|---|---|---|---|
| 803682 | 15 | 2021-05-05 | 13:19:29 | Geochem(2) | 15 | No | 39.251356377 | -84.451680306 | PPM |
Each line also has a series of columns for each element that look like:
| Mg Compound | Mg Compound Level | Mg Compound Error | Mg Concentration | Mg Error1s |
|---|---|---|---|---|
| 2070 | 101 |
The last column is info
