Hackathon project for UIOWA Hackathon 2022.
Group Members: Mitchell Hermon, Raymond Yang, Maneesh John, Julian Wemmie
Try it out: https://mhermon-hackathon2022-app-zd6h8m.streamlitapp.com/
Check out our devpost: https://devpost.com/software/batmen
We developed this web app for the UIOWA Hackathon Engie Challenge 2022. There are three parts to the challenge and our app:
- Display correlation between historical campus energy load and CO2 emissions for the past year.
- Show real-time energy and emissions data, with a breakdown by energy source.
- Predict future campus electricity load.
In 18 hours, we developed a web app that accomplishes all three goals.
Overall, this project could be useful in making campus energy usage more sustainable. For example, if the predictive model suggests an increase in demand in the next few hours, and the real-time dashboard shows that the grid is currently operating mostly on green energy, the campus could decide to reduce electricity generation and purchase more from the grid in order to reduce their carbon footprint.
Using data from the MISO API and UIowa's PI Web API, we developed a dashboard that displays live statistics on electricity and emissions on the UIowa main campus. The dashboard includes a sunburst chart describing electricity purchased from the grid with a breakdown by source, as well as bar charts describing CO2 emissions by fuel type for purchased and generated electricity.
We examined the past year of historical data for electricity purchased and generated by the UIowa main campus and then calculated approximate CO2 emissions. Using this data, we display trends in purchased electricity and emissions, generated electricity and emissions, and a breakdown of generated electricity emissions by fuel type.
We implemented a simple deep learning model in Tensorflow/Keras, which makes predictions for future electricity load based on electrical load values from the past 24 hours. We trained this model using 10 years of historical hourly electricity load data. About 95% of that data was used for training, 1% for validation, and 4% for testing. We used this trained model on current data to predict future values based on electricity load values from the past 24 hours. Predictions for the next 12 hours are displayed along with data for the past 24 hours in a line chart.
Due to time constraints, our app has room for improvement in various areas. Our CO2 emissions calculations may not be entirely accurate, as we are using constants provided by various sources (such as MISO and Engie) to calculate an estimate for CO2 emissions. For the predictive model, we did not have time to train a large deep learning model, so we used a very small DNN with only one hidden layer. This model, as well the procedure for training it, could be improved.
Install Requirements
pip install -r requirements.txt
Run Streamlit
streamlit run app.py
Requires UIOWA login in order to access PI API.
In directory .streamlit/secrets.toml
:
username = "<your-username>"
password = "<your-password>"
Login is not necessary for the demo. You can select any page from the dropdown menu on the left side.