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] Continuity for changing "station_id" of a sensor #25

Open amotl opened 4 years ago

amotl commented 4 years ago

@d-roet found within [1] that some LDI sensor changed its ID while the sensor is still located at the same location. Probably the appliance was swapped.

I see the station_id itself has changed (I had an old ldi-stations.json file to be able to compare), that's the culprit.

$ cat ldi-stations.json.bak | grep "Montens"
    "name": "Montensstraat, Antwerpen (#10895)"
    "name": "Montensstraat, Antwerpen (#11009)"
$ cat ldi-stations.json | grep "Montens"
    "name": "Montensstraat, Antwerpen (#10895)"
    "name": "Montensstraat, Antwerpen (#26437)"

What a mess :(

While he acknowledged

this is desired and intended behaviour: You move your sensor to another place, so it gets a new station_id.

he is asking for a feature to compensate this in any way

Only in our case here, we want the series to continue because we know we moved them only slightly...

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

amotl commented 4 years ago

I will be happy to add an appropriate "aliasing" feature to Luftdatenpumpe in order to compensate for changing station_ids. Proposal:

luftdatenpumpe readings --alias=station_id:26437=11009

This will ensure continuity for the data of the former station_id=11009. The "aliasing feature" would not alter the already existing (ingested) station_id, but keep the original identifier and add an alias additionally.

amotl commented 1 year ago

Hi again,

@ohobby apparently is observing the same problem and reported about it at Luftdatenpumpe/Sensor.Community: Station identifier changed if the location changed?.

With kind regards, Andreas.