Skip to content
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

wasserportal: read_wasserportal not working in case of "single" variable #4

Open
mrustl opened this issue Mar 2, 2021 · 2 comments
Assignees

Comments

@mrustl
Copy link
Member

mrustl commented Mar 2, 2021

remotes::install_github("kwb-r/kwb.read@dev")
id <- "5865900"
kwb.read::get_wasserportal_variables(id) 
>Wasserstand 
>       "w" 
kwb.read::read_wasserportal(id)
>Reading 'Wasserstand' for station 5865900 (Allee_der_Kosmonauten) ... ok. (1.43s) 
>Removing 1 elements that are empty or failed ... ok. (0.00s) 
>No remaining data frames. Returning NULL.
@hsonne
Copy link
Member

hsonne commented Mar 2, 2021

The problem is that the default date is "2019-01-01" and that currently only single values can be requested. The single values are not available for such a long period back in time.

This should work:

kwb.read::read_wasserportal(id, from_date = "2020-01-01")

        LocalDateTime UTCOffset Wasserstand
1 2020-03-01 03:00:00         1          17
2 2020-03-01 03:15:00         1          17
3 2020-03-01 03:30:00         1          17
4 2020-03-01 03:45:00         1          17
5 2020-03-01 04:00:00         1          16
6 2020-03-01 04:15:00         1          16
...

@hsonne
Copy link
Member

hsonne commented Mar 2, 2021

I am working on an argument type that allows to get also the daily and monthly values. These should be availble further back in time.

@hsonne hsonne transferred this issue from KWB-R/kwb.read Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants