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)
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:
Created on 2024-04-16 with reprex v2.1.0