We have a government source of weather data at https://climate.weather.gc.ca/historical_data/search_historic_data_e.html
I go and search for the station I want and then get to hourly data. It shows me one day worth, but will let me download the whole month as a csv. However, I am hoping to download or get many years of hourly data for the specific station. I would like to not do this one month at a time. I was wondering if anyone has insight on how to efficiently do this?
There is a section for get more data: https://collaboration.cmc.ec.gc.ca/cmc/climate/Get_More_Data_Plus_de_donnees/ but I am not well versed enough to fully understand how to use this and then what is the best way to get it into excel format.
Thanks!!
I'm not sure how to pull more than the one month csv file which is what I have tried so far.
The site says
So the server will only give one month per request. However, if we can make a table of years and months (as numbers) then we can make a list of urls and have PowerQuery get them all!
So let's say you want to get 5 years of data starting with November 2001. We can get the URL per month with a query like...
If you called that query "URLs", and then create a function query called "fCsvFromUrl" with code like
Then the combined data would be:
Now, I have not debugged any of this, but once you debug I believe this will work!