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

Filter out or weight "low confidence" PurpleAir stations #43

Open
deanlyoung opened this issue Sep 6, 2020 · 7 comments
Open

Filter out or weight "low confidence" PurpleAir stations #43

deanlyoung opened this issue Sep 6, 2020 · 7 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@deanlyoung
Copy link

If sensors are faulty or reporting abnormally for some other reason (PurpleAir's algorithm), they would ideally be discarded or weighted lower in averaging.

@ianhoffman
Copy link
Collaborator

Per this comment, I think that this needs to be added to both the build-side and application-side logic. We already filter out sensors reporting pm2.5 <= 0 or > 500 (but I think 500 is too low — I have seen readings up to 3000 though, which can't be right). What fields do you look at in the Purpleair API response to determine the confidence interval? I've been using their JSON API (example: https://www.purpleair.com/json?show=37124) because I didn't learn about their REST API until recently, but maybe it's worth switching if the REST API exposes confidence intervals.

@deanlyoung
Copy link
Author

Ah, but there are two fields in the json that do this for you.
image
image

@deanlyoung
Copy link
Author

@ianhoffman ianhoffman added good first issue Good for newcomers enhancement New feature or request labels Sep 6, 2020
@deanlyoung
Copy link
Author

deanlyoung commented Sep 6, 2020

Interesting... the example Station ID you posted seems to have far fewer fields than quite a few stations near me 🤔

https://www.purpleair.com/json?show=54351

@ianhoffman
Copy link
Collaborator

ianhoffman commented Sep 6, 2020

I think it may be that the sensor you linked to has a "child" sensor (I'm still not sure what that means). I don't see A_H or Flag fields for either sensor.

@deanlyoung
Copy link
Author

They seem to only appear when the conditions are met (again, PurpleAir's algorithm 🤷🏻‍♂️). For example:

https://www.purpleair.com/json?show=17781

@deanlyoung
Copy link
Author

And the ParentID is for 2 channel (i.e. 2 particle sensors) stations so that you can poll them separately if one channel is faulty (afaik).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants