Air Quality Observed
This repository is now archived and subsequent works will be carried out the in Smart data models repositories.The latest version of this Data Model can be found at https://github.com/smart-data-models/dataModel.Environment
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 toAirQualityObserved
. -
dataProvider
: Specifies the URL to information about the provider of this information- Attribute type: Property. URL
- Optional
-
dateModified
: Last update timestamp of this entity.- Attribute type: Property. DateTime
- Read-Only. Automatically generated.
-
dateCreated
: Entity's creation timestamp.- Attribute type: Property. DateTime
- Read-Only. Automatically generated.
-
location
: Location of the air quality observation represented by a GeoJSON geometry.- Attribute type: GeoProperty.
geo:json
. - Normative References: https://tools.ietf.org/html/rfc7946
- Mandatory if
address
is not defined.
- Attribute type: GeoProperty.
-
address
: Civic address of the air quality observation. Sometimes it corresponds to the air quality station address.- Normative References: https://schema.org/address
- Mandatory if
location
is not present.
-
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. -
areaServed
: Higher level area to which this air quality measurement belongs to. It can be used to group air quality measurements per district, neighbourhood, etc.- Attribute type: Property. Text
- Normative References: https://schema.org/areaServed
- Optional
-
source
: A sequence of characters giving the source of the entity data. -
airQualityLevel
: Overall qualitative level of health concern corresponding to the air quality observed.- Attribute type: Property. 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:
- Optional
-
airQualityIndex
: Air quality index corresponding to the air quality observed. -
reliability
: Reliability (percentage, expressed in parts per one) corresponding to the air quality observed.- Attribute type: Property. Number
- Allowed values: Interval [0,1]
- Optional
-
refDevice
: A reference to the device(s) which captured this observation.- Attribute type: Relationship. Reference to an entity of type
Device
- Optional
- Attribute type: Relationship. Reference to an entity of type
-
refPointOfInterest
: A reference to a point of interest (usually an air quality station) associated to this observation.- Attribute type: Relationship. Reference to an entity of type
PointOfInterest
- Optional
- Attribute type: Relationship. Reference to an entity of type
Representing air pollutants
In order to enable a proper management of 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: Property. 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 omitted if the observation time is the same as the one captured by thedateObserved
attribute at entity level.- Type: DateTime
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 andGQ
represents micrograms per cubic meter.- Type: Text
- Mandatory
description
: short description of the measurand- Attribute type: Property. Text
- Normative References:
https://uri.etsi.org/ngsi-ld/description
equivalent to description - 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 instanceCO_Level
. - Attribute type: Property. Text
- Attribute value: 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:
Representing airquality-related weather conditions
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 namedrefWeatherObserved
). - 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.- Attribute type: Relationship. Reference to a WeatherObserved entity.
- Optional
Note: JSON Schemas are intended to capture the data type and associated constraints of the different Attributes, regardless their final representation format in NGSI(v2, LD).
Examples
Normalized Example
Normalized NGSI response
{
"id": "Madrid-AmbientObserved-28079004-2016-03-15T11:00:00",
"type": "AirQualityObserved",
"dateObserved": {
"value": "2016-03-15T11:00:00/2016-03-15T12:00:00"
},
"airQualityLevel": {
"value": "moderate"
},
"CO": {
"value": 500,
"metadata": {
"unitCode": {
"value": "GP"
}
}
},
"temperature": {
"value": 12.2
},
"NO": {
"value": 45,
"metadata": {
"unitCode": {
"value": "GQ"
}
}
},
"refPointOfInterest": {
"type": "Relationship",
"value": "28079004-Pza.deEspanya"
},
"windDirection": {
"value": 186
},
"source": {
"value": "http://datos.madrid.es"
},
"windSpeed": {
"value": 0.64
},
"SO2": {
"value": 11,
"metadata": {
"unitCode": {
"value": "GQ"
}
}
},
"NOx": {
"value": 139,
"metadata": {
"unitCode": {
"value": "GQ"
}
}
},
"location": {
"type": "geo:json",
"value": {
"type": "Point",
"coordinates": [-3.712247222222222, 40.423852777777775]
}
},
"airQualityIndex": {
"value": 65
},
"address": {
"type": "PostalAddress",
"value": {
"addressCountry": "ES",
"addressLocality": "Madrid",
"streetAddress": "Plaza de Espa\u00f1a"
}
},
"reliability": {
"value": 0.7
},
"relativeHumidity": {
"value": 0.54
},
"precipitation": {
"value": 0
},
"NO2": {
"value": 69,
"metadata": {
"unitCode": {
"value": "GQ"
}
}
},
"CO_Level": {
"value": "moderate"
}
}
key-value pairs Example
Sample uses simplified representation for data consumers ?options=keyValues
{
"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"
}
LD Example
Sample uses the NGSI-LD representation
{
"id": "urn:ngsi-ld:AirQualityObserved:Madrid-AmbientObserved-28079004-2016-03-15T11:00:00",
"type": "AirQualityObserved",
"dateObserved": {
"type": "Property",
"value": "2016-03-15T11:00:00/2016-03-15T12:00:00"
},
"airQualityLevel": {
"type": "Property",
"value": "moderate"
},
"CO": {
"type": "Property",
"value": 500,
"unitCode": "GP"
},
"temperature": {
"type": "Property",
"value": 12.2
},
"NO": {
"type": "Property",
"value": 45,
"unitCode": "GQ"
},
"refPointOfInterest": {
"type": "Relationship",
"object": "urn:ngsi-ld:PointOfInterest:28079004-Pza.deEspanya"
},
"windDirection": {
"type": "Property",
"value": 186
},
"source": {
"type": "Property",
"value": "http://datos.madrid.es"
},
"windSpeed": {
"type": "Property",
"value": 0.64
},
"SO2": {
"type": "Property",
"value": 11,
"unitCode": "GQ"
},
"NOx": {
"type": "Property",
"value": 139,
"unitCode": "GQ"
},
"location": {
"type": "GeoProperty",
"value": {
"type": "Point",
"coordinates": [-3.712247222222222, 40.423852777777775]
}
},
"airQualityIndex": {
"type": "Property",
"value": 65
},
"address": {
"type": "Property",
"value": {
"addressCountry": "ES",
"addressLocality": "Madrid",
"streetAddress": "Plaza de Espa\u00f1a",
"type": "PostalAddress"
}
},
"reliability": {
"type": "Property",
"value": 0.7
},
"relativeHumidity": {
"type": "Property",
"value": 0.54
},
"precipitation": {
"type": "Property",
"value": 0
},
"NO2": {
"type": "Property",
"value": 69,
"unitCode": "GQ"
},
"CO_Level": {
"type": "Property",
"value": "moderate"
},
"@context": [
"https://schema.lab.fiware.org/ld/context",
"https://uri.etsi.org/ngsi-ld/v1/ngsi-ld-core-context.jsonld"
]
}
You can read about public instance offering information about observed air quality here.