AIR QUALITY · DATASET

The measurements behind the daily profiles

Where the hourly gas-sensor readings come from, what the file contains, and how missing readings decide which 357 days enter the analysis.

9,357usable hourly records
15columns after cleanup
5metal-oxide sensor channels
357shared complete analysis days
Dataset overviewidentity, coverage and sample unit

Air Quality · UCI 360

The UCI record describes hourly measurements at a roadside site in an Italian city from five metal-oxide gas sensors, whose electrical response changes with the surrounding air, and from reference analysers, instruments that report gas concentrations for comparison.

Attribution: Saverio De Vito. Dataset DOI: 10.24432/C59K5F.

This supplied CSV

2004-03-10 18:00 → 2005-04-04 14:00

9,357 usable hourly records, 15 columns and no duplicate timestamps. One raw row is an hourly observation; one analysis row is a complete day for a single sensor.

The stored hourly clock has no missing hours.

Source and provenanceeleven checks against the supplied file

Path of the data: UCI Air Quality · dataset 360 → supplied AirQuality package → original CSV and saved analysis → these pages.

The source report cites De Vito et al., Sensors and Actuators B 129(2), 2008, 750–757, and refers to a Kaggle redistribution of the data.

PropertySource description / original reportWhat this file or record supports
InstancesOriginal card comparison: 9,357; UCI record: 9,3589,357 timestamped rows after removing 114 blank rows.
File formatCSVSemicolon separators; decimal commas; 2 empty unnamed columns.
Attributes15 columns / featuresDate, Time and 13 numeric fields after cleanup.
Recording periodMarch 2004–February 200510 March 2004 18:00 to 4 April 2005 14:00; approximately 12.8 months.
SamplingHourly averages9,357 expected hourly slots, 9,356 one-hour gaps, no duplicate timestamps.
Missing-value convention−200 marks missing observationsThe sentinel occurs in every numeric field; it must not be treated as a measurement.
NMHC coverageListed as a reference-labelled variable90.2% missing; 914 observed hours, all within the first March–May window.
Benzene referenceC6H6(GT), described as a concentrationStrongly coupled to S2 (r = 0.982).
LicenceResearch-only wording appears in the descriptionThe UCI record also displays a CC BY 4.0 licence label; both statements appear on the UCI page itself.
Absolute humidityAH is listed alongside T and RHr = 0.999908 against a Magnus transform of T and RH.
Drift and cross-sensitivityDescribed as characteristics of the deploymentS4 PC1 / retained-day order r = −0.652.
FieldRecorded metadata
CreatorSaverio De Vito (ENEA)
Donated to UCI22 March 2016
Dataset DOI10.24432/C59K5F
Licence labelCC BY 4.0; see the Licence row above
Instances / features9,358 / 15 as listed in the UCI record

Local package imported 30 September 2026; UCI metadata checked 1 October 2026.

Fields and unitsmeasurements, sensor outputs and time
FieldsMeaningUnits / format
Date / TimeRecorded date and hourDD/MM/YYYY · HH.MM.SS
PT08.S1–S5Hourly responses of the five metal-oxide sensorsRaw sensor scale, not a gas concentration
CO(GT)Reference CO concentrationmg/m³
NMHC(GT) / C6H6(GT)Reference-labelled hydrocarbons / benzeneµg/m³
NOx(GT)Reference total nitrogen oxidesppb
NO2(GT)Reference nitrogen dioxideµg/m³
T / RHTemperature / relative humidity°C / %
AHAbsolute humidityUnit not recorded in this CSV

Each sensor’s oxide and the gas it was designed to target (its nominal target): S1 tin oxide / CO; S2 titania / NMHC; S3 tungsten oxide / NOx; S4 tungsten oxide / NO₂; S5 indium oxide / O₃.

A look at the raw recordssix original hourly rows

The file uses semicolons as separators and commas as decimal points, and marks a missing reading with −200. The preview below shows the first six rows after parsing.

DateTimePT08.S1(CO)PT08.S2(NMHC)TRHCO(GT)
10/03/200418.00.001360.01046.013.648.92.6
10/03/200419.00.001292.0955.013.347.72.0
10/03/200420.00.001402.0939.011.954.02.2
10/03/200421.00.001376.0948.011.060.02.2
10/03/200422.00.001272.0836.011.259.61.6
10/03/200423.00.001197.0750.011.259.21.2
Hourly rows → replace −200 with missing → group by recorded date → keep 24 complete sensor hours → five aligned 357 × 24 matrices

The full matrix viewer is on the Workflow page.

