Skip to content
Snippets Groups Projects
Commit 6d9ab2ec authored by Carsten Hinz's avatar Carsten Hinz
Browse files

fixed return values

parent 56e199d7
No related branches found
No related tags found
2 merge requests!28started adding an option to average timeseries at a specific station,!27started adding an option to average timeseries at a specific station
......@@ -591,7 +591,7 @@ class AnalysisService:
data_with_sid = timeseries.join(coords["station_id"], how="inner")
data_by_station = data_with_sid.groupby("station_id")
#mean_data_by_station = data_by_station.mean()
mean_data_by_station = data_by_station.mean().
n_data_by_station = data_by_station.count()
stations_with_gt2_ts = n_data_by_station[n_data_by_station.gt(2).any(axis=1)]
......@@ -602,11 +602,11 @@ class AnalysisService:
for sid in sid_with_gt2_ts:
logger.warning(f"https://toar-data.fz-juelich.de/api/v2/search/?station_id={sid}&variable_id=5&fields=data_start_date,data_end_date,id")
data_by_station
return mean_data_by_station, coords
else:
coords.drop("station_id", inplace=True)
# ok, we do not need the station Id in the coordinates, so drop it:-)
coords.drop("station_id", axis=1,inplace=True)
return timeseries, coords
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment