ropensci / weathercan

R package for downloading weather data from Environment and Climate Change Canada
https://docs.ropensci.org/weathercan
GNU General Public License v3.0
102 stars 29 forks source link

Any way to refresh `stations` dataframe? #65

Closed macsmith26 closed 5 years ago

macsmith26 commented 5 years ago

Hi,

I recently discovered your extremely useful package. Thank you for creating it!

I was wondering how often the stations dataframe is updated, since I noticed a discrepancy between it and weather.gc.ca. It's annoying how weather stations stop reporting/change on the website from time to time, but is there a way to get a refresh of the list so we can manually fix any scripts whenever a change occurs?

Thanks!

steffilazerte commented 5 years ago

The stations data frame gets updated every time I push an update to CRAN and often when I push changes to GitHub. You can update the data frame yourself with the stations_dl() function and then you can supply this data frame to the weather_dl() function.

For example:

my_stations <- stations_dl()
w <- weather_dl(...., stn = my_stations)

Let me know how it goes, I don't think many people use this aspect of the package. Downloading the stations data frame takes a bit of time, and unfortunately, the ftp site for the stations file is a bit fragile (if you get a download error, try again later).

The stations data frame will still include stations that have large periods of missing data, not much we can do about that :-/

Good luck!