Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

qrt

portothree139MIT10.10.1

Air Quality Toolkit

air, quality, aqi

readme

qrt Build Status

Air Quality Toolkit

Install

$ npm install qrt

Usage

const { windDirectionMean } = require('qrt');

windDirectionMean([360, 45, 90]);
//=> 45

API

windDirectionMean(...args)

  • args

    • Wind direction only: Array<number>
    • Wind direction and speed: Array<number>, Array<number>
    • Wind direction and speed in a '2d' array: <Array<Array<number>>>
// Wind directions only
windDirectionMean([360, 45, 90]); // => 45

// Wind directions and speeds
windDirectionMean([360, 45, 90], [1.48, 1.78, 3.44]); // => 59.76

// Wind directions and speeds in '2d' format
windDirectionMean([
    [360, 1.48],
    [45, 1.78],
    [90, 3.44],
]); // => 59.76

airQualityIndex(PM10, PM25, NO2, O3, SO2)

  • PM10 - Average hourly as Number
  • PM25 - Average hourly as Number
  • NO2 - Average hourly as Number
  • O3 - Average hourly as Number
  • SO2 - Average hourly as Number
airQualityIndex(5, 0, 0, 0, 0); // => { AQI_POL: 'PM10', AQI_GLOBAL: 5 }

noiseMean(samples)

Calculates noise using logarithic average of the values

  • samples - Array of noise measurements, Array<number>
noiseMean([70, 70, 70]); // => 70

bbox(coordinates)

Get an area defined by two longitudes and two latitudes of the maximum extents of a list of coordinates, in other words min(Latitude), min(Longitude), max(Latitude), max(Longitude)

  • coordinates - Two-dimensional array with latitude and longitude points
bbox([
    [51.28, 0.236],
    [51.494438, -0.489],
    [51.686, -0.050688],
]); // => [51.28, -0.489, 51.686, 0.236]

changelog

Changelog

All notable changes to this project will be documented in this file. See standard-version for commit guidelines.

1.10.1 (2021-10-09)

1.3.0 (2020-12-11)

Features

  • add Air Quality Index calculation function (47e4b42)