Closed Olivia-WB closed 3 years ago
@Olivia-WB, I'm sorry I was not able to respond earlier to your request. This is indeed not supported. As a workaround, you can actually get the metadata of the time series to get these automatically:
from pywaterinfo import Waterinfo
hic = Waterinfo("hic")
station_metadata = hic.get_timeseries_list(ts_id = 51814010)[["from", "to"]]
start, end = station_metadata.values[0]
ts_conductivity = hic.get_timeseries_values(51814010, start=start, end=end)
Note for this specific time series I got an error when requesting the entire time series (server error for which you should consult HIC directly), but it illustrates the technical solution (and it works when I only use the start/end separately).
I propose to add this to the documentation of the package instead of adding it as additional option (which could lead to large requests making users losing a lot of credits).
@Olivia-WB, see https://github.com/fluves/pywaterinfo/pull/36 PR for the example in the docs
Thanks a lot Stijn for the useful workaround!
Closing this PR, see section https://fluves.github.io/pywaterinfo/tutorial.html#download-with-known-ts-identifier for this example to get the start/end of a time series
Description
I want to download all available measurements (in time) of a specific time series (from the very first measurement, to today), without knowing the start and end date. For example, to download all the available conductivity time series data of Prosperpolder SF/Zeeschelde (ts_id = 51814010), Something like:
hic.get_timeseries_values(ts_id=51814010, period="ALL")
...would be very useful.
What I Did
I got the exception:
A start&end date or a period are mandatory. Would it be possible to include a default for these parameters that results in the entire available timeseries?