hydris stations ids von Code in Konfig verlagert
This commit is contained in:
@@ -29,9 +29,9 @@ def daten_sammeln():
|
|||||||
"durchfluss": durchfluss[1], "pegelstand": pegelstand[1]})
|
"durchfluss": durchfluss[1], "pegelstand": pegelstand[1]})
|
||||||
|
|
||||||
hydris_daten = hydris_data.get_hydris_data("https://www.salzburg.gv.at/wasser/hydro/grafiken/data.json")
|
hydris_daten = hydris_data.get_hydris_data("https://www.salzburg.gv.at/wasser/hydro/grafiken/data.json")
|
||||||
numbers = [204180, 204032, 203323, 204198, 203570, 203539]
|
|
||||||
hydris_daten_gefiltert = [hydris_data.get_station(hydris_daten, station_id=str(number))
|
hydris_daten_gefiltert = [hydris_data.get_station(hydris_daten, station_id=str(number))
|
||||||
for number in numbers]
|
for number in CONFIG["hydris"]["station_id"]]
|
||||||
for station in hydris_daten_gefiltert:
|
for station in hydris_daten_gefiltert:
|
||||||
geohash = pygeohash.geohash.encode(station.location.lat, station.location.lon)
|
geohash = pygeohash.geohash.encode(station.location.lat, station.location.lon)
|
||||||
daten.append({"ts": station.flow["15m.Cmd.RunOff"].timestamp, "messstelle": station.name, "geohash": geohash,
|
daten.append({"ts": station.flow["15m.Cmd.RunOff"].timestamp, "messstelle": station.name, "geohash": geohash,
|
||||||
|
|||||||
@@ -19,6 +19,12 @@ text = "Brodhausen"
|
|||||||
lat = 47.847131
|
lat = 47.847131
|
||||||
lon = 12.945941
|
lon = 12.945941
|
||||||
|
|
||||||
|
[hydris]
|
||||||
|
# Neue Stationsid lassen sich über dieser Tabelle finden
|
||||||
|
# https://www.salzburg.gv.at/wasser/hydro/#/Fliessgew%C3%A4sser/list?station=203075
|
||||||
|
# Die Stationsid ist nachdem man auf die gewünschte Station geklickt hat aus dem Link station= zu entnehmen
|
||||||
|
# Anschließend Stationsid als Listeninhalt bei station_id ergänzen
|
||||||
|
station_id = [204180, 204032, 203323, 204198, 203570, 203539]
|
||||||
|
|
||||||
|
|
||||||
[db]
|
[db]
|
||||||
|
|||||||
Reference in New Issue
Block a user