Fullname | Number | GitHubName | File |
---|---|---|---|
Wessel Porschen | s2004267 | wesselporschen | * |
Yufang Wang | s3808394 | Yufanggg | * |
Bas Ouwehand | s0216445 | bouwehand | * |
Kylee Ornstein | s4177789 | kylo100 | * |
Agnes Czech | s4069811 | FallenApatheticAngel | * |
*We request every team member to be graded equally for all of the project.
- python version 3.12.3
make sure you are using the env:
python3 -m venv venv
There are 4 CLI tools which clean and insert the relevant data into the SQLite database (default: sqlite:///myhome.db
).
The tools are:
p1e.py
: insertsp1e
(electricity usage) datap1g.py
: insertsp1g
(gas usage) datasmartthings.py
: insertssmartthings
(smart device) dataopenweathermap.py
: Queries and inserts from OpenWeatherMap (Noordwijk, NL)database.py
: Initialize the database (create the tables)
Important: To easily execute the data analysis report notebooks, instead of running all tools separately, you can run the init.sh
script which executes the tools in one go!
chmod u+x init.sh
./init.sh
If no argument is provides (like above), this will initialize a SQLite db at sqlite:///myhome.db
(recommended to run data analysis report notebooks).
- to import all p1e.py files:
python p1e.py -r
- to import a specific file:
python p1e.py -d <dbname> <filename>
This tool is to insert the data from './data/P1g/' fold into a database.
python p1g.py -d <dbname> <filename>
- for example:
python p1g.py -d sqlite:///myhome.db ./data/P1g
This filters out non-important data (as defined in COLUMN_COMBINATIONS_TO_REMOVE).
- to import all smartthings files:
python smartthings.py -d <db sqlite url> 'smartthings/smartthings.*'
- to import a specific file (example):
python smartthings.py -d <db sqlite url> 'smartthings/smartthings.202210.tsv.gz
Keeps all data and stores it in 1 _RAW table.
- to import all smartthings files:
python smartthings.py --rawinsert <db sqlite url> 'smartthings/smartthings.*'
- to import a specific file (example):
python smartthings.py --rawinsert <db sqlite url> 'smartthings/smartthings.202210.tsv.gz
To store the weather data in the database
python openweathermap.py -d sqlite:///myhome.db 2022-01-01 2024-04-01
Aim of this tool:
- Initialize the database (create the tables)
- Fill the database with the data from the source files.
python databse.py -d <dbname> <tablename>
- for example:
python databse.py -d sqlite:///myhome.db p1g
- report_electricity_usage.ipynb
- report_gas_weather.ipynb
- report_motion_analysis.ipynb
- report_temperature_difference.ipynb