Coder Social home page Coder Social logo

srpraveen97 / electrical_demand_toronto Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 4.0 41.86 MB

I performed a detailed analysis of various factors that affect the electricity demand in Toronto. I also use a simple linear model tree to forecast the demand.

Python 0.07% HTML 7.53% Jupyter Notebook 92.40%
linear-regression electricity timeseries-analysis timeseries-forecasting exploratory-data-analysis data-science data-visualization

electrical_demand_toronto's Introduction

Analysis of electricity Demand data in Toronto

Exploratory data analysis

I took up the publicly available data, by IESO, of electricity demand in Toronto and tried to provide a detailed analysis of various factors affecting it.

When a lockdown was imposed, earlier in 2020, I am sure a lot of us lost the distinction between weekends and weekdays. It was interesting to see this behavior translate into our electricity consumption.

It was also compelling to see the flattening of the peak throughout the eight months of daylight savings time. This is particularly significant from the electricity suppliers' point of view.

I have provided a detailed explanation of this in the article.

Forecasting electricity demand predictions

I used multiple Ridge regression models to forecast electricity demand in Toronto. It was impressive to see how combining several such linear models result in a moderate accuracy with high interpretability.

While working on this project, I learned that this method in the literature is called a Linear Model Tree, a combination of decision trees and linear regression. It is similar to decision trees regression in the sense that we split the data into several groups, but instead of choosing the mean value as a predictor in each category, we run a linear regression. A detailed explanation of this is provided in the article.

SQL Database

I also set up a Postgres SQL database to scrape and store the values dynamically from multiple online sources for electricity demand (IESO), temperature (weatherstats), and temperature forecast (wunderground). I used Psycopg2 to connect Python and PostgreSQL. This is used to query data back and forth from SQL to Python.

Streamlit Web-app

I used streamlit to build a web application and to deploy the linear model tree online.

electrical_demand_toronto's People

Contributors

srpraveen97 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.