Skip to content

Commit

Permalink
eu color scale and breakpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
russbiggs committed Aug 19, 2024
1 parent e130cc5 commit 9503522
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 6 deletions.
31 changes: 31 additions & 0 deletions docs/data/eu/breakpoints.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
ISO,variant,category,hex,category_lower,category_upper,pollutant,units,averaging_period,concentration_lower,concentration_upper
EU,,Good, #50f0e6,1,,PM2.5,ug/m3,24,0,10
EU,,Good, #50f0e6,1,,PM10,ug/m3,24,0,20
EU,,Good, #50f0e6,1,,O3,ug/m3,1,0,50
EU,,Good, #50f0e6,1,,SO2,ug/m3,1,0,100
EU,,Good, #50f0e6,1,,NO2,ug/m3,1,0,40
EU,,Fair,#50ccaa,2,,PM2.5,ug/m3,24,10.1,20
EU,,Fair,#50ccaa,2,,PM10,ug/m3,24,20.1,40
EU,,Fair,#50ccaa,2,,O3,ug/m3,1,50.1,100
EU,,Fair,#50ccaa,2,,SO2,ug/m3,1,100.1,200
EU,,Fair,#50ccaa,2,,NO2,ug/m3,1,40.1,90
EU,,Moderate,#f0e641,3,,PM2.5,ug/m3,24,20.1,25
EU,,Moderate,#f0e641,3,,PM10,ug/m3,24,40.1,50
EU,,Moderate,#f0e641,3,,O3,ug/m3,1,100.1,130
EU,,Moderate,#f0e641,3,,SO2,ug/m3,1,200.1,350
EU,,Moderate,#f0e641,3,,NO2,ug/m3,1,90.1,120
EU,,Poor,#ff5050,4,,PM2.5,ug/m3,24,25.1,50
EU,,Poor,#ff5050,4,,PM10,ug/m3,24,50.1,100
EU,,Poor,#ff5050,4,,O3,ug/m3,1,130.1,240
EU,,Poor,#ff5050,4,,SO2,ug/m3,1,350.1,500
EU,,Poor,#ff5050,4,,NO2,ug/m3,1,120.1,230
EU,,Very poor,#960032,5,,PM2.5,ug/m3,24,50.1,75
EU,,Very poor,#960032,5,,PM10,ug/m3,24,100.1,150
EU,,Very poor,#960032,5,,O3,ug/m3,1,240.1,380
EU,,Very poor,#960032,5,,SO2,ug/m3,1,500.1,750
EU,,Very poor,#960032,5,,NO2,ug/m3,1,230.1,340
EU,,Extremely poor,#7d2181,6,,PM2.5,ug/m3,24,75.1,800
EU,,Extremely poor,#7d2181,6,,PM10,ug/m3,24,150.1,1200
EU,,Extremely poor,#7d2181,6,,O3,ug/m3,1,380.1,800
EU,,Extremely poor,#7d2181,6,,SO2,ug/m3,1,750.1,1250
EU,,Extremely poor,#7d2181,6,,NO2,ug/m3,1,800.1,1000
28 changes: 23 additions & 5 deletions docs/indices/eu.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,38 @@ Note that the AQI map provided by the European Environment Agency depicts the ai

## Color scale

```js

import {breakpointsTable} from "../components/table.js";
import { parseBreakpointsCsv, tableReshape, colorScaleReshape } from '../utils/utils.js';
import { colorScale } from '../components/color-scale.js';

const breakpoints = await FileAttachment('../data/eu/breakpoints.csv').text();
const data = parseBreakpointsCsv(breakpoints);

```

The European Air Quality Index is comprised of six categories:

_Note_: Adapted from “European Air Quality Index," (n.d.), [airindex.eea.europa.eu/AQI/index.html](https://airindex.eea.europa.eu/AQI/index.html)[^2]. Accessed 23 July 2024.
```js
colorScale(colorScaleReshape(data, false))
```

