Coupling Data and Surfaces in LB+HB

Hello everyone,
I have a problem with data coupling and surfaces. I often run the model and then import it as .idf and .sql in GH.
In this case I have a simple 213 surface model simulated annually and I want to take for a given time period the values and calculate the percentile (95th) so that I get only one value per surface.
I then use LB Apply Analysis Period to filter them on the period, but then the only componento that tho found for calculating the percentile only exports to me by day, month or month by hour. I would like to have the percentile for the whole period filtered instead.
I used deconstruct data so as to use only the numerical values to calculate the percentile for each surface and “tried” to reconstruct the header as in the image. However I can’t using LB Construct Data and then entering it into HB Color faces to do what I want, it gives me this error:

Runtime error (AssertionException): Duplicate datetime was found in the collection: 01 Jan 01:00

line 428, in validate_analysis_period, “/Users/mbusnelli/Library/Application Support/McNeel/Rhinoceros/6.0/scripts/ladybug/”
line 61, in init, “/Users/mbusnelli/Library/Application Support/McNeel/Rhinoceros/6.0/scripts/honeybee_energy/result/”
line 490, in init, “/Users/mbusnelli/Library/Application Support/McNeel/Rhinoceros/6.0/scripts/honeybee_energy/result/”
line 108, in script

Is it possible to do it differently or where am I going wrong?
Thank you very much!

Hey @MassimilianoBusnelli ,

What you’re trying to do here can work but the “LB Construct Data” component isn’t built to create hourly data collections that are for only a fraction of a day. You could edit the source code of this component to use an HourlyDiscontinuousCollection instead of a HourlyContinuousCollection and this would work. Or you can duplicate each of your percentile values 24 times to create a data collection for the full day and this should also work. In fact, that’s probably the fastest way to get what you want right now.

But there should be more elegant ways of doing this by processing the object within the “Color Faces” component. I can add some properties to this object that would make it pretty easy to do this percentile analysis by adding a few lines of code inside the “HB Color Rooms” component. I’ll try to do this at some point since I’m sure there will be more types of analyses that people want to create colored visualizations for.

Thank you very much @chris !

Just trying to multiply the values by 24. As soon as I have a moment I’ll try and post the solution…or the problem!

It would actually be handy to have the ability to have numerical data written to the surfaces (tying them directly to the value).

Thanks again

Hi @Cris,
I tried as you told me (using Duplicate data for 2 hours) and it works!
Here is the image of the algorithm:

Thanks again for the tip!

1 Like