-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
issue with return_fields argument for ki_time_series_values() #19
Comments
Sorry for the delay, just saw this- not sure if we discussed it elsewhere already. Like you flagged the time series values query uses a different parameter to specify metadata return fields. I think your best bet for now is to just do the station list/time series list query with the required return fields and then join it to your I'll leave this issue open flagged as enhancement and look at it when I get some time. For backwards compatibility we'll need to maintain the existing return_fields argument since it controls returning units, etc. and just add Pull requests welcome 😄 |
Hey guys, thought I'd sneak a peek here since I'm working with this package right now anyway. I am not quite sure if I get the issue described - the first example is not working for me and seems to be identical to the second one (?) - but from my point of view Besides
This would totally explain why your request fails with So basically there is no fix needed imho, but |
@falk-env yep you're understanding the issue perfectly. Basically just need to add the md_returnfields paramter as an optional argument and add it to the |
I am getting an error when using return_fields argument for ki_time_series_values(). here are some examples:
This works:
wiski_vals_tst <- ki_timeseries_values(hub = "swmc", ts_id = 1071852042, start_date = "2021-09-16", end_date = "2021-10-04",
return_fields = "station_name")
This does not:
wiski_vals_tst <- ki_timeseries_values(hub = "swmc", ts_id = 1071852042, start_date = "2021-09-16", end_date = "2021-10-04",
return_fields = "station_name")
return_fields argument does work with ki_timeseries_list():
This Works:
ts_id_alarm <- ki_timeseries_list(hub = "swmc", station_id = 141370, ts_name = "WWP_AlarmLevel_25 %-tile",
return_fields = "station_name, ts_id, ts_name, parametertype_name")
a direct kiwis link for getting metadata fields using get_TimeseriesValues works:
https://www.swmc.mnr.gov.on.ca/KiWIS/KiWIS?service=kisters&type=queryServices&request=getTimeseriesValues&datasource=0&format=html&ts_id=964086042&period=P1d&md_returnfields=station_name,station_no&metadata=true
here is a query for metadata using get_TimeseriesList()...the syntax for getting metadata is a bit different, maybe that is the issue??
https://www.swmc.mnr.gov.on.ca/KiWIS/KiWIS?service=kisters&type=queryServices&request=getTimeseriesList&datasource=0&format=html&station_id=141370&returnfields=station_name,station_no,ts_id,ts_name,parametertype_name,coverage
thanks,
The text was updated successfully, but these errors were encountered: