# A Comparative Analysis for Air Quality Estimation from Traffic and Meteorological Data
## 2 Materials and Methods
### Data Sources and Acquisition  
In this case study we used information collected in three years, from 2013 to 2016, limited to the central areas of Milan. In particular, we collected three different data sources: (i) meteorological data from different sensor types, such as temperature, humidity, pressure and wind speed, (ii) traffic data derived from the passage of vehicles recorded from fixed video cameras in a belt surrounding the city center, and (iii) the ground-truth pollutant trends, obtained from different monitoring stations mounted in fixed crucial points. Regarding meteorological data, we obtained the sensor logs of seven different weather stations, mainly distributed around the borders of the city, as shown in Figure 1. The monitoring platforms and their respective data are provided by Agenzia Regionale per la Protezione dell'Ambiente (ARPA) Lombardia, the reference institution in the region for environmental protection. This and other kind of datasets have recently become freely available for download on the regional Open Data portal ([[https://www.dati.lombardia.it/](https://www.dati.lombardia.it/)]([https://www.dati.lombardia.it/](https://www.dati.lombardia.it/))). Logs are provided with yearly subdivisions in standard CSV files, where each one stores data corresponding to a single sensor, defined by three fields: the unique IDfor the sensor, a timestamp of the measurement in local time and the corresponding value measured. Any other additional information related to the sensors is in fact explained by a descriptor file first indicating the unique ID, name and position of the specific platform, then enumerating the different sensors of which it is equipped, specifying their unique ID, type, their measurement interval, their unit of measure and the operator used to normalize the logs into a time series with regular intervals between samples. From these descriptors it is possible to trace the sensors back to the respective measured weather feature and thus group them in six different types, displayed in Table 1. Except for the pressure category that only presents a single sensor, every other class of meteorological feature is well represented by at least three time series, in the three-year period we analysed. In terms of data format, every sensor class utilises a standard measurement unit and contains records with a regular resolution of an hour, obtained by averaging the aggregation of the raw measurements. The only exception is represented by the precipitations category, which instead provides logs aggregated with a cumulative sum, indicating the total amount of millimeters of rain which fell every hour. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Sensor Type** & **Count** & **Unit of Measure** & **Resolution** & **Aggregation** \\ \hline temperature & 6 & \({}^{\circ}\)C & hourly & mean \\ humidity & 5 & \% & hourly & mean \\ wind speed & 5 & m/s & hourly & mean \\ wind direction & 5 & deg. & hourly & mean \\ precipitations & 5 & mm & hourly & sum \\ global radiation & 3 & W/m\({}^{2}\) & hourly & mean \\ pressure & 1 & hPa & hourly & mean \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Weather sensors divided by feature type, with amount of unique sensors per group, unit of measurements, time interval between samples and aggregation type used to unify the data formats. Figure 1: Map displaying the distribution of weather (blue), pollutants (green) and transit (orange) sensor stations around the city center of Milan. A similar procedure concerned the measurements of the pollutants. Data were once again provided by ARPA, freely available for download through the above-mentioned portal, and were subdivided into file descriptors, containing name, location and equipped sensors of the monitoring stations, together with individual CSV files containing yearly measurements of the individual sensors, identified by a unique ID.