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

return error early when providing daily date to get_monthly_data #53

Open
Pakillo opened this issue Apr 16, 2024 · 0 comments
Open

return error early when providing daily date to get_monthly_data #53

Pakillo opened this issue Apr 16, 2024 · 0 comments

Comments

@Pakillo
Copy link
Collaborator

Pakillo commented Apr 16, 2024

If providing a daily date (e.g. 2021-01-20), the function proceeds and starts data download but gives error afterwards. Better to check that period is a month (yyyy-mm) and not a day (yyyy-mm-dd) at the beginning to save time and server load. Also to avoid confusion of some users which may not understand the error.

Reprex:

library(easyclimate)

coords <- data.frame(lon = -5.36, lat = 37.40)
ex <- get_monthly_climate(coords, period = "2001-01-10")
#> Connecting to the server...
#> Error: [subset] invalid name(s)

Created on 2024-04-16 with reprex v2.1.0

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

1 participant