Skip to main content

A tool for cleaning and processing CPCB air quality data

Project description

AirPy Tool

A Python package for cleaning and processing CPCB air quality data.

Installation

You can install AirPy from PyPI:

pip install airpy-tool

You can also install directly from GitHub:

pip install git+https://github.com/chandankr014/airpy-tool.git

Or clone the repository and install locally:

git clone https://github.com/chandankr014/airpy-tool.git
cd airpy-tool
pip install -e .

Usage

Command-line Interface

AirPy provides a command-line tool for processing air quality data:

# Process all data
airpy

# Process data for a specific city
airpy --city "Delhi"

# Process live data
airpy --live

# Specify custom directories
airpy --raw-dir /path/to/raw/data --clean-dir /path/to/output

# Process specific pollutants
airpy --pollutants PM25 PM10 NO2

Python API

You can also use AirPy as a Python library:

from airpy.core.processor import process_data

# Process data with default settings
process_data()

# Process data for a specific city
process_data(city="Delhi")

# Process live data
process_data(live=True)

# Specify custom directories
process_data(raw_dir="/path/to/raw/data", clean_dir="/path/to/output")

# Process specific pollutants
process_data(pollutants=["PM25", "PM10", "NO2"])

Features

AirPy provides the following features for air quality data processing:

  • Data cleaning and formatting
  • Outlier detection and removal
  • Consecutive repeat detection
  • Unit inconsistency correction for nitrogen compounds
  • Time series analysis and visualization

Data Format

AirPy supports the following file formats:

  • CSV files
  • Excel (XLSX) files

The data should follow one of these filename formats:

  • 15Min_YEAR_site_ID_STATION_CITY_ORG_15Min.csv
  • Raw_data_15Min_YEAR_site_ID_STATION_CITY_ORG_15Min.csv
  • site_ID_YEAR.csv
  • Live data format: site_IDYYYYMMDDHHMMSS.xlsx

Accessing CPCB State and City-wise Data

You can access the complete CPCB air quality dataset, organized by state and city, using the following link:

Download CPCB State and City-wise Data

License

This project is licensed under the MIT License - see the LICENSE file for details.

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

airpy_tool-1.1.0.tar.gz (32.9 kB view details)

Uploaded Source

Built Distribution

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

airpy_tool-1.1.0-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

File details

Details for the file airpy_tool-1.1.0.tar.gz.

File metadata

  • Download URL: airpy_tool-1.1.0.tar.gz
  • Upload date:
  • Size: 32.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for airpy_tool-1.1.0.tar.gz
Algorithm Hash digest
SHA256 6f5bb10c97f531bf8179ee97b8104bd972879108ce70a8934dd1c337d7c4548f
MD5 af7eef1c47ed2b1f40820d49ed76b260
BLAKE2b-256 78e6548aabd9565851c6d87783f145d0e002966e51b07742cf9b17f9ca92e166

See more details on using hashes here.

File details

Details for the file airpy_tool-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: airpy_tool-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 32.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for airpy_tool-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c0a7095134bfc050438af0f9ca1f88082fefad65d9a3b1ba2cebef1728f6b40
MD5 d941af4c03994955477802c0da835193
BLAKE2b-256 2fea982fc5c4e9530bc17663fb8c689d6f37c506b14d7b00fc3388353a864b60

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