@justair/justair-library 7.10.0-alpha.0f8baaf → 7.10.0-alpha.ceed281
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -121,6 +121,31 @@ Same install-time visibility caveat as the 7.4.0 section above.
|
|
|
121
121
|
|
|
122
122
|
`HI` is **derived, not measured**. Processing-Engine computes it from that reading's own `T_AMB` / `RH_AMB` pair using the NOAA formula (JA-3120); no supplier reports it. It takes no `_AMB` suffix because there is no internal counterpart — an enclosure Heat Index would describe the inside of the housing. Never compute it from the bare `T` / `RH`.
|
|
123
123
|
|
|
124
|
+
### New parameter and type changes in 7.10.0
|
|
125
|
+
|
|
126
|
+
| id | Name | Unit |
|
|
127
|
+
|---|---|---|
|
|
128
|
+
| `RN` | Radon | `pCi/L` |
|
|
129
|
+
|
|
130
|
+
Same install-time visibility caveat as the 7.4.0 section above. Nothing normalizes radon today, so no
|
|
131
|
+
monitor carries it yet, but the first one that does will surface publicly. JA-3427 records that radon
|
|
132
|
+
should start admin only; that gating lives only in JustAir-Client's `parameterFiltering.js` and V2 has
|
|
133
|
+
no equivalent.
|
|
134
|
+
|
|
135
|
+
`RN.rfc` is `4`, the EPA indoor action level in pCi/L. It is **not** an IRIS chronic inhalation RfC in
|
|
136
|
+
µg/m³, which is what every `HEAVY_METALS` `rfc` is. Nothing reads `rfc` off `PARAMETERS` today.
|
|
137
|
+
|
|
138
|
+
Two `type` values also changed, so a service that groups by `type` will show these in a new group
|
|
139
|
+
after install:
|
|
140
|
+
|
|
141
|
+
| id | Was | Now |
|
|
142
|
+
|---|---|---|
|
|
143
|
+
| `H2S` | `Volatile Organic Compound` | `Gas` |
|
|
144
|
+
| `CH4` | `Volatile Organic Compound` | `Gas` |
|
|
145
|
+
|
|
146
|
+
`origin` and `impacts` were also filled in for the non-AQI pollutants that had them blank. Display
|
|
147
|
+
only, no shape change.
|
|
148
|
+
|
|
124
149
|
### Object shape
|
|
125
150
|
|
|
126
151
|
Each constant is an object with the following fields:
|
|
@@ -132,7 +157,7 @@ Each constant is an object with the following fields:
|
|
|
132
157
|
| `name` | `string` | Full descriptive name (e.g. `"Particulate Matter 2.5 (PM₂.₅)"`) |
|
|
133
158
|
| `unit` | `string` | Measurement unit (e.g. `"µg/m³"`) |
|
|
134
159
|
| `type` | `string` | Category: `"Particulate Matter"`, `"Gas"`, `"Volatile Organic Compound"`, `"Weather"`, `"Heavy Metal"`, `"Heavy Metal - Essential Nutrient"` |
|
|
135
|
-
| `rfc` | `number \| null` | EPA IRIS chronic inhalation reference concentration (µg/m³) |
|
|
160
|
+
| `rfc` | `number \| null` | EPA IRIS chronic inhalation reference concentration (µg/m³). Exception: `RN.rfc` is the EPA indoor action level in pCi/L |
|
|
136
161
|
| `origin` | `string \| null` | Description of pollution source |
|
|
137
162
|
| `impacts` | `string \| null` | Human health impact description |
|
|
138
163
|
|
package/package.json
CHANGED
|
@@ -101,7 +101,7 @@ export const PARAMETERS = {
|
|
|
101
101
|
unit: "ppm",
|
|
102
102
|
type: "Gas",
|
|
103
103
|
rfc: null,
|
|
104
|
-
origin: "Found naturally in crude oil, natural gas, and volcanic gas. Also released by oil refineries, wastewater plants, farms with livestock, and landfills. Smells
|
|
104
|
+
origin: "Found naturally in crude oil, natural gas, and volcanic gas. Also released by oil refineries, wastewater plants, farms with livestock, and landfills. Smells like rotten eggs.",
|
|
105
105
|
impacts: "Low levels over a long time can irritate eyes and airways and cause headaches or nausea. Very high levels can cause someone to pass out or die.",
|
|
106
106
|
},
|
|
107
107
|
CH4: {
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { PARAMETERS, HEAVY_METALS } from "../pollutants.js";
|
|
2
2
|
|
|
3
3
|
const REQUIRED_FIELDS = ["id", "label", "name", "unit", "type"];
|
|
4
|
+
|
|
5
|
+
// The one type that is not a pollutant. Stated, not derived: deriving the exemption from the
|
|
6
|
+
// entries would make the origin/impacts test assert nothing, since a new entry shipped blank
|
|
7
|
+
// would exempt itself.
|
|
8
|
+
const WEATHER_TYPE = "Weather";
|
|
9
|
+
|
|
4
10
|
const VALID_TYPES = [
|
|
5
11
|
"Particulate Matter",
|
|
6
12
|
"Gas",
|
|
7
13
|
"Volatile Organic Compound",
|
|
8
|
-
|
|
14
|
+
WEATHER_TYPE,
|
|
9
15
|
"Heavy Metal",
|
|
10
16
|
"Heavy Metal - Essential Nutrient",
|
|
11
17
|
];
|
|
@@ -70,7 +76,7 @@ function sharedAssertions(constants) {
|
|
|
70
76
|
// JA-3460: every pollutant needs Origin and Impacts copy. Weather parameters are exempt: they
|
|
71
77
|
// are not pollutants, and the Centralized Constants doc leaves both columns blank for them.
|
|
72
78
|
function hasOriginAndImpacts(constants) {
|
|
73
|
-
const pollutants = Object.entries(constants).filter(([, p]) => p.type !==
|
|
79
|
+
const pollutants = Object.entries(constants).filter(([, p]) => p.type !== WEATHER_TYPE);
|
|
74
80
|
|
|
75
81
|
test.each(pollutants)("%s: origin is populated", (key, pollutant) => {
|
|
76
82
|
expect(typeof pollutant.origin).toBe("string");
|
|
@@ -107,7 +113,7 @@ describe("PARAMETERS", () => {
|
|
|
107
113
|
test("is declared as a Weather parameter in °F", () => {
|
|
108
114
|
expect(PARAMETERS.HI).toBeDefined();
|
|
109
115
|
expect(PARAMETERS.HI.unit).toBe("°F");
|
|
110
|
-
expect(PARAMETERS.HI.type).toBe(
|
|
116
|
+
expect(PARAMETERS.HI.type).toBe(WEATHER_TYPE);
|
|
111
117
|
});
|
|
112
118
|
|
|
113
119
|
test("shares T_AMB's unit, since it is an apparent temperature", () => {
|