From 9503522abb2d273b2217ac05b164284df2a19ad2 Mon Sep 17 00:00:00 2001 From: Russ Biggs Date: Mon, 19 Aug 2024 17:21:30 -0600 Subject: [PATCH] eu color scale and breakpoints --- docs/data/eu/breakpoints.csv | 31 +++++++++++++++++++++++++++++++ docs/indices/eu.md | 28 +++++++++++++++++++++++----- docs/indices/finland.md | 4 +++- 3 files changed, 57 insertions(+), 6 deletions(-) diff --git a/docs/data/eu/breakpoints.csv b/docs/data/eu/breakpoints.csv index e69de29..6a724cd 100644 --- a/docs/data/eu/breakpoints.csv +++ b/docs/data/eu/breakpoints.csv @@ -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 \ No newline at end of file diff --git a/docs/indices/eu.md b/docs/indices/eu.md index 67b3589..bf3722f 100644 --- a/docs/indices/eu.md +++ b/docs/indices/eu.md @@ -14,9 +14,24 @@ 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 @@ -24,10 +39,13 @@ NO2, O3, and SO2 use hourly concentrations, whi 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]. @@ -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). diff --git a/docs/indices/finland.md b/docs/indices/finland.md index 782e167..7b673fb 100644 --- a/docs/indices/finland.md +++ b/docs/indices/finland.md @@ -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].