Air Quality Observed

Description

An observation of air quality conditions at a certain place and time. This data model has been developed in cooperation with mobile operators and the GSMA.

Data Model

A JSON Schema corresponding to this data model can be found here.

  • id : Unique identifier.

  • type : Entity type. It must be equal to AirQualityObserved.

  • dateModified : Last update timestamp of this entity.

  • dateCreated : Entity's creation timestamp.

  • location : Location of the air quality observation represented by a GeoJSON geometry.

  • address : Civic address of the air quality observation. Sometimes it corresponds to the air quality station address.

  • dateObserved : The date and time of this observation in ISO8601 UTCformat. It can be represented by an specific time instant or by an ISO8601 interval.

    • Attribute type: DateTime or an ISO8601 interval represented as Text.
    • Mandatory
  • source : A sequence of characters giving the source of the entity data.

    • Attribute type: Text or URL
    • Optional
  • airQualityLevel : Overall qualitative level of health concern corresponding to the air quality observed.

    • Attribute type: Text
    • Example values defined by the USA EPA Agency: (good, moderate, unhealthyForSensitiveGroups, unhealthy, veryUnhealthy, hazardous). As this can be different between countries, regulations or implementations, the set of allowed values will depend on the reference specification used. It is recommended that implementations use the same naming conventions as exemplified above (lower case starting words, camel case when compound terms are used)
    • Attribute metadata:
      • referenceSpecification : Specification that must be taken as reference when interpreting the supplied qualitative value.
    • Optional
  • airQualityIndex : Air quality index corresponding to the air quality observed.

    • Attribute type: Number
    • Attribute metadata:
      • referenceSpecification : Specification that must be taken as reference when interpreting or calculating the supplied air quality index.
    • Optional
  • reliability : Reliability (percentage, expressed in parts per one) corresponding to the air quality observed.

    • Attribute type: Number
    • Allowed values: Interval [0,1]
    • Optional
  • refDevice : A reference to the device(s) which captured this observation.

    • Attribute type: Reference to an entity of type Device
    • Optional
  • refPointOfInterest : A reference to a point of interest (usually an air quality station) associated to this observation.

    • Attribute type: Reference to an entity of type PointOfInterest
    • Optional

Representing air pollutants

In order to enable a proper management of the the concentrations of the different pollutants, for each pollutant (measurand) there must be an attribute which name MUST be exactly equal the chemical formula (or mnemonic) of the measurand, ex. CO. The structure of such an attribute will be as follows:

  • Attribute name: Equal to the name of the measurand, for instance CO.

  • Attribute type: Number

  • Attribute value: corresponds to the value for the measurand as a number.

  • Attribute metadata:

    • timestamp : optional timestamp for the observed value in ISO8601 format. It can be ommitted if the observation time is the same as the one captured by the dateObserved attribute at entity level.
    • unitCode : The unit code (text) of measurement given using the UN/CEFACT Common Code (max. 3 characters). For instance, GP represents milligrams per cubic meter and GQ represents micrograms per cubic meter.
      • Type: Text
      • Mandatory
    • description : short description of the measurand
      • Type: Text
      • Optional

Representing qualitative levels of the different air pollutants

In order to enable a proper management of the qualitative levels of the different pollutants, for each pollutant (measurand) there might be an attribute which name MUST be exactly equal to the concatenation of the chemical formula (or mnemonic) of the measurand with the string _Level, ex. CO_Level. To be more precise, the structure of such an attribute will be as follows:

  • Attribute name: Equal to the name of the measurand plus the suffix _Level, for instance CO_Level.
  • Attribute type: Text
  • Attribute value: one of (good, moderate, unhealthyForSensitiveGroups, unhealthy, veryUnhealthy, hazardous). As this can be different between countries, regulations or implementations, the set of allowed values will depend on the reference specification used. It is recommended that implementations use the same naming conventions as exemplified above (lower case starting words, camel case when compound terms are used)
  • Attribute metadata:
    • description : short description of the measurand and its related qualitative level
      • Type: Text
      • Optional
    • referenceSpecification : Specification that must be taken as reference when interpreting the supplied qualitative value.

Certain weather conditions have an influence over the observed air quality. There are two options for representing them:

  • A/ Through a linked entity of type WeatherObserved (attribute named refWeatherObserved).
  • B/ Through a group of weather-related properties already defined by WeatherObserved.

Below is the description of the attribute to be used for option A/.

  • refWeatherObserved : Weather observed associated to the air quality conditions described by this entity.

Examples of use

{
  "id": "Madrid-AmbientObserved-28079004-2016-03-15T11:00:00",
  "type": "AirQualityObserved",
  "address": {
    "addressCountry": "ES",
    "addressLocality": "Madrid",
    "streetAddress": "Plaza de España"
  },
  "dateObserved": "2016-03-15T11:00:00/2016-03-15T12:00:00",
  "location": {
    "type": "Point",
    "coordinates": [-3.712247222222222, 40.423852777777775]
  },
  "source": "http://datos.madrid.es",
  "precipitation": 0,
  "relativeHumidity": 0.54,
  "temperature": 12.2,
  "windDirection": 186,
  "windSpeed": 0.64,
  "airQualityLevel": "moderate",
  "reliability": 0.9,
  "CO": 500,
  "NO": 45,
  "NO2": 69,
  "NOx": 139,
  "SO2": 11,
  "CO_Level": "good",
  "NO_Level": "moderate",
  "refPointOfInterest": "28079004-Pza. de España"
}

Use it with a real service

To get access to a public instance offering air quality observed data please have a look at the GSMA's API Directory.

The instance described here has been set up by the FIWARE Community.

What was the air quality observed today at noon UTC at the "Plaza de España" (Madrid) air quality station?

curl -S -H 'fiware-service:airquality' -H 'fiware-servicepath:/Spain_Madrid' -H 'x-auth-token:<my_token>' "http://130.206.118.244:1027/v2/entities?options=keyValues &q=dateObserved:2016-11-28T12:00;stationCode:'28079004'"