Missingness and day selectionabsent readings are not zero pollution
FieldMissing hourly readingsMissing share
CO(GT)1,68318.0%
PT08.S1(CO)3663.9%
NMHC(GT)8,44390.2%
C6H6(GT)3663.9%
PT08.S2(NMHC)3663.9%
NOx(GT)1,63917.5%
PT08.S3(NOx)3663.9%
NO2(GT)1,64217.5%
PT08.S4(NO2)3663.9%
PT08.S5(O3)3663.9%
T3663.9%
RH3663.9%
AH3663.9%
391recorded calendar dates
389dates with 24 hourly rows
357complete dates across all sensors
32full dates excluded for missing readings

The first and last calendar dates are partial days. All five sensors are missing together for 366 hours, in 16 episodes (unbroken stretches of missing hours); the longest lasts 76 hours. Missing sensor values are not filled in.

Daily covariateAvailable daysEntirely absent days
Temperature, RH and AH3570
CO reference32136
NOx reference32334
NO₂ reference32334
Date order and calendar labels3570

Reference-gas daily means use the hours with readings on each day, so an available daily mean can rest on fewer than 24 readings.

What the file revealssix detailed data checks
01

Sensors and references have different missingness patterns

All five sensors are absent together for 366 hours. CO, NOx and NO₂ are all absent together for 1,226 hours; only 31 hours overlap. Here “reference absence” means all three fields are missing at once.

Sensor-only absence: 335 h · reference-only absence: 1,195 h · reference triple absent 3.3× as often

Complete sensor days can still contain missing reference readings.

02

Sensor gaps arrive in episodes

The 366 missing hours form 16 episodes, with median length 9 hours and maximum 76 hours. Five episodes exceed 24 hours.

Episode starts (stored clock)Missing hours
2004-06-19 14:00:0038
2004-08-26 06:00:0045
2004-12-14 17:00:0075
2005-01-02 21:00:0052
2005-02-08 17:00:0076

The analysis excludes the 32 otherwise full dates that contain these gaps and does not interpolate sensor readings.

03

NMHC describes an early window of the deployment

All 914 nonmissing NMHC observations lie between 10 March 2004 18:00 and 1 May 2004 00:00. They are not 914 consecutive hours: this window itself contains missing readings.

90.2% missing overall · approximately 51 calendar days between first and last observed value

A model that needs NMHC readings could use only early-2004 data.

04

AH closely follows a temperature–humidity transform

The supplied check compares AH with water-vapour partial pressure e calculated from T and RH using the Magnus formula, over jointly observed hourly rows.

r = 0.999908 · AH ≈ 0.979 e + 0.0121 · maximum absolute residual 0.0155

T, RH and AH contain strongly overlapping information.

05

Benzene and S2 are tightly coupled

1,078 of 1,245 distinct observed S2 values correspond to exactly one benzene value. The largest within-S2 spread is 0.1 µg/m³, one reported rounding step; group-mean benzene never decreases by more than that step as S2 increases.

Hourly Pearson r = 0.982 · log–log r = 0.9902

Knowing S2 almost fixes the benzene value.

06

The stored clock stays hourly across clock-change dates

The three checked dates, 28 March 2004, 31 October 2004 and 27 March 2005, each contain 24 hourly rows. There are no duplicate timestamps or missing hourly slots anywhere in the cleaned file.

Mean-temperature peak in stored hours: summer 16:00 · winter 15:00

The stored clock therefore gives a consistent hourly index for the daily tables.

Field dependencies to considercolumns that share information
Observed pattern in supplied analysisWhy it matters
Benzene-labelled C6H6(GT) is strongly coupled to PT08.S2Knowing S2 almost fixes the benzene value
AH closely tracks a transform of T and RH (r ≈ 0.9999)The three humidity and temperature covariates carry overlapping information
Complete days are separated by excluded datesNeighbouring rows of the daily tables are not always consecutive days
Reference gas means omit missing hoursA reference daily mean can rest on fewer than 24 hourly readings
Source record, attribution and filestraceability for the supplied copy

Retained file: AirQuality.csv · 785,065 bytes.

SHA-256

13277ae5d8581e80b7be09d47c7d3d06fe9b8e957078f2cf6e859f955e62f996

Source record: UCI Air Quality · dataset 360. Citation: Vito, S. (2008). Air Quality [Dataset]. UCI Machine Learning Repository. 10.24432/C59K5F.

Licence: the UCI page shows a CC BY 4.0 licence label, and its description also contains research-only wording.

The original data file is kept together with the supplied analysis script, saved results, page template and two HTML pages.

Used byreturn to results or methods