/consumption_data_analysis

Primary LanguageJupyter NotebookMIT LicenseMIT

Power consumption data analysis

What this repo contains?


This repository is part of my undergraduate monograph. The work was:

  • Data collection using IoT nodes.
  • Analyze the consumption of electricity in a home and correlate them with environmental variables.

The data collection was made using IoT nodes based on ESP32 (Node program), and a Python MQTT client (MQTT client) to persist data in a AWS database.

The data collected was cleaned and analysed using python scripts and jupyter notebooks presented in this repository.


Achievements


The daily average Power demand

The correlation between Power demand and the TDI (Thermal Discomfort Index)

The consumption by device


Nodes


The data collection was made using IoT nodes based on ESP32 as a microcontroler.

The nodes were equiped with; a temperature and humidity sensor, a electrical current sensor, voltage sensor and a battery.

Following the scheme

Below you can see the nodes assembled


How to use?

  1. Clone this repo

    git clone link
    
  2. Open a terminal inside the cloned folder and type:

    make create_enviroment
    workon iot
    make requirements
    make get_data
  3. Run the notebooks

    The you should run all the notebooks inside data_processing/TREATER in the numeric order.

    Each notebook will apply a transformation in the data and save the result in the corresponding database folder.

    If you're insterested, you can see the EDA.

  4. See the analysis

    Go to data_analysis and see the Descritive Data Analysis notebooks.

  5. See the article and full work here

Project Structure


├──src                                        <- Python functions to treat and analyse data.
|
├──database                                   <- Datasets separed by folders(raw, pre_formatted, formatted, fixed etc.)
|   ├──raw
|   |
|   └──...
|
├──data_processing: 
|   ├──EDA                                    <- Notebooks to exploratory data analysis
|   |
|   └──TREATER                                <- Notebooks to transform data
|
├──data_analysis                              <- Data analysis like, mean, load consumption compositivion, correlations.
|    └──DDA                                    <- Descritive data analysis
|
└──img                                        <- Figures genetared in analysis notebooks