NREL / buildstock-query

BuildStockQuery is a python library for querying datasets generated by ResStock™ and ComStock™.
https://nrel.github.io/buildstock-query/
BSD 3-Clause "New" or "Revised" License
9 stars 1 forks source link

Aggregate timeseries does not return all electric enduses by default #15

Closed aspeake closed 1 year ago

aspeake commented 1 year ago

Issue overview

Default behavior for timeseries aggregation does not work as expected

Current Behavior

By default, I expect BuildStockAggregate.aggregate_timeseries() to return all electric enduses if enduses=None, but when running bq.agg.aggregate_timeseries(upgrade_id=0, restrict=[('state', ['FL'])], sort=True), I only get three columns, as shown below:

image

Expected Behavior

Return a much larger df with electric enduse columns

Steps to Reproduce

  1. bq = BuildStockQuery(db_name='euss-tests', table_name='res_test_03_2018_10k_20220607', workgroup='scout', buildstock_type='resstock')
  2. ts = bq.agg.aggregate_timeseries(upgrade_id=0, restrict=[('state', ['FL'])], sort=True)

Details

Environment

Some additional details about your environment for this issue (if relevant):

afontani commented 1 year ago

@aspeake : I am not sold on the idea to return all the end-uses as there are a lot of them and querying them may result in the query timing out. Also, does this mean you also want totals, emissions, component loads, utility bills?

@rajeee : At a minimum we should throw a warning that says no end-uses were specified?

aspeake commented 1 year ago

@aspeake : I am not sold on the idea to return all the end-uses as there are a lot of them and querying them may result in the query timing out. Also, does this mean you also want totals, emissions, component loads, utility bills?

@rajeee : At a minimum we should throw a warning that says no end-uses were specified?

I don't have a strong opinion on the behavior, just pointing out the inconsistency with the documentation.

afontani commented 1 year ago

Action is to update documentation to specify not end-uses will be returned. Possibly a required argument.

rajeee commented 1 year ago

Addressed in: https://github.com/NREL/buildstock-query/pull/21 The IDE will flag this behavior now since enduse is required argument. If you attempt to run it, it will say enduses is required argument. image