For a quick demo, please follow the LINK HERE
- Introduction
- Folder Structrue
- Requirements
- Installation on Local Device
- Running on Local Device
- Deploying your Dashboard
- Recommended Tutorials
- Maintainers
The project provides a dashboard for visualising and finding clean energy potential areas in the WMCA local authority. The tool acts as a frontend to the all the machine learning models build to pin point areas of interest in a local authority. The project and code is open sourced and can be used by any local authority in the U.K. and other countries, given they have the correct data.
The repository for the machine learning algorithms can be accessed here.
.
├── data
│ ├── SJ9000.geojson # Map shapefile data
│ ├── full_dataset_outputs.csv # Map tabular data
│ ├── numerical_individual_columns_data_demo.csv # EPC Ratings data
│ ├── sample_outputs_demo.csv # Electric Heating data
│ └── sample_outputs_old_demo.csv # Predicted Electric Heating data
├── images
│ ├── pure_leapfrog.png
│ ├── wmca.png
├── pages
│ ├── epc_rating.py # EPC Rating Prediction Model Page
│ ├── heating_type.py # Electric Heating Prediction Model Page
│ ├── heatmap.py # Mother file for all heatmaps
│ ├── home.py # Homepage
│ ├── map.py # Mother file for all maps
│ ├── solar_pv.py # Solar PV Prediction Model Page
├── LICENSE.md
├── README.md
├── main.py # Main app runner file
└── requirements.txt # Required packages to run the app
This project requires the following modules:
- pip
- streamlit
- pandas
- plotly express
- plotly
- streamlit options menu
- leafmap
- numpy
- geopandas
- pydeck
- shapely
- matplotlib
For specific versions, please refer to requirements file.
-
Download the entire project either using git clone or download as zip option.
-
Once the folder is on your local device, open a new terminal window check the version of python on you device using
python -v
and install the compatible pip version for it. -
Now check version of pip using
pip -version
and navigate to your project folder -
Install all the packages in requirements.txt using pip (links for each installation command provided above).
-
Check for correct installation in your desired folder using the following commands:
$ python
and it will show the follwing message:Python 3.8.8 (default, Apr 13 2021, 12:59:45) [Clang 10.0.0 ] :: Anaconda, Inc. on darwin Type "help", "copyright", "credits" or "license" for more information. >>>
Use command
import streamlit
If the respose does not provide any error you have successfully installed all the dependencies.
-
Open a new Terminal window and navigate to the project folder. Use command
streamlit main.py
This would provide you a localhost link where the app is running. Something like this
You can now view your Streamlit app in your browser. Local URL: http://localhost:8501 Network URL: http://192.168.0.24:8501
-
Now you can navigate the app to explore more and create your own changes. (A preferable IDE for editing could be Visual Studio Code, PyCharm or Sublime).
-
Sign up to Streamlit Cloud using your GitHub account. It is invitation based so you might need to wait to get you account. It is advised to do this step in advance.
-
You will recieve an invitation to you github email and follow the steps as mentioned.
-
If you have made any changes to the code and introduced new packages, you will need to update the
requirements.txt
file. For this, open a new terminal window and navigate to the project folder. Use the commandpip install pipreqs
which will install the pipreqs for creating therequirements.txt
file. Finally, use commandpipreqs --force
to overwrite the oldrequirements.txt
file. -
Update your GitHub repository with the current code on your local machine.
-
Now sign back in to your streamlit.io account and follow the instructions provided in the video below. (Instead of using
streamlit_app.py
as your Main Path usemain.py
- same as local device)streamlit_sharing_silent.mp4
-
Once deployed, you should be able to share the dashboard using the url.
Please reach out to us if you have any questions:
- Meghna Asthana (University of York) https://www.cs.york.ac.uk/people/asthana
- Li-Lian Ang (Minerva University) https://www.linkedin.com/in/anglilian/
This project has been sponsored by:
- Data Science For Social Good Program at University of Warwick Visit DSSG Warwick for more information.