Welcome to ClientVPS Mirrors

Help for package AQIR

Package {AQIR}


Type: Package
Title: Air Quality Indexing and Statistical Reporting
Version: 0.1.0
Description: Provides a comprehensive framework for Air Quality Index (AQI) analysis from air pollutant concentration data using Central Pollution Control Board (CPCB) criteria. Calculates pollutant-specific AQI sub-indices and derives the overall AQI and its category, identifies the primary pollutant, and summarises, ranks, and visualizes results across monitoring locations. Methodology follows Central Pollution Control Board (2014,"National Air Quality Index") https://app.cpcbccr.com/ccr_docs/FINAL-REPORT_AQI_.pdf.
License: GPL-3
Encoding: UTF-8
Imports: ggplot2, lubridate, stats, utils
Suggests: plotly, readxl
Depends: R (≥ 4.1.0)
Config/roxygen2/version: 8.1.0
NeedsCompilation: no
Packaged: 2026-08-26 12:54:54 UTC; JARVIS
Author: S. Hariharan [aut, cre], V. Ra. Charumathi [aut], S. Vishnu Shankar [aut]
Maintainer: S. Hariharan <Hari1971haran@gmail.com>
Repository: CRAN
Date/Publication: 2026-09-08 13:40:35 UTC

Air Quality Indexing and Statistical Reporting

Description

Provides a comprehensive framework for Air Quality Index (AQI) analysis from air pollutant concentration data using Central Pollution Control Board (CPCB) criteria. Calculates pollutant-specific AQI sub-indices and derives the overall AQI and its category, identifies the primary pollutant, and summarises, ranks, and visualizes results across monitoring locations.

Usage

AQIR(data, verbose = TRUE)

Arguments

data

A data frame or tibble, or a file path (.csv, .xlsx, or .xls) pointing to one, containing the columns City and Datetime along with at least one of the pollutant columns PM25, PM10, NO2, SO2, CO, and NH3. Any of these pollutant columns not present in the data are skipped. Reading .xlsx/.xls files requires the readxl package.

verbose

Logical. If TRUE, summary statistics, plots, and progress messages are displayed.

Details

The function accepts a data frame/tibble or a CSV/Excel file path, validates and cleans the input (parsing dates, coercing pollutant values to numeric, and removing rows with missing, negative, or unparseable readings), computes pollutant-specific AQI sub-indices using standard CPCB breakpoint tables, determines the overall AQI as the maximum sub-index among the available pollutants, identifies the dominant (primary) pollutant, classifies air quality into standard AQI categories, summarizes AQI by month and location, ranks monitoring locations by average AQI, and produces graphical visualizations of the results.

Value

An invisible list containing:

References

Central Pollution Control Board (2014). "National Air Quality Index". https://app.cpcbccr.com/ccr_docs/FINAL-REPORT_AQI_.pdf

Examples

# A small example dataset
air_data <- data.frame(
  City = c("Chennai", "Coimbatore", "Madurai"),
  Datetime = c("2025-01-01", "2025-01-02", "2025-01-03"),
  PM25 = c(35, 28, 65),
  PM10 = c(70, 55, 120),
  NO2 = c(22, 18, 45),
  SO2 = c(10, 8, 20),
  CO = c(0.8, 0.6, 2.5),
  NH3 = c(120, 110, 180)
)

result <- AQIR(air_data, verbose = FALSE)

Need a high-speed mirror for your open-source project?
Contact our mirror admin team at info@clientvps.com.

This archive is provided as a free public service to the community.
Proudly supported by infrastructure from VPSPulse , RxServers , BuyNumber , UnitVPS , OffshoreName and secure payment technology by ArionPay.