openaq-fetch
openaq-fetch copied to clipboard
Proposal to amend the attributes for the airnow-http adapter
This is the only provider that ends up with an attribute array in the metadata for the sensor node. I believe that its conflating provider and source (first element is provider, second is source) but only the first one is making it into the system. I propose that we simplify it to an object and come up with appropriate keys for mapping to data in the db.
https://github.com/openaq/openaq-fetch/blob/6778a10a79a8bb130477c831b5a8e0d4834fb7c3/src/adapters/airnow-http.js#L115
Here is an example of some data coming in
"attribution":[{"name":"US EPA AirNow","url":"http://www.airnow.gov/"},{"name":"Canada-Prince Edward Island1"}]
Here is the hungary file
"attribution":[{"name":"Hungary National Meteorological Service","url":"https://legszennyezettseg.met.hu/"}]
Likely need to change this as well to make sure we dont create another one with an array https://github.com/openaq/openaq-fetch/blob/6778a10a79a8bb130477c831b5a8e0d4834fb7c3/src/lib/measurement-schema.json#L32-L49