Skip to content

A package for computing AQI values as defined by airnow.gov

Notifications You must be signed in to change notification settings

garethgeorge/airnow-aqi-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Airnow AQI

JavaScript utility for converting PPM readings to AQI values (as defined by airnow.gov as of Sept 2018) based on this reference document.

Currently supported pollutant types:

  • PM2.5
  • PM10

Installation

npm install --save airnow-aqi

Usage

import { computeAqi } from "airnow-aqi";
computeAqi([
  // provide an array of type and ppm reading values
  {
    type: "pm2.5", // valid types are "pm2.5" and "pm10"
    ppm: 10,
  },
]); // -> numeric AQI value is returned, -1 if PPM values are out of range.

TypeScript typings are provided for this package.

About

A package for computing AQI values as defined by airnow.gov

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published