GithubHelp home page GithubHelp logo

jiuguangw / dte_calculator Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 2.21 MB

A Python based utility to compare DTE electric service plans based on past consumption data

License: MIT License

Python 100.00%
data-visualization data-science electricity-consumption electricity-prices electricity-bill dte electricity matplotlib pandas seaborn

dte_calculator's Introduction

DTE Calculator

Overview

DTE Calculator is a Python-based utility to compare electric service plans based on past consumption data.

I was recently trying to compare two electric service plans from DTE Energy - the Residential Electric Service plan vs. the Time of Day plan. The RES is a flat-rate plan, while the ToD has specific rates based on the season and time of day - the more expensive peak rate applies for 11am-7pm on a weekday. However, other than publishing the rates (link), DTE does not provide a utility for determining whether or not switching to the ToD plan would actually save me money, in addition to requiring a 12-month commitment to stay on the plan.

I decided to do my own analysis instead. DTE does provide a function on its website to generate an Energy Usage Report, which contains energy usage data for the previous 13 months on a hourly basis. By processing the data from my hourly usage, I then calculated my energy costs for the RES and ToD plans. As it turns out, I will end up paying a little bit more on the ToD plan, without making changes to my current behavior.

DTE Calculator

Getting Started

Installing Anaconda Python (Recommended)

All perquisites are installed as a part of Anaconda Python.

Supported Configurations:

OS Python version
MacOS 3.7
Ubuntu 3.7
Windows 3.7

(Optional) Create a virtual environment

I strongly recommend using a virtual environment to ensure dependencies are installed safely. This is an optional setup, but if you have trouble running the scripts, try this first.

The instructions below assume you are using Conda, though Virtualenv is essentially interchangeable. To create a new Python 3.7 environment, run:

conda create --name dte python=3.7
conda activate dte

The shell should now look like (dte) $. To deactivate the environment, run:

(dte)$ conda deactivate

The prompt will return back to $ or (base)$.

Note: Older versions of conda may use source activate dte and source deactivate (activate dte and deactivate on Windows).

Installing dependencies

All of the required packages should have been installed via Anaconda. If you are using another distribution of Python, then you might need to run

(dte)$ pip install -r requirements.txt

To install the required packages.

Cloning the repo

To checkout the repo:

git clone [email protected]:jiuguangw/dte_calculator.git

Running the script

The hourly energy usage data can be downloaded from the DTE website, by going to newlook.dteenergy.com and "Energy Usage Data" on the left navigation menu. Pick a start date as far back as possible (the limit is 13 months) and use "CSV" as the file type.

I renamed the resulting file to "dte.csv" and placed it under "data". I can then generate the plot by

(dte)$ python dte_calculator.py data/dte.csv

DTE.pdf is generated with the plots.

Development

The unit tests can be run by first installing the package, then running pytest:

(dte)$ python install .
(dte)$ pytest

License

License terms

The Python scripts and the data in CSV are released under the MIT license. The full license details can be found in LICENSE.

Technical contributions

I welcome bug fixes, feature additions, and other ways to improve the project. If you'd like to contribute your data, I'm happy to host it here, assuming it is in the same format and anonymized (DTE account number removed).

Please send me pull requests, issues, etc, and contact me if you'd like to be added as a collaborator to the repo.

For others without the time or skills to contribute, I'd also appreciate your help in spreading the word via Facebook, Twitter, etc.

Donation

Please support the project by making a donation via PayPal or crypto:

paypal

Bitcoin Ethereum Bitcoin Cash Litecoin

Contact

Please drop me a line!

dte_calculator's People

Contributors

jiuguangw avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  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.