Git Product home page Git Product logo

Comments (3)

philngo avatar philngo commented on May 20, 2024

@sc0ttyg The get_baseline_data function requires an end date to be set (this function assumes you want to go some number of days back before a project or intervention). Correct usage is the following:

eemeter.get_baseline_data(meter_data, max_days=365, end=datetime(...))

There's a bit more detail on this behavior in the docs for get_baseline_data: http://eemeter.openee.io/api.html#eemeter.get_baseline_data, though it's easy to miss. This behavior might warrant a warning - if so, I'd be happy to take a look at a pull request.

max_days (int) – The maximum length of the period. Ignored if end is not set. The stricter of this or start is used to determine the earliest allowable baseline period date.

Reading between the lines here, if you want to get data selecting forward from a date (e.g., the start of your data), then you can use the get_reporting_data method, which allows that operation. Although that also is admittedly a bit unintuitive if you're selecting down to baseline data.

import eemeter
import pandas as pd
meter_data = pd.DataFrame({'value': 1}, index=pd.date_range(start='2013-01-01', end='2019-01-01', freq='D', tz='utc'))
eemeter.get_reporting_data(meter_data, start=meter_data.index[0], max_days=365)

If neither of these methods quite matches your use case, the ultimate flexibility is also available by selecting on the pandas DatetimeIndex as well.

from eemeter.

sc0ttyg avatar sc0ttyg commented on May 20, 2024

@philngo Great, thanks for the clarification. I'll consider a pull request after I get to know the code a little better.

from eemeter.

philngo avatar philngo commented on May 20, 2024

@sc0ttyg Thanks for reaching out! I'm going to go ahead and close this issue. Please consider helping our developer community by filling out our first-time issue/PR contributor survey.

from eemeter.

Related Issues (20)

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.