powered by
Build a valid URL for downloading a file from CHCD. Follows the format detailed here https://collaboration.cmc.ec.gc.ca/cmc/climate/Get_More_Data_Plus_de_donnees/.
build_url(station_id, timecode, year, month = NA)
A URL string
The ID of the station to be downloaded
The numeric timecode to be downloaded
The year of data to be loaded
The month of the year to download data. Setting to NA gets all months.
build_url(337,3,1980) # The timecode can also be a string such as "m" or "month" build_url(337,"m",1990) # Setting the month is most useful when downloading hourly data build_url(337,"h",1980,3)
Run the code above in your browser using DataLab