Hoys of a daily data object

Hi @chris,

We are using Ladybug for data analyse an existing project.
In one case we get daily values about energy use.
Creating data objects with a daily interval works fine.

But now I would like to to change this data to monthly values and here the problems start.
The LB time interval operation does not accept a daily data set:

  1. Solution exception:_data must be an Hourly Data Collection. Got <class ‘ladybug.datacollection.DailyCollection’>.

That is a pity, because it would have been very useful in this case.
Than I tried to get the hoys from the data set but instead of giving me the hoys it gives me the doys.
I can make a work around by multiplying the values with 24.

Hi @Erikbeeren ,

All of this is possible if you know the right methods to call on the Ladybug Tools SDK. The LB Time Interval Operation component just limits what you can do because making a daily collection out of a monthly collection would not work, for example.

But, with one line of Python, you can change a Daily DataCollection to be a Monthly average, total, or percentile DataCollection. Here’s a sample:

daily_to_monthly.gh (16.1 KB)

1 Like