Skip to content

Bug: temporal.disagg_temporal_power_housholds_slp() does not work on household basis #17

Description

@nesnoj

Executing

temporal.disagg_temporal_power_housholds_slp(by="households")

gives

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/luke/skywalker/disaggregator/disaggregator/temporal.py", line 760, in disagg_temporal_power_housholds_slp
    sv_yearly = ((disagg_households_power(by=by,
  File "/home/luke/skywalker/venv/lib/python3.8/site-packages/pandas/core/generic.py", line 5487, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'DataFrame' object has no attribute 'to_frame'

This is because disagg_households_power(by="households") returns a DF with household sizes as columns instead of a Series (which is returned for by="population").
If the SLP method is not supported for "households" (but why not?), this should be handled accordingly.

Moreover, the param scale_by_pop shows no effect so scaling is not supported here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions