Skip to main content

A Python package for democratizing access to ambient air pollution data and predictive analytics.

Project description

Environmental Insights

PyPI version
License: GPL-3.0-or-later

A Python package for democratizing access to ambient air pollution data and predictive analytics.


📖 Description

Environmental Insights provides easy-to-use functions to download, process, and analyze ambient air pollution and meteorological data over England.

  • Implements supervised machine-learning pipelines to predict hourly pollutant concentrations on a 1 km² grid.
  • Supplies both “typical day” aggregates (percentiles) and full hourly model outputs.
  • Includes geospatial utilities for mapping, interpolation, and uncertainty analysis.

⚙️ Installation

Install from PyPI:

pip install environmental-insights

Or from source:

git clone https://github.com/berrli/Environmental-Insights.git
cd Environmental-Insights
python -m build
pip install dist/environmental_insights-0.2.1b0-py3-none-any.whl

🔗 Dependencies

  • Python ≥ 3.10
  • geopandas ≥ 1.0.1
  • lightgbm
  • matplotlib
  • overpy
  • pandas
  • pyarrow
  • pyogrio
  • requests
  • scipy
  • shapely
  • jupyterlab ≥ 4.4.2
  • xarray ≥ 2025.4.0
  • netcdf4 ≥ 1.7.2
  • scikit-learn ≥ 1.6.1

📂 Data Sources

This package downloads and processes two primary CEDA datasets:

  1. Synthetic Hourly Air Pollution Prediction Averages for England (SynthHAPPE)
    Berrisford, L. (2025). Synthetic Hourly Air Pollution Prediction Averages for England (SynthHAPPE). NERC EDS Centre for Environmental Data Analysis.
    DOI: 10.5285/4cbd9c53ab07497ba42de5043d1f414b

    Representative “typical day” profiles of NO₂, NO, NOₓ, O₃, PM₁₀, PM₂.₅ and SO₂ on a 1 km² grid, with 5th, 50th & 95th percentiles.

  2. Machine Learning for Hourly Air Pollution Prediction in England (ML-HAPPE)
    Berrisford, L. (2025). Machine Learning for Hourly Air Pollution Prediction in England (ML-HAPPE). NERC EDS Centre for Environmental Data Analysis.
    DOI: 10.5285/fc735f9878ed43e293b85f85e40df24d

    Full-year (2018) hourly modelled concentrations of NO₂, NO, NOₓ, O₃, PM₁₀, PM₂.₅ and SO₂ on a 1 km² grid, including 5th, 50th & 95th percentiles and underlying training data.


For full examples, see the Jupyter-Book tutorial in book/tutorial_environmental_insights.ipynb.

📚 Documentation

Build and view locally:

jupyter-book build book/

Then open book/_build/html/index.html in your browser.
Highlights:

  • API Reference: book/docs/api/environmental_insights/
  • Tutorial Notebook: book/tutorial_environmental_insights.ipynb

The documentation is also avaiable via the GitHub Pages Site


✅ Testing

Run the full test suite:

pytest

Integration and unit tests are under tests/.


🤝 Contributing

Contributions and bug-reports are very welcome! Please see CONTRIBUTING.md for details on:

  • Code style
  • Pull request process
  • Issue reporting

📑 Citation

If you use Environmental Insights in your work, please cite:

Berrisford, L. J. (2025). Environmental Insights: Democratizing access to ambient air pollution data and predictive analytics (Version 0.2.1b0) [Software]. GitHub. https://github.com/berrli/Environmental-Insights

Also cite the underlying datasets:

  • Berrisford, L. (2025). SynthHAPPE: Synthetic Hourly Air Pollution Prediction Averages for England. NERC EDS CEDA. DOI: 10.5285/4cbd9c53ab07497ba42de5043d1f414b
  • Berrisford, L. (2025). ML-HAPPE: Machine Learning for Hourly Air Pollution Prediction in England. NERC EDS CEDA. DOI: 10.5285/fc735f9878ed43e293b85f85e40df24d

📜 License

This project is released under the GPL-3.0-or-later.

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

environmental_insights-0.2.5.tar.gz (24.2 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

environmental_insights-0.2.5-py3-none-any.whl (24.1 MB view details)

Uploaded Python 3

File details

Details for the file environmental_insights-0.2.5.tar.gz.

File metadata

  • Download URL: environmental_insights-0.2.5.tar.gz
  • Upload date:
  • Size: 24.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for environmental_insights-0.2.5.tar.gz
Algorithm Hash digest
SHA256 fe4da492ef194be4c1e4fb1a5e7fec90ccad64cf4f31e1145d9d3e276d895265
MD5 794edf14176c60ab1538aec80ace729f
BLAKE2b-256 fb5a9b51de6dc7485ed1538ede0b15e18e350a32d4f92587381fbbd8ca611408

See more details on using hashes here.

File details

Details for the file environmental_insights-0.2.5-py3-none-any.whl.

File metadata

File hashes

Hashes for environmental_insights-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 993eb7875154da9baa99851ddb7e44e4b056eab91a49ee1b37a1b878acd431c2
MD5 e721b228ee1b588fc167b9121452184b
BLAKE2b-256 af9c4383458f3d98a88b0aa59f3c9a73760a00917edcd832b47245afacc2d9bb

See more details on using hashes here.

Supported by

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