This repo contain the source code for the course Data Science Project at Aarhus University.
The source code serves a streamlit application with a dashboard that power suppliers can use to produce their demand forecast.
Requirements:
- Python >= 3.11
Steps:
- Install dependencies (recommended to use a virtual environment, see guide below):
pip install -r requirements.txt
- Create a file in the root of the project and call it
.env
- this is used for environment variables - Open the
.env
file and write the followingDMI_API_KEY=XXX
and replaceXXX
with an actual API key for the DMI Weather API. An API key can be acquired by subscribing to the metObsAPI from DMI at: https://dmiapi.govcloud.dk/#!/apis/48ed0c1b-ab40-473a-ad0c-1bab40073a51/detail - In your terminal go to the directory
src/dsp
via:cd src/dsp
- Run ETL flows via:
python run_etls.py
- Now you can run the streamlit app via:
streamlit run application.py
Note that running the ETL flows populate the following tables in a local SQLite db (file):
- bronze_consumption
- bronze_prices
- bronze_weather
- silver_consumption
- silver_prices
- silver_weather
- gold_cpw (consumption, prices, and weather data all in one dataset)
Steps:
- Open a terminal in the root of the project
- Ensure you are on the correct version of Python via:
python -V
- Create virtual environment via:
python -m venv .venv
- Activate the virtual environment via:
source .venv/scripts/activate.ps1
. Note that you can skip this step in VS Code if you select your.venv
as the Python interpreter and then open a new terminal.
Steps:
- Open a terminal in the root of the project
- Ensure you are on the correct version of Python via:
python3 -V
(you can also use a specific version of Python viapython3.11 -V
) - Create virtual environment via:
python3 -m venv .venv
- Activate the virtual environment via:
source .venv/bin/activate
. Note that you can skip this step in VS Code if you select your.venv
as the Python interpreter and then open a new terminal.