_Note_: Adapted from “European Air Quality Index," (n.d.), [airindex.eea.europa.eu/AQI/index.html](https://airindex.eea.europa.eu/AQI/index.html)[^2]. Accessed 23 July 2024.

## Methods

NO<sub>2</sub>, O<sub>3</sub>, and SO<sub>2</sub> use hourly concentrations, while PM<sub>2.5</sub> and PM<sub>10</sub> use 24-hour running means for the previous 24 hours when calculating the European Air Quality Index. A 24-hour running mean is calculated if there is corresponding data for at least 18 hours out of the previous 24. There are no rounding conventions stated for concentration or sub-index values.

Using the breakpoint concentration table below, a sub-index is determined for each pollutant with provided data. The overall European Air Quality Index for a station corresponds to the poorest sub-index of that station.

(breakpoint table)
_Note_: Adapted from European Air Quality Index" (n.d.), [airindex.eea.europa.eu/AQI/index.html](https://airindex.eea.europa.eu/AQI/index.html)[^2]. Accessed 23 July 2024.
```js
breakpointsTable(data, false)
```

_Note_: Adapted from European Air Quality Index" (n.d.), [airindex.eea.europa.eu/AQI/index.html](https://airindex.eea.europa.eu/AQI/index.html)[^2]. Accessed 23 July 2024.

Note: We have assumed a convention of rounding to one significant figure to avoid overlapping limit values within the breakpoint concentration table. This was used to determine the lower limit as the map released by the European Union to provide public information uses pollutant concentrations to one significant figure [^2].
Note: We have assumed a convention of rounding to one significant figure to avoid overlapping limit values within the breakpoint concentration table. This was used to determine the lower limit as the map released by the European Union to provide public information uses pollutant concentrations to one significant figure [^2].

Air quality measurements that exceed the upper bound of the ‘extremely poor’ category are not taken into account as they are typically found to be erroneous [^2].

Expand All @@ -47,7 +65,7 @@ CAMS provides forecasts of pollutants up to 4 days in advance based on the regio

Baran, Paulina. “Guidelines for the demonstration and subtraction of exceedances attributable to natural sources.” European Commission, [circabc.europa.eu/ui/group/cd69a4b9-1a68-4d6c-9c48-77c0399f225d/library/dfbc1f99-f763-4a14-aff8-a8c597a65103/details](https://circabc.europa.eu/ui/group/cd69a4b9-1a68-4d6c-9c48-77c0399f225d/library/dfbc1f99-f763-4a14-aff8-a8c597a65103/details).

“European air quality forecast plots.” Copernicus Atmosphere Monitoring Service,
“European air quality forecast plots.” Copernicus Atmosphere Monitoring Service,
[atmosphere.copernicus.eu/european-air-quality-forecast-plots](https://atmosphere.copernicus.eu/european-air-quality-forecast-plots).

“European Air Quality Index.” European Environment Agency, [airindex.eea.europa.eu/AQI/index.html](https://airindex.eea.europa.eu/AQI/index.html).
Expand Down
4 changes: 3 additions & 1 deletion docs/indices/finland.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ The Finnish Air Quality Index uses a five-level color scale:
```js
colorScale(colorScaleReshape(data))
```
_Note_: Adapted from “Air Quality Index” (n.d.), [https://en.ilmatieteenlaitos.fi/air-quality-index](https://en.ilmatieteenlaitos.fi/air-quality-index)[^2]. Accessed July 2, 2024.

_Note_: Adapted from “Air Quality Index” (n.d.), [https://en.ilmatieteenlaitos.fi/air-quality-index](https://en.ilmatieteenlaitos.fi/air-quality-index)[^2]. Accessed July 2, 2024.

## Methods

The Finnish Air Quality Index uses sub-indices assigned to each of the measured compounds. The highest sub-index determines the overall AQI of the station [^3]. The index is an hourly index based on hourly values and updated every hour [^2].
Expand Down

0 comments on commit 9503522

Please sign in to comment.