GithubHelp home page GithubHelp logo

powertochoose's People

Contributors

bwigianto avatar dhevi avatar kevinah95 avatar monkeywithacupcake avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

powertochoose's Issues

Possibly set up a json dictionary based on classes of rates?

I'm thinking that we could save the tariff and a link and separate out different charges and such with a JSON dictionary. We could seed it with classes of TDU.

For example (made up data):

class rate(object):
    def __init__(self, lim, func):
        self.lim = lim,
        self.func = func
tier = rate(500, '(.05)*(x-500)') # example to show is object
print(tier)

class TDU(object):
    def __init__(self, name, tariff, base, tier1, tier2, tier3):
        self.name = name
        self.tariff = tariff,
        self.base = base,
        self.tier1 = tier1,
        self.tier2 = tier2,
        self.tier3 = tier3
infuse = TDU('infuse_3', 'abc123-10abcd-ef', '10',
            rate(500, '(.05)*(x-500)'), 
            rate(1500, '(.05)*(x-1500)'), 
            rate(2500, '(.10)*(x-2500)'))
print(infuse) # example to show nesting rate in TDU

def jdefault(o):
    return o.__dict__
print(json.dumps(infuse, default=jdefault))
# prints json representation (which is what we would store)

These are the print outputs FYI

<__main__.rate object at 0x015CA930>
<__main__.TDU object at 0x015CAB90>
{"base": ["10"], "tier2": [{"lim": [1500], "func": "(.05)*(x-1500)"}], "tier1": [{"lim": [500], "func": "(.05)*(x-500)"}], "tier3": {"lim": [2500], "func": "(.10)*(x-2500)"}, "tariff": ["abc123-10abcd-ef"], "name": "infuse_3"}

On the backend, then, we create a function that reads the json files and evals the rates?

Have python script actually call all billing functions and return dictionaries of estimates

Feature

Make houston.py call all functions inside and return the sum of total bills

Why is this feature being added?

The houston.py file is all hard coded with my example usage pattern over a 12 month period and so it's not generally useful yet.

What should your feature do?

When I run the script with 12 numbers

python houston.py 100 200 300 400 500 600 700 800 900 1000 1100 1200 

we get a dictionary of plan names (function names) to total price over the 12 month period:

{'keep it simple savings': 210.34, 'wise buy complete': 120.54 ... }

Pull out TDU charges from every plan's calculation

Refactor

Pull out the hard coded TDU charges in each plan calculation function in houston.py

To accomplish this

  • Pull out both the TDU base charge and the per kWh charge to global variables
  • Bonus points for making it configurable

[Multiple PRs needed] Convert electricity usage plans to simple functions

Feature

Create or update electricity usage plan functions

Why do these matter?

These will help determine and sort which plans to use. We'll need a lot of help implementing and updating each of these functions correctly.

To accomplish this

  • Go to Power to Choose
  • Enter 77002 for the zip code (this is in Center Point's distribution zone)
  • Sort plans by price ascending
  • Go through a plan and click its 'Fact Sheet'
  • Start adding/updating python functions in houston.py for each plan
  • Please be consistent with naming conventions
  • Submit a PR

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.