Django + React application to forecast Air Quality Index (AQI) using a Long Short-Term Memory (LSTM) neural network
- Cleans historic air quality data and fill gaps in the time series using
numpy
andpandas
- Transforms the historic air quality time series to stationary to remove long term trend
- Creates a LSTM model for air quality forecasting using
TensorFlow
andscikit-learn
- Iteratively examines effect of model hyperparameters including learning rate and regularization
- Note: The most recent training for the model yielded a RMSE of
~0.09
for the training data, and a RMSE of~0.10
for the test data
- Note: The most recent training for the model yielded a RMSE of
- Utilizes
Django REST Framework
to create a REST API:- Django backend fetches current air quality data from an external API for use in forecasting air quality
- Uses
React.js
to fetch data from backend API and create frontend forecast interface
cd
into the root directory- Run
pip install -r requirements.txt
cd
intofrontend/
- Run
npm install
cd
into the root directory- Run
python manage.py test
cd
intofrontend/
- Run
npm run test
- Frontend structure based on weather app (MIT License) by @duvainel
- Background image by David Mark from Pixabay