weather-gc-ca-python
Jupyter notebooks for scraping Environment Canada weather data
This repo demonstrates how to download Environment Canada's weather data using Python with popular data analysis libraries like pandas and Beautiful Soup. Read the accompanying blog post here on the UBC Envision website for more details.
Summary
-
Download CSV weather data from this link: http://climate.weather.gc.ca/climate_data/bulk_data_e.html?format=csv&stationID=51442&Year=2020&Month=01&timeframe=1
-
Replace
stationID
,Year
andMonth
with the dataset that you'd like to download. -
StationIDs can be found here: http://climate.weather.gc.ca/historical_data/search_historic_data_e.html
-
This notebook shows you how to download multiple CSV files across different cities by scraping data using BeautifulSoup.
- Scripts are working as of March 2020
Launch
To run this notebook interactively on the cloud, click the Launch Binder button or use the Syzygy platform.
Feel free to use, copy, paste, modify or distribute this notebook however you wish.
These examples are provided as-is with no guarantee that they will work in the future if Environment Canada modifies their API.
Similar projects:
- data-gc-ca-api, but it's about 2 years old, not sure if it's still working.