How to save the data in Ladybug tools

Hi @chris and @mostapha,
I would like to know how to save results after a simulation with Ladybug components such as OutdoorSolarMRT or UTCI. I tried to internalize them, but as the picture shows I have a problem. Having a 2981 point grid, I need to save the data without re-run the simulation.
Thank’s.

1 Like

I am also interested in doing exactly this… I need a good way of running the UTCI calc possibly over a day or so then just opening the results on demand. Hopefully, you get a response soon!

Hey Guys,

There are plenty of ways to write the results into a file, the most straightforward being to deconstruct the data collection and use any of the several Grasshopper plugins that write GH data to CSV or Excel. But those workflows will involve dumping the data into the Grasshopper UI and will be slow if you have 2981 * 8760 data points. If you want something fast, you should use the LBT Python SDK.

@RafaelA posted an example here where he uses a few lines of the Python SDK to serialize data collections into a JSON file and then re-serialize them back:

Here’s the full set of SDK documentation if you want to get into writing more of your own components:
https://discourse.ladybug.tools/pub/ladybug-tools-core-sdk-documentation

3 Likes

As always, thank you @chris!

Perfect, now saving my files in json format :slight_smile: loverly!