Closed cgquick closed 3 years ago
That's interesting. It looks like there are two ways of getting climate normals from ECCC. There is a site where the normals are available to download via csv (what weathercan
currently uses) and there is an interactive site where normals can be downloaded by hand. And they don't have the same data!
I will have to look into accessing this second set of data. It should be doable, but may take some time to re-jig the functions.
Thanks for bringing this to my attention!
Hello WeatherCan Team,
First off, thank you for all the hard work you put into WeatherCan. It was the package that got me started in R and I am loving it!
Unfortunately I am also having an error when trying to download climate normals from a specific station:
n <- normals_dl(climate_ids = "6046767")
Error: Problem with mutate()
input normals
.
x Not Found (HTTP 404). Failed to access climate normals for this station (climate id: 6046767).
i Input normals
is purrr::map(.data$loc, normals_raw)
.
Run rlang::last_error()
to see where the error occurred.
I've tried to do some digging to help with debugging
Behaviour in R:
On Climate Weather.gc.ca portal:
Basically, I'm trying to figure out Is the R library incorrect (should normals = FALSE)? Have I made a technical mistake (dependencies)? Is it an error related to the recent Climate Weather update?
Thanks!
@cgquick I've finally gotten around to changing the climate normals source to https://climate.weather.gc.ca/ which has more stations (and now normals to 1971-2000. 1961-1990 too but they're missing climate ids so are tricky).
If you're interested and willing, could you test it out?
To install/test the dev version:
install.packages('remotes')
remotes::install_github("ropensci/weathercan", ref = "normals")
library(weathercan)
stations_search("Vancouver", normals_years = "current")
normals_dl(climate_id = "1108447")
I was trying to pull down the normals for Vancouver Airport, but I keep getting "Error: No stations had climate normals available". It also doesn't show up when I run stations_search("Vancouver", normals_only = TRUE). The climate_id is 1108447. I can go to climate.weather.gc.ca and download the normals without issue. Am I doing something wrong or misunderstanding something? Thank you! I love this package. I'm running 0.3.1.
https://climate.weather.gc.ca/climate_normals/results_1981_2010_e.html?searchType=stnName&txtStationName=vancouver&searchMethod=contains&txtCentralLatMin=0&txtCentralLatSec=0&txtCentralLongMin=0&txtCentralLongSec=0&stnID=889&dispBack=0