Skip to main content

Data quality

For any equipment, there are certain environmental conditions under which the obtained data are recognized as metrologically relevant, which means these data can be trusted. These conditions include temperature and humidity ranges. The limits of these ranges are specified in the description of the type of measuring equipment in the Russian measurement system: to CityAir monitoring site, to G extension modules, to Dust.

Equipment operating conditions

Condition
Ambient temperature rangefrom -40°C to +50°C
Ambient relative humiditynot exceeding 98%
Atmospheric pressurefrom 84 to 106,7 kPa

Data marking

There are several key data markers::

  • Warning
  • The value for the measured gas has exceeded the upper limit of the measurement range
  • The values for all measured gases may be uncertain due to out-of-limit weather parameters (T, RH)
  • Missing data

Available marker codes

CodeDescription
LowValue_TemperatureChecking the lower temperature limit
LowValue_SO2Checking the lower limit of SO2
LowValue_PM25Checking the lower limit of PM2.5
LowValue_PM10Checking the lower limit of PM10
LowValue_O3Checking the lower limit of O3
LowValue_NO2Checking the lower limit of NO2
LowValue_H2SChecking the lower limit of H2S
LowValue_COChecking the lower limit of CO
HighValue_TemperatureChecking the upper temperature limit
HighValue_SO2Checking the upper limit of SO2
HighValue_PM25Checking the upper limit of PM2.5
HighValue_PM10Checking the upper limit of PM10
HighValue_O3Checking the upper limit of O3
HighValue_NO2Checking the upper limit of NO2
HighValue_HumidityChecking the upper limit of humidity
HighValue_H2SChecking the upper limit of H2S
HighValue_COChecking the upper limit of CO

Criteria for marking N-minute averaging intervals

The general criteria are that if 50% of data per an averaging interval is uncertain then all data from this interval are marked as uncertain. For example, if data from two or more 5-minute intervals is uncertain within a 20-minute interval then the entire 20-minute interval is marked as uncertain. If data from two or three 20-minute intervals are uncertain in a 1-hour interval, then the entire 1-hour interval is marked as uncertain. If data from 12 or more 1-hour intervals is uncertain then the entire 24-hour interval is marked as uncertain.

  • 5-minute averaging: if 3 or more data packets meet the conditions, then a warning appears for this 5-minute interval
  • 20-minute averaging: if 2 or more 5-minute intervals meet the conditions, then a warning appears for this 20-minute interval
  • 1-hour averaging: if 2 or more 20-minute intervals meet the conditions, then a warning appears for this 1-hour interval
  • 24-hour averaging: if 12 or more hours meet the conditions, then a warning appears for this 24-hour interval

Example of getting a dictionary of available data quality markers


import requests

TOKEN = 'YOUR TOKEN'
headers = {
'Accept': 'application/json',
'Authorization': f'Bearer {TOKEN}',
}

response = requests.get('https://mycityair.ru/harvester/v2/dataquality/markers', headers=headers)

if response.status_code == 200:
print(response.json()) # ok
else:
print(response.text) # error

Example of obtaining Post data quality markers for a specified period


import requests

TOKEN = 'YOUR TOKEN'
headers = {
'Accept': 'application/json',
'Authorization': f'Bearer {TOKEN}',
}

interval = '1h'
version = 556789
post_id = 'A post id (number)'
date__gt = '2023-06-01'
date__lt = '2023-07-01'
url = f'https://mycityair.ru/harvester/v2/Posts/{post_id}/markers?date__gt={date__gt}&date__lt={date__lt}&Interval={interval}'

response = requests.get(url, headers=headers)

if response.status_code == 200:
print(response.json()) # ok
else:
print(response.text) # error