Skip to content

Commit d6e696f

Browse files
authored
Release (#22)
* turkiye (#20) * costa rica (#19) * upgrade to framework 1.12.0 (#21)
1 parent 1d63b2f commit d6e696f

12 files changed

+420
-54
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Contributors must adhere to the OpenAQ [Code of Conduct](https://github.com/open
88

99
## Licensing
1010

11-
All contributions to this project will be licensed under the Creative Commons Attribution-ShareAlike (CC BY-SA) license. By submitting your work, you agree that your contributions will be freely available for others to use, modify, and share, as long as they attribute you and share any derivative works under the same license. This ensures that the project and any adaptations remain open and accessible to the community.
11+
All contributions to this project will be licensed under the Creative Commons Attribution-ShareAlike (CC BY-SA 4.0) license. By submitting your work, you agree that your contributions will be freely available for others to use, modify, and share, as long as they attribute you and share any derivative works under the same license. This ensures that the project and any adaptations remain open and accessible to the community.
1212

1313
## Style guide
1414

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ Contributions are welcome! See the [CONTRIBUTING.md](./CONTRIBUTING.md) guide fo
1616

1717
The source code for the repository is licensed under an MIT license, found at [LICENSE](./LICENSE).
1818

19-
All content (markdown files) in the docs directory is licensed CC BY SA, found at [LICENSE-content](./LICENSE-content).
19+
All content (markdown files) in the docs directory is licensed CC BY-SA 4.0, found at [LICENSE-content](./LICENSE-content).

docs/data/costa-rica/breakpoints.csv

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
ISO,variant,category,hex,category_lower,category_upper,pollutant,units,averaging_period,concentration_lower,concentration_upper
2+
CR,,Good,#02af4f,0,20,PM2.5,ug/m3,24,0,15
3+
CR,,Good,#02af4f,0,20,PM10,ug/m3,24,0,60
4+
CR,,Good,#02af4f,0,20,O3,ppm,8,0,0.055
5+
CR,,Good,#02af4f,0,20,NO2,ppm,1,0,0.105
6+
CR,,Good,#02af4f,0,20,SO2,ppm,24,0,0.065
7+
CR,,Good,#02af4f,0,20,CO,ppm,8,0,5.5
8+
CR,,Unfavorable for sensitive groups,#ffff00,21,40,PM2.5,ug/m3,24,15.1,40
9+
CR,,Unfavorable for sensitive groups,#ffff00,21,40,PM10,ug/m3,24,61,100
10+
CR,,Unfavorable for sensitive groups,#ffff00,21,40,O3,ppm,8,0.056,0.11
11+
CR,,Unfavorable for sensitive groups,#ffff00,21,40,NO2,ppm,1,0.106,0.21
12+
CR,,Unfavorable for sensitive groups,#ffff00,21,40,SO2,ppm,24,0.066,0.13
13+
CR,,Unfavorable for sensitive groups,#ffff00,21,40,CO,ppm,8,5.51,11
14+
CR,,Unhealthy,#ffa500,41,60,PM2.5,ug/m3,24,40.1,65
15+
CR,,Unhealthy,#ffa500,41,60,PM10,ug/m3,24,101,200
16+
CR,,Unhealthy,#ffa500,41,60,O3,ppm,8,0.111,0.165
17+
CR,,Unhealthy,#ffa500,41,60,NO2,ppm,1,0.211,0.315
18+
CR,,Unhealthy,#ffa500,41,60,SO2,ppm,24,0.131,0.195
19+
CR,,Unhealthy,#ffa500,41,60,CO,ppm,8,11.01,16.5
20+
CR,,Very Unhealthy,#ff0000,61,80,PM2.5,ug/m3,24,66,100
21+
CR,,Very Unhealthy,#ff0000,61,80,PM10,ug/m3,24,201,250
22+
CR,,Very Unhealthy,#ff0000,61,80,O3,ppm,8,0.166,0.22
23+
CR,,Very Unhealthy,#ff0000,61,80,NO2,ppm,1,0.316,0.42
24+
CR,,Very Unhealthy,#ff0000,61,80,SO2,ppm,24,0.196,0.26
25+
CR,,Very Unhealthy,#ff0000,61,80,CO,ppm,8,16.51,22
26+
CR,,Hazardous,#800080,81,100,PM2.5,ug/m3,24,101,
27+
CR,,Hazardous,#800080,81,100,PM10,ug/m3,24,251,
28+
CR,,Hazardous,#800080,81,100,O3,ppm,8,0.221,
29+
CR,,Hazardous,#800080,81,100,NO2,ppm,1,0.421,
30+
CR,,Hazardous,#800080,81,100,SO2,ppm,24,0.261,
31+
CR,,Hazardous,#800080,81,100,CO,ppm,8,22.1,

docs/data/countries.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@
188188
"TO": "Tonga",
189189
"TT": "Trinidad and Tobago",
190190
"TN": "Tunisia",
191-
"TR": "Turkey",
191+
"TR": "Türkiye",
192192
"TM": "Turkmenistan",
193193
"TV": "Tuvalu",
194194
"UG": "Uganda",

docs/data/turkiye/breakpoints.csv

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
ISO,variant,category,hex,category_lower,category_upper,pollutant,units,averaging_period,concentration_lower,concentration_upper
2+
TR,,Good,#11af66,0,50,SO2,ug/m3,1,0,100
3+
TR,,Good,#11af66,0,50,NO2,ug/m3,1,0,100
4+
TR,,Good,#11af66,0,50,CO,ug/m3,8,0,5500
5+
TR,,Good,#11af66,0,50,O3,ug/m3,8,0,120
6+
TR,,Good,#11af66,0,50,PM10,ug/m3,24,0,50
7+
TR,,Medium,#fff013,51,100,SO2,ug/m3,1,101,250
8+
TR,,Medium,#fff013,51,100,NO2,ug/m3,1,101,200
9+
TR,,Medium,#fff013,51,100,CO,ug/m3,8,5501,10000
10+
TR,,Medium,#fff013,51,100,O3,ug/m3,8,121,160
11+
TR,,Medium,#fff013,51,100,PM10,ug/m3,24,51,100
12+
TR,,Sensitive,#ff9523,101,150,SO2,ug/m3,1,251,500
13+
TR,,Sensitive,#ff9523,101,150,NO2,ug/m3,1,201,500
14+
TR,,Sensitive,#ff9523,101,150,CO,ug/m3,8,10001,16000
15+
TR,,Sensitive,#ff9523,101,150,O3,ug/m3,8,161,180
16+
TR,,Sensitive,#ff9523,101,150,PM10,ug/m3,24,101,260
17+
TR,,Unhealthy,#e20000,151,200,SO2,ug/m3,1,501,850
18+
TR,,Unhealthy,#e20000,151,200,NO2,ug/m3,1,501,1000
19+
TR,,Unhealthy,#e20000,151,200,CO,ug/m3,8,16001,24000
20+
TR,,Unhealthy,#e20000,151,200,O3,ug/m3,8,181,240
21+
TR,,Unhealthy,#e20000,151,200,PM10,ug/m3,24,261,400
22+
TR,,Bad,#d10d65,201,300,SO2,ug/m3,1,851,1100
23+
TR,,Bad,#d10d65,201,300,NO2,ug/m3,1,1001,2000
24+
TR,,Bad,#d10d65,201,300,CO,ug/m3,8,24001,32000
25+
TR,,Bad,#d10d65,201,300,O3,ug/m3,8,241,700
26+
TR,,Bad,#d10d65,201,300,PM10,ug/m3,24,401,520
27+
TR,,Dangerous,#b31340,301,500,SO2,ug/m3,1,1101,
28+
TR,,Dangerous,#b31340,301,500,NO2,ug/m3,1,2001,
29+
TR,,Dangerous,#b31340,301,500,CO,ug/m3,8,32001,
30+
TR,,Dangerous,#b31340,301,500,O3,ug/m3,8,701,
31+
TR,,Dangerous,#b31340,301,500,PM10,ug/m3,24,521,

docs/indices/costa-rica.md

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Costa Rica
2+
3+
## Índice Costarricense de Calidad del Aire (ICCA)
4+
5+
## Background
6+
7+
```js
8+
import { breakpointsTable } from '../components/table.js';
9+
import {
10+
parseBreakpointsCsv,
11+
tableReshape,
12+
colorScaleReshape,
13+
} from '../utils/utils.js';
14+
import { colorScale } from '../components/color-scale.js';
15+
16+
const breakpoints = await FileAttachment(
17+
'../data/costa-rica/breakpoints.csv'
18+
).text();
19+
const data = parseBreakpointsCsv(breakpoints);
20+
```
21+
22+
The Índice Costarricense de Calidad del Aire (ICCA) accounts for pollutant
23+
concentrations of PM<sub>2.5</sub>, PM<sub>10</sub>, O<sub>3</sub>,
24+
SO<sub>2</sub> and NO<sub>2</sub>. The ICCA was established into Costa Rica law with the *Reglamento de Calidad del Aire para Contaminantes Criterio N° 39951-S*[^1] in 2016.
25+
26+
## Color scale
27+
28+
The ICCA uses a five-level color scale, and numerical ranges, ranging from 0 to
29+
100, for each category:
30+
31+
32+
33+
```js
34+
colorScale(colorScaleReshape(data))
35+
```
36+
37+
_Note_: Adapted from https://elmundo.cr/costa-rica/ministerio-de-salud-anuncia-creacion-de-red-nacional-de-monitoreo-de-la-calidad-del-aire/
38+
39+
## Methods
40+
41+
```js
42+
breakpointsTable(data)
43+
```
44+
45+
Based on the breakpoint values in the table above a piecewise linear function is used to convert the concentration values to ICCA values. The function is defined as:
46+
47+
```js
48+
import { piecewiseLatexDoc } from '../components/piecewise.js';
49+
```
50+
51+
```js
52+
piecewiseLatexDoc('ICCA')
53+
```
54+
55+
The ICCA does not provide specific requirements for temporal coverage, the minimum number of valid data points required within the averaging period, for 8-hour and 24-hour measurement periods.
56+
57+
The ICCA uses sub-indices assigned to each of the measured pollutants. The highest sub-index determines the overall ICCA of the station.
58+
59+
```tex
60+
{AQI} = {Max}({I}_{PM_{10}},{I}_{PM_{2.5}},{I}_{SO_{2}},{I}_{NO_{2}},{I}_{O_{3}},{I}_{CO})
61+
```
62+
63+
## References
64+
65+
Ministerio de Salud anuncia creación de Red Nacional de Monitoreo de la Calidad
66+
del Aire, November 2, 2016,
67+
<https://elmundo.cr/costa-rica/ministerio-de-salud-anuncia-creacion-de-red-nacional-de-monitoreo-de-la-calidad-del-aire/>
68+
69+
Reglamento de Calidad del Aire para Contaminantes Criterio, August 9 2016,
70+
<http://www.pgrweb.go.cr/scij/Busqueda/Normativa/Normas/nrm_texto_completo.aspx?param1=NRTC&nValor1=1&nValor2=82827&nValor3=106098&strTipM=TC/>
71+
72+
[^1]:
73+
<http://www.pgrweb.go.cr/scij/Busqueda/Normativa/Normas/nrm_texto_completo.aspx?param1=NRTC&nValor1=1&nValor2=82827&nValor3=106098&strTipM=TC>

docs/indices/kuwait.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ _Note_: Adapted from "Air Quality Status" (n.d.), <https://enterprise.emisk.org/
3030

3131
## Methods
3232

33-
The KAQI uses a sub-index method, wherein an index value is calculated for each of the measured pollutants, then the final KAQI value is chosen from the highest sub-index value of all pollutants evaluated.
33+
The KAQI uses a sub-index method, wherein an index value is calculated for each of the measured pollutants, then the final KAQI value is chosen from the highest sub-index value of all pollutants evaluated.
3434

3535
```js
3636
breakpointsTable(data)

docs/indices/turkiye.md

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
2+
# Türkiye
3+
4+
## Hava Kalitesi İndeksi (HKİ)
5+
6+
```js
7+
import {breakpointsTable} from "../components/table.js";
8+
import { parseBreakpointsCsv, tableReshape, colorScaleReshape } from '../utils/utils.js';
9+
import { colorScale } from '../components/color-scale.js';
10+
const breakpoints = await FileAttachment('../data/turkiye/breakpoints.csv').text();
11+
const data = parseBreakpointsCsv(breakpoints);
12+
```
13+
14+
## Background
15+
16+
The Hava Kalitesi İndeksi (HKİ) was developed by the Ministry of Environment, Urbanisation and Climate Change, Türkiye Cumhuriyeti Çevre, Şehircilik ve İklim Değişikliği Bakanlığı (CSB). Five criteria pollutants, PM<sub>10</sub>, CO, O<sub>3</sub>, SO<sub>2</sub>, and NO<sub>2</sub>, are covered in the methodology. The HKİ reports an hourly AQI value based on the reported pollutants.
17+
18+
## Color scale
19+
20+
The HKİ scale is composed of 6 value bands ranging from 0 to 500, with a distinct color for each band.
21+
22+
```js
23+
colorScale(colorScaleReshape(data))
24+
```
25+
26+
_Note_: Adapted from "Hava Kalitesi İndeksi" (n.d.), [https://egethm.csb.gov.tr/hava-kalitesi-indeksi-i-87403](https://egethm.csb.gov.tr/hava-kalitesi-indeksi-i-87403). Accessed October 1, 2024.
27+
28+
## Methods
29+
30+
The HKİ uses a sub-index method where each pollutant is calculated against pollutant-specific breakpoints into a pollutant sub-index value. All pollutants are then compared and the largest sub-index value determines the full composite AQI value. The CSB provides no specific guidance provided on the minimum number of pollutants required to compute a full composite index.
31+
32+
Pollutant breakpoints are defined in the table below:
33+
34+
```js
35+
breakpointsTable(data)
36+
```
37+
38+
_Note_: Adapted from "Hava Kalitesi İndeksi" (n.d.), [https://egethm.csb.gov.tr/hava-kalitesi-indeksi-i-87403](https://egethm.csb.gov.tr/hava-kalitesi-indeksi-i-87403). Accessed October 1, 2024.
39+
40+
Using the breakpoint values in the table above, a [piecewise linear function](/methods#piecewise-linear-function) is used to convert the concentration values to HKİ values. This method is not explicity listed in the source doucmented but is listed as following the same method as the US EPA. There is no specific guidance in the source material about rounding or truncating concentration values, but based on the table above, values are either whole numbers or up to one decimal place of precision. Given there are no upper bounds on the pollutant thresholds for the "Dangerous" category, it is unclear from the source material what upper breakpoint values is used for the piecewise function. The piecewise linear function is defined as:
41+
42+
```js
43+
import {piecewiseLatexDoc} from '../components/piecewise.js';
44+
```
45+
46+
```js
47+
piecewiseLatexDoc('HKİ')
48+
```
49+
50+
## References
51+
52+
https://egethm.csb.gov.tr/hava-kalitesi-indeksi-i-87403
53+
54+
https://cevre.ibb.istanbul/hava-kalitesi/hava-kalitesi-indeksi/

docs/style.css

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
--theme-foreground-muted: #5a6672;
99
}
1010

11+
#observablehq-header {
12+
position: absolute;
13+
}
14+
1115
.gradient-title {
1216
font-size: 48px;
1317
-webkit-text-fill-color: transparent;

observablehq.config.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export default {
3030
{name: "Australia", path: "/indices/australia"},
3131
{name: "Canada", path: "/indices/canada"},
3232
{name: "China", path: "/indices/china"},
33+
{name: "Costa Rica", path: "/indices/costa-rica"},
3334
{name: "European Union", path:"/indices/eu"},
3435
{name: "Finland", path:"/indices/finland"},
3536
{name: "Hong Kong", path: "/indices/hong-kong"},
@@ -45,6 +46,7 @@ export default {
4546
{name: "South Korea", path: "/indices/south-korea"},
4647
{name: "Taiwan", path: "/indices/taiwan"},
4748
{name: "Thailand", path: "/indices/thailand"},
49+
{name: "Türkiye", path: "/indices/turkiye"},
4850
{name: "United Arab Emirates", path: "/indices/uae"},
4951
{name: "United Kingdom", path: "/indices/uk"},
5052
{name: "United States of America", path: "/indices/us"},
@@ -56,7 +58,7 @@ export default {
5658
// Some additional configuration options and their defaults:
5759
theme: "light", // try "light", "dark", "slate", etc.
5860
header: '<h1 class="gradient-title">Air Quality Index Hub</h1>', // what to show in the header (HTML)
59-
footer: '<div>Developed by <a href="https://openaq.org">OpenAQ</a>. Are we missing an AQI? Did you spot a bug? <a href="https://github.com/openaq/aqi-hub">contribute on github</a></div><div>Content licensed <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA</a></div>', // what to show in the footer (HTML)
61+
footer: '<div>Developed by <a href="https://openaq.org">OpenAQ</a>. Are we missing an AQI? Did you spot a bug? <a href="https://github.com/openaq/aqi-hub">contribute on github</a></div><div>Content licensed <a href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a></div>', // what to show in the footer (HTML)
6062
toc: true, // whether to show the table of contents
6163
pager: true, // whether to show previous & next links in the footer
6264
style: "style.css",

0 commit comments

Comments
 (0)