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

Bad Data Returned from US EPA Ozone to Raw #48

Closed
Sunoo opened this issue Jan 19, 2020 · 5 comments · Fixed by #49
Closed

Bad Data Returned from US EPA Ozone to Raw #48

Sunoo opened this issue Jan 19, 2020 · 5 comments · Fixed by #49
Labels
bug Something isn't working @convert @shootismoke/convert @dataproviders @shootismoke/dataproviders

Comments

@Sunoo
Copy link
Contributor

Sunoo commented Jan 19, 2020

It looks like your code uses the 1 hour sampling of Ozone when converting from US EPA. However, aqicn (and maybe others) are returning the 8 hour sampling, so it results in a 0 being returned.

@amaury1093 amaury1093 added @convert @shootismoke/convert @dataproviders @shootismoke/dataproviders bug Something isn't working labels Jan 19, 2020
@amaury1093
Copy link
Member

aqicn (and maybe others) are returning the 8 hour sampling

I had a doubt about this, so went with the 1h sampling a bit randomly, didn't find documentation on aqicn. But you're probably right. Apart from 0 being returned, do you know if there is any documentation about aqicn returning 1h or 8h sampling?

I'll fix this asap! (unless you want to create a PR yourself?)

@Sunoo
Copy link
Contributor Author

Sunoo commented Jan 19, 2020

I was mostly going by the value being out of range for the 1h formula on all the stations I checked. Although, your reply does raise the possibility that it could vary between 1h and 8h depending on data source, which would be supremely annoying.

I’ll do some digging for documentation, though that has seemed to be pretty sparse so far in my experience.

I’m not sure how it could be easily done, but perhaps the safest way would be to allow for some sort of override between 1h and 8h, though that just shifts the problem to the calling application.

@Sunoo
Copy link
Contributor Author

Sunoo commented Jan 19, 2020

Found it! They convert all incoming data to 8h averaging.

“The most common averaging is 1 hour. It is also the prefered one, as our backend system will automatically do the 8 hour averagin computation for the Ozone and Carbon Monoxyde.”

http://aqicn.org/publishingdata/

@Sunoo
Copy link
Contributor Author

Sunoo commented Jan 19, 2020

I just forked the project with the intent of creating a PR for this. However, I noticed that the breakpoints already seem to be correct for 8h averaging. I'm a bit at a loss now as to why I'm consistently getting 0 back from your library for the stations in my area, when it should be around 5 or so. All the other pollutants seem to work as expected.

@amaury1093
Copy link
Member

Release in @shootismoke/convert@0.2.7 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working @convert @shootismoke/convert @dataproviders @shootismoke/dataproviders
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants