Air Quality Forecasting in Thessaloniki: A Data-Driven Approach

Air Quality

Air quality is very important for both environmental health and our well-being, serving as an indicator of air cleanliness at a specific location at a given time. The concentration of various air pollutants determines air quality. Air pollutants include the following ones:

Research indicates that brief exposure to increased concentrations of these air pollutants can have various health effects, from eye irritation to heart issues, while extended exposure might even lead to cancer. Given these risks, researching air quality forecasting and gathering real-time air quality data has become a significant field of study.

Air Quality Forecasting

Air quality forecasting involves two processes:

This prediction helps communities prepare and respond proactively to potential health risks associated with poor air quality. To preserve environmental health and our well-being, regulatory agencies worldwide, including the Environmental Protection Agency (EPA), have introduced air quality limits.

Air quality limits are guidelines that define the highest acceptable concentrations of these air pollutants, that are safe for us to breathe. These guidelines can vary depending on factors such as the pollutant, the exposure duration, and the geographical location. Certain regions impose stricter limits due to their environmental conditions and population density.

Air Quality in Thessaloniki

Thessaloniki, the second-largest city in Greece, has been struggling with poor air quality, due to the following factors:

By 2021, the situation had become so critical that the European Commission took legal action against Greece. For this reason, Thessaloniki was chosen as our main area of interest.

Data

Data were gathered from the Municipality of Thessaloniki to implement a data-driven approach for air quality forecasting. To ensure reliability, two urban monitoring stations were chosen: Egnatia and Eptapyrgio. Our primary focus was on assessing the city’s air quality, with particular emphasis on PM2.5 due to its pronounced health implications.

Time-series of PM2.5 and temperature measurements from 2014 to 2016, were carefully chosen as they are the most representative and indicative of the expected impact of anthropogenic emissions on PM2.5 concentrations in the city. This pollutant exhibits remarkable day-to-day variability, with its peak occurring during the winter months when concentrations often exceed the threshold of 35, a limit defined by EPA’s 24-hour limits. In particular, the Egnatia monitoring station, located at the core, registers peak concentrations exceeding 150, while the Eptapyrgio monitoring station, located on the outskirts, registers peak concentrations exceeding 80.

PM2.5 measurements gathered from Egnatia monitoring station between 2014 and 2016
PM2.5 measurements gathered from Eptapyrgio monitoring station between 2014 and 2016

However, during the preprocessing phase, some data gathered from these stations was missing. So, we used a data imputation method named linear interpolation to estimate this missing data. By applying the method, we developed a more reliable machine learning model to forecast air quality in Thessaloniki.

Machine Learning Model

Machine learning methods are the most frequently used in air quality forecasting. Some of these methods are the following:

Among these methods, LSTM networks were chosen due to their ability to address time-series problems, such as the air quality forecasting. In fact, LSTM networks are the most frequently used deep learning method. It is used in 36.13% of all deep learning-based research papers and it represents the 27.6% of the total use of deep learning algorithms in air quality forecasting. This wide usage is due to their architecture.

LSTM, a type of RNN architecture, consists of the following parts:

Architecture of LSTM

Our LSTM models features are the following:

We chose to use only two measurements, PM2.5 and temperature, as inputs for the models, given their role in improving model performance. Additionally, by incorporating location data (latitude and longitude) as inputs, the model’s performance improved even more.

Sanity check

However, before initiating the experiments regarding Thessaloniki, our initial objective was to evaluate our LSTM implementation by comparing it to a research paper, on publicly available data. This preliminary step served as a “sanity check” to ensure the reliability of our LSTM approach. This methodological stage is crucial, mainly because there is a lack of papers addressing air quality forecasting specific to Thessaloniki, making direct comparisons a noteworthy challenge.

In order to do this, we used Beijing Multi-Site Air-Quality dataset, which contains hourly measurements from 12 nationally-controlled air-quality monitoring sites across Beijing, China. We compared our model to the LSTM implementation presented in the paper titled “Air Quality Forecasting with Hybrid LSTM and Extended Stationary Wavelet Transform” and conducted experiments with an LSTM model for next-hour forecasts, using the preceding 15 hours as input. The outcomes indicated a close alignment between the performance of our LSTM implementation and the results reported in the paper mentioned.

Approach

In the experiments regarding Thessaloniki, forecasts were done using data from the preceding 15 days (about 2 weeks) as input. We used two distinct types of models:

And we tested two distinct training approaches for each model type:

The aim of these training approaches was to examine whether models trained exclusively on data from a single station would outperform those trained on both stations.

These experiments involved training a model on the data from 2014 – 2015 (training data) of a particular station and evaluating its performance on the corresponding test data from 2016. Moreover, to evaluate the next-day and 5-day forecasting models, we used standard regression metrics, with a particular focus on metrics such as RMSE (Root Mean Square Error) and normalized RMSE. Finally, for the 5-day forecasting model, we conducted separate evaluations for each of the five predicted days.

Results

Eventually, the performance of the next-day forecasting model closely resembled the next-day prediction of the 5-day forecasting model, rendering the former redundant. Training on each station separately was anticipated to yield more accurate forecasts, yet the outcome was only slightly better. However, the utilization of location data as inputs allowed the model trained on both stations to achieve comparable performance to the model trained on each station separately. Moreover, as expected, a decrease in error was observed during the initial days, followed by an increase as the days progressed.

RMSE for each day within a 5-day prediction horizon. The model was trained using data from both stations and evaluated at the Egnatia station

In the following figure, the red dots represent the recorded PM2.5 values (target values) over a 20-day period, with the initial 7 values estimated through interpolation due to missing data. Meanwhile, the green dots represent the prediction for the last 5 days based on the preceding 15 days as input. Although the model’s daily predictions are not flawless, it successfully captures the overall trend of increasing PM2.5 concentrations over the upcoming 5 days, rising from approximately 15 to the upper 20s.

An example of a 5-day PM2.5 prediction. The model was trained using data from both stations and evaluated at the Egnatia station

In summary, our study highlights the effectiveness of LSTM networks in addressing air quality forecasting challenges. We presented insights into model selection, training approaches, and input features, culminating in a model capable of predicting air quality trends for the impending days. Our work contributes to the ongoing efforts to better comprehend and manage air pollution’s impact, thereby safeguarding both the environment and our well-being.

Summary

Despite being a city with notably degraded air quality, Thessaloniki, Greece, has received relatively limited attention in the literature concerning the effects of air pollution on human health compared to other regions with similar issues.

Rapid urbanization accompanying economic growth contributes significantly to the degradation of air quality, posing risks to human health and the environment. Therefore, precise analysis and forecasting of air quality are crucial for sustainable development.

In order to achieve accurate results, we used LSTM networks, which proved to be very effective. We presented insights into model selection, training approaches, and input features, resulting in a model capable of forecasting air quality for the upcoming period. This contributes to the broader goal of understanding and managing air pollution, which is important for keeping our environment and ourselves healthy.

References & Resources