|
|
@ -21,10 +21,11 @@ def daten_sammeln():
|
|
|
|
for messstelle in CONFIG["hnd"]:
|
|
|
|
for messstelle in CONFIG["hnd"]:
|
|
|
|
lat = CONFIG["hnd"][messstelle]["lat"]
|
|
|
|
lat = CONFIG["hnd"][messstelle]["lat"]
|
|
|
|
lon = CONFIG["hnd"][messstelle]["lon"]
|
|
|
|
lon = CONFIG["hnd"][messstelle]["lon"]
|
|
|
|
|
|
|
|
messstelle = CONFIG["hnd"][messstelle]["text"]
|
|
|
|
geohash = pygeohash.geohash.encode(lat, lon)
|
|
|
|
geohash = pygeohash.geohash.encode(lat, lon)
|
|
|
|
durchfluss = max(hnd_scraping.scrap_messwerte_hnd(CONFIG["hnd"][messstelle]["url_q"]))
|
|
|
|
durchfluss = max(hnd_scraping.scrap_messwerte_hnd(CONFIG["hnd"][messstelle]["url_q"]))
|
|
|
|
pegelstand = max(hnd_scraping.scrap_messwerte_hnd(CONFIG["hnd"][messstelle]["url_h"]))
|
|
|
|
pegelstand = max(hnd_scraping.scrap_messwerte_hnd(CONFIG["hnd"][messstelle]["url_h"]))
|
|
|
|
daten.append({"ts": durchfluss[0], "geohash": geohash,
|
|
|
|
daten.append({"ts": durchfluss[0], "messstelle": messstelle, "geohash": geohash,
|
|
|
|
"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")
|
|
|
@ -33,7 +34,7 @@ def daten_sammeln():
|
|
|
|
for number in numbers]
|
|
|
|
for number in numbers]
|
|
|
|
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, "geohash": geohash,
|
|
|
|
daten.append({"ts": station.flow["15m.Cmd.RunOff"].timestamp, "messstelle": station.name, "geohash": geohash,
|
|
|
|
"durchfluss": station.flow["15m.Cmd.RunOff"].value,
|
|
|
|
"durchfluss": station.flow["15m.Cmd.RunOff"].value,
|
|
|
|
"pegelstand": station.water_level["15m.Cmd.WiskiWeb"].value})
|
|
|
|
"pegelstand": station.water_level["15m.Cmd.WiskiWeb"].value})
|
|
|
|
return daten
|
|
|
|
return daten
|
|
|
|