Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal to amend the attributes for the airnow-http adapter #1025

Open
caparker opened this issue May 10, 2023 · 0 comments
Open

Proposal to amend the attributes for the airnow-http adapter #1025

caparker opened this issue May 10, 2023 · 0 comments

Comments

@caparker
Copy link
Collaborator

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.

attribution: [{name: 'US EPA AirNow', url: 'http://www.airnow.gov/'}, {name: m[8].trim()}],

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

"attribution": {
"type": "array",
"items": {
"type": "object",
"required": ["name"],
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"url": {
"type": "string",
"pattern": "^(https?:\/\/)?([\\da-z\\.-]+)\\.([a-z\\.]{2,6})([\/\\w \\.-]*)*\/?"
}
}
}
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant