Back to APIs list
US Congress Stock Trading API examples & templates
Use these vals as a playground to view and fork US Congress Stock Trading API examples and templates on Val Town. Run any example below or find templates that can be used as a pre-built solution.
nowcastPMAqi
@santiesteban
Script
Cloned from russbiggs to learn how to use val.town
US EPA Particulate Matter NowCast AQI (Air Quality Index) Algorithm
The US EPA generally uses 24 hours periods of data to calculate AQI.
To calculate AQI at an hourly scale the NowCast algorithm is a more appropriate choice
Algorithm explained more fully at: https://observablehq.com/@openaq/epa-pm-nowcast
inputs an array of measurements values of particulate matter
returns an NowCast air quality index number between 0-500
0 to 50 Good
51 to 100 Moderate
101 to 150 Unhealthy for Sensitive Groups
151 to 200 Unhealthy
201 to 300 Very Unhealthy
301 to 500 Hazardous
nowcastPMAqi
@russbiggs
Script
US EPA Particulate Matter NowCast AQI (Air Quality Index) Algorithm
The US EPA generally uses 24 hours periods of data to calculate AQI.
To calculate AQI at an hourly scale the NowCast algorithm is a more appropriate choice
Algorithm explained more fully at: https://observablehq.com/@openaq/epa-pm-nowcast
inputs an array of measurements values of particulate matter
returns an NowCast air quality index number between 0-500
0 to 50 Good
51 to 100 Moderate
101 to 150 Unhealthy for Sensitive Groups
151 to 200 Unhealthy
201 to 300 Very Unhealthy
301 to 500 Hazardous