Granada has been pointed out as the most polluted city in Spain. Thus, I decided to create a neural network model to predict NO2, SO2, PM10 and PM25 as my investigation in the IB Diploma.
The historic data training set was obtained by (Junta De Andalucía Open Data ) to get pollution levels and AEMET to get weather parametres. The implementation was made in Python using Tensorflow and included three approaches: a linear implementation, one with hidden layers and a Recurrent Neural Network. During my research, I experimented with several architectures to optimize the best number of neurons, layers, epochs...
Results were highly satisfactory. PM10 and PM25 were predicted with less than 1.5% error in small time periods and less than 10% error in 24 hours predictions. NO2 and SO2 were forecasted with a higher error (up to 30%) but the neural network was proved to be effective under certain normal conditions (such as no rain or high sudden changes). For example, for a prediction of NO2: