AirQuality

AirQuality

Class to parse air data object.

Constructor

new AirQuality(airData)

Create a AirQuality.

Parameters:
Name Type Description
airData AirQuality~Object

Raw air data object.

Properties:
Name Type Description
airData AirQuality~DataObject

Air data object.

raw AirQuality~Object

Raw air data object.

Source:

Methods

getId() → {number}

Returns the station id.

Source:
Example
const airQuality = new AirQuality(airData);
const stationID = airQuality.getId();

getData() → {AirQuality~DataObject}

Returns air quality data.

Source:
Example
const airQuality = new AirQuality(airData);
const airQualityData = airQuality.getData();

getParam() → {AirQuality~DataObject}

Returns air quality data for param.

Source:
Example
const airQuality = new AirQuality(airData);
const airQualityData = airQuality.getParam("PM10");

getRaw() → {AirQuality~Object}

Returns raw air quality data object.

Source:
Example
const airQuality = new AirQuality(airData);
const rawAirQualityData = airQuality.raw();

Type Definitions

Object :object

AirQuality raw data object

Properties:
Name Type Description
id number

Station id.

stCalcDate string | number

ST calculation date

stIndexLevel object

ST index level

Properties
Name Type Description
id number

ST index level id

indexLevelName string

ST index level name

stSourceDataDate string

ST source data date

so2CalcDate string | number

SO2 calculation date

so2IndexLevel object

SO2 index level

Properties
Name Type Description
id number

SO2 index level id

indexLevelName string

SO2 index level name

so2SourceDataDate string

SO2 source data date

no2CalcDate string | number

NO2 calculation date

no2IndexLevel object

NO2 index level

Properties
Name Type Description
id number

NO2 index level id

indexLevelName string

NO2 index level name

no2SourceDataDate string

NO2 source data date

coCalcDate string | number

CO calculation date

coIndexLevel object

CO index level

Properties
Name Type Description
id number

CO index level id

indexLevelName string

CO index level name

coSourceDataDate string

CO source data date

pm10CalcDate string | number

PM10 calculation date

pm10IndexLevel object

PM10 index level

Properties
Name Type Description
id number

PM10 index level id

indexLevelName string

PM10 index level name

pm10SourceDataDate string

PM10 source data date

pm25CalcDate string | number

PM2.5 calculation date

pm25IndexLevel object

PM2.5 index level

Properties
Name Type Description
id number

PM2.5 index level id

indexLevelName string

PM2.5 index level name

pm25SourceDataDate string

PM2.5 source data date

o3CalcDate string | number

O3 calculation date

o3IndexLevel object

O3 index level

Properties
Name Type Description
id number

O3 index level id

indexLevelName string

O3 index level name

o3SourceDataDate string

O3 source data date

c6h6CalcDate string | number

C6H6 calculation date

c6h6IndexLevel object

C6H6 index level

Properties
Name Type Description
id number

C6H6 index level id

indexLevelName string

C6H6 index level name

c6h6SourceDataDate string

C6H6 source data date

stIndexStatus boolean

ST status

stIndexCrParam string

ST param

Source:

DataObject :object

AirQuality data object

Properties:
Name Type Description
stationId numbert

Station id

SO2 object

SO2 measurement data

Properties
Name Type Description
id number

SO2 measurement level id

calcTimestamp number

SO2 calculate date and time

sourceTimestamp number

SO2 source date and time

name string

SO2 measurement level name

NO2 object

NO2 measurement data

Properties
Name Type Description
id number

NO2 measurement level id

calcTimestamp number

SO2 calculate date and time

sourceTimestamp number

NO2 source date and time

name string

NO2 measurement level name

CO object

CO measurement data

Properties
Name Type Description
id number

CO measurement level id

calcTimestamp number

SO2 calculate date and time

sourceTimestamp number

CO source date and time

name string

CO measurement level name

PM10 object

PM10 measurement data

Properties
Name Type Description
id number

PM10 measurement level id

calcTimestamp number

SO2 calculate date and time

sourceTimestamp number

PM10 source date and time

name string

PM10 measurement level name

PM25 object

PM25 measurement data

Properties
Name Type Description
id number

PM25 measurement level id

calcTimestamp number

SO2 calculate date and time

sourceTimestamp number

PM25 source date and time

name string

PM25 measurement level name

O3 object

O3 measurement data

Properties
Name Type Description
id number

O3 measurement level id

calcTimestamp number

SO2 calculate date and time

sourceTimestamp number

O3 source date and time

name string

O3 measurement level name

C6H6 object

C6H6 measurement data

Properties
Name Type Description
id number

C6H6 measurement level id

calcTimestamp number

SO2 calculate date and time

sourceTimestamp number

C6H6 source date and time

name string

C6H6 measurement level name

Source: