The purpose of this project is to to predict the PM2.5 values for next 24 hours, based on data from latest 24 hours obtained from all meteo stations located in Madrid city.
This project has been inspired by the AI for Good specialization by DeepLearning.AI. (https://www.coursera.org/specializations/ai-for-good). And also I took the liberty of using their nice plotting code.
Repository can be cloned from this url: https://github.com/Luis-Merino/Madrid-air-quality.git
As alternative, all files can be downloaded in a single zip file from here: https://github.com/Luis-Merino/Madrid-air-quality/archive/refs/heads/main.zip
The code assumes that you are using python3.9 or later. And notebooks were developed using Tensorflow 2.8.0
Data is periodically published in https://datos.madrid.es/ (Madrid city council).
Data from stations can be downladed from here: https://datos.madrid.es/portal/site/egob/menuitem.c05c1f754a33a9fbe4b2e4b284f1a5a0/?vgnextoid=9e42c176313eb410VgnVCM1000000b205a0aRCRD&vgnextchannel=374512b9ace9f310VgnVCM100000171f5a0aRCRD&vgnextfmt=default
Dataset with measures can be obtained from: https://datos.madrid.es/portal/site/egob/menuitem.c05c1f754a33a9fbe4b2e4b284f1a5a0/?vgnextoid=f3c0f7d512273410VgnVCM2000000c205a0aRCRD&vgnextchannel=374512b9ace9f310VgnVCM100000171f5a0aRCRD&vgnextfmt=default
1 - Notebook: Air_explore_data.ipynb
- Gathering data from Madrid council web site.
- Merging monthly data in a single csv file to get the entire data in a place.
- Transforming data to an adequate time series format to be consumed by the model.
- Cleaning data (removing non relevant data)
- Plotting and analyzing (understanding data)
- Generating values for missing records via imputation.
- Exporting a file with all data ready to feed the model.
2 - Notebook: Air_predictions.ipynb
- Preprocessing and normalization of data.
- Tuning learning rate
- Training the model
- Making predictions
- Plotting predictions
-
- data: contains all data files used in this project.
-
- model: stores the model that is generated by callback: ModelCheckpoint
-
- doc: documentation downloaded from https://datos.madrid.es/ with instructions about the data format.