Skip to main content

A package which provides various functionalities on air pollution data.

Project description

airpyllution

codecov build deploy

A package for visualizing or obtaining future, historic and current air pollution data using the OpenWeather API.

Summary

This package enables users to explore air pollution levels in locations around the world. Using the Air Pollution API, this package provides 3 functions that help to visualise present, future and historic air pollution data.

The data returned from the API includes the polluting gases such as Carbon monoxide (CO), Nitrogen monoxide (NO), Nitrogen dioxide (NO2), Ozone (O3), Sulphur dioxide (SO2), Ammonia (NH3), and particulates (PM2.5 and PM10).

Using the OpenWeatherMap API requires sign up to gain access to an API key.
For more information about API call limits and API care recommendations please visit the OpenWeather how to start page.

Functions

The functions are as follows:

  • get_air_pollution()
  • get_pollution_history()
  • get_pollution_forecast()

get_air_pollution()

Fetches the air pollution levels based on a location. Based on the values of the polluting gases, this package uses the Air Quality Index to determine the level of pollution for the location and produces a coloured map of the area displaying the varying regions of air quality.

get_pollution_history()

Requires a start and end date and fetches historic air pollution data for a specific location. The function returns a data frame with the values of the polluting gases over the specified date range.

get_pollution_forecast()

Fetches air pollution data for the next 5 days for a specific location. The function returns a time series plot of the predicted pollution levels.

Although there is an abundance of python weather packages and APIs in the Python ecosystem (e.g. python-weather, weather-forecast), this particular package looks at specifically air pollution data and uses the Air Pollution API from OpenWeather. This is a unique package with functionality that (we believe) has not been made before.

Installation

$ pip install --index-url https://test.pypi.org/simple/ \
  --extra-index-url https://pypi.org/simple airpyllution

Usage

readthedocs

  1. Create an OpenWeatherMap API key
  2. Install airpyllution
  3. Refer to ReadTheDocs for a usage guide and examples.

Using the get_air_pollution function you can generate interactive maps containing current pollution data by location:

Using the get_pollution_forecast function you can generate time-series scatterplots of forecasted air pollution data:

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

Contributors

  • Christopher Alexander (@christopheralex)
  • Daniel King (@danfke)
  • Mel Liow (@mel-liow)

License

airpyllution was created by Christopher Alexander, Daniel King, Mel Liow. It is licensed under the terms of the MIT license.

Credits

airpyllution was created with cookiecutter and the py-pkgs-cookiecutter template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

airpyllution-1.1.1.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

airpyllution-1.1.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file airpyllution-1.1.1.tar.gz.

File metadata

  • Download URL: airpyllution-1.1.1.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for airpyllution-1.1.1.tar.gz
Algorithm Hash digest
SHA256 dc0eba2fe72b861db3ec4fc3641fc08d0c818693b04a2c6bc8ca421b80d8c042
MD5 4bba1be168e87f057167ffcd469bb95a
BLAKE2b-256 c4144cc93c36f2ee4fb509d85cb7d1efbbc0ae82ca7e7ce4cccac1093e2c97b5

See more details on using hashes here.

File details

Details for the file airpyllution-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: airpyllution-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10

File hashes

Hashes for airpyllution-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9d0efa9b50808392db1f0804332ffe667e007c23ff30bd606f6295c30fad1341
MD5 82e874c8f439df889ca312b3a52a7c1d
BLAKE2b-256 2e1966f1e2514975d05d59804cdef60ef61465851efe6e0e5e6103ac6169827b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page