A package to access meteorological data from Environment Canada
Project description
Environment Canada (env_canada)
This package provides access to various data sources published by Environment and Climate Change Canada.
Weather Observations and Forecasts
ECWeather
provides current conditions and forecasts. It automatically determines which weather station to use based on latitude/longitude provided. It is also possible to specify a specific station code of the form AB/s0000123
based on those listed in this CSV file. For example:
import asyncio
from env_canada import ECWeather
ec_en = ECWeather(coordinates=(50, -100))
ec_fr = ECWeather(station_id='ON/s0000430', language='french')
asyncio.run(ec_en.update())
# current conditions
ec_en.conditions
# daily forecasts
ec_en.daily_forecasts
# hourly forecasts
ec_en.hourly_forecasts
# alerts
ec_en.alerts
Weather Radar
ECRadar
provides Environment Canada meteorological radar imagery.
import asyncio
from env_canada import ECRadar
radar_coords = ECRadar(coordinates=(50, -100))
# Conditions Available
animated_gif = asyncio.run(radar_coords.get_loop())
latest_png = asyncio.run(radar_coords.get_latest_frame())
Air Quality Health Index (AQHI)
ECAirQuality
provides Environment Canada air quality data.
import asyncio
from env_canada import ECAirQuality
aqhi_coords = ECAirQuality(coordinates=(50, -100))
asyncio.run(aqhi_coords.update())
# Data available
aqhi_coords.current
aqhi_coords.forecasts
Water Level and Flow
ECHydro
provides Environment Canada hydrometric data.
import asyncio
from env_canada import ECHydro
hydro_coords = ECHydro(coordinates=(50, -100))
asyncio.run(hydro_coords.update())
# Data available
hydro_coords.measurements
License
The code is available under terms of MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file env_canada-0.4.1.tar.gz
.
File metadata
- Download URL: env_canada-0.4.1.tar.gz
- Upload date:
- Size: 15.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.23.0 setuptools/47.1.1.post20200604 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee8c4d9bdc5922480ae4199b91ec9b822c87fde454cd5ae694daf9cb9c35365c |
|
MD5 | 9c0c7c2b6ba3a1e14abc4343abffdfac |
|
BLAKE2b-256 | ee2f967810c0b62aca8e463affb04b203e1bdf2d512117dd7174bb0dd408aecd |
File details
Details for the file env_canada-0.4.1-py3-none-any.whl
.
File metadata
- Download URL: env_canada-0.4.1-py3-none-any.whl
- Upload date:
- Size: 21.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 003b9e94bed439d34ed789835d2f7ee1f84560ba69d161e760449eb2809682c4 |
|
MD5 | c7b8473bcd976be8f3edcbd1ab83893a |
|
BLAKE2b-256 | 0f266fe9c6eee0c7808d3182538d8967870cd405e34972d5705817d6227c632a |