You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PurpleAir has who separate sensors in a single housing: "parent" and "child". The child sensor just has PM2.5, while the parent sensor has PM2.5 + other sensors. Tom is adding a column to the BigQuery table called PurpleAirParent. For child sensors, the value is the DeviceID of the parent sensor. The value is NULL for parent sensors.
We'll want some helper functions to combine PurpleAir parent/child sensors. Kerry suggested to use this formula to combine PM2.5 measurements from the two sensors:
# Threshold needs to be adjusted, but somewhere in 30% is probably goodavg=average(parent[PM2.5], child[PM2.5])
ifparent[PM2.5] <=5andchild[PM2.5] <=5:
returnavgelseifabs(parent[PM2.5] -child[PM2.5]) /avg<THRESHOLD:
returnavgelse:
returnNULL
We should probably just return the parent sensor with this altered PM2.5 value, maybe a field denoting the the child sensor as well:
PurpleAir has who separate sensors in a single housing: "parent" and "child". The child sensor just has PM2.5, while the parent sensor has PM2.5 + other sensors. Tom is adding a column to the BigQuery table called
PurpleAirParent
. For child sensors, the value is theDeviceID
of the parent sensor. The value is NULL for parent sensors.We'll want some helper functions to combine PurpleAir parent/child sensors. Kerry suggested to use this formula to combine PM2.5 measurements from the two sensors:
We should probably just return the parent sensor with this altered PM2.5 value, maybe a field denoting the the child sensor as well:
The text was updated successfully, but these errors were encountered: