earthobservations / luftdatenpumpe

Acquire and process live and historical air quality data without efforts. Filter by station-id, sensor-id and sensor-type, apply reverse geocoding, store into time-series and RDBMS databases, publish to MQTT, output as JSON, or visualize in Grafana. Data sources: Sensor.Community (luftdaten.info), IRCELINE, and OpenAQ.
https://luftdatenpumpe.readthedocs.io/
GNU Affero General Public License v3.0
35 stars 3 forks source link

[LDI] Synthesize "is_active" indicator #26

Open amotl opened 4 years ago

amotl commented 4 years ago

Within 0c3ec979 and with a minor fixup through fb1301a0, we added a feature to synthesize a field called is_active within PostGIS based on the sensor_last_date field coming from the SOS service where we are ingesting sensor data of the IRCELINE sensor network from.

The gist is

ABS(DATE_PART('day', sensor_last_date - now())) <= 7 AS is_active

@d-roet asked for a likewise feature on the LDI network in order to mitigate issues coming from downstream processing of this data, see also [1].

[1] https://source.irceline.be/vaquums/grafana_luftdatenpumpe/issues/27

cc @wetterfrosch