Just starting to explore some of the new python capabilities of LB 1.3, they seem amazing, thanks for the splendid work!
I wonder if there is a way to write the results from the comfort object created by the UTCI component in LB 1.3 into a JSON file? This object does not have a to_dict method. I already saw the solution for individual Continuous or Discontinuous Data Collections from this post. But I wondered if I could save the full comfort obj instead of writing each variable individually.
I would check the new DumpData and LoadData components.
Not 100% sure they do what you ask but maybe yes. They save Data collections as csv, json and pkl formats.
-A
@AbrahamYezioro Thank you for your reply, the new DumpData and LoadData work great for DataCollections, and work in an equivalent manner as the post I linked before. Nevertheless, they don’t work with Comfort Objects that contain all the variables used to calculate UTCI or similar metrics.
They don’t serialize the whole Comfort Collection object but they can serialize the timeseries DataCollections that come out of the comfort components like you see above.
Comfort Collections are one of the few objects in the plugin that I haven’t gotten around to writing to_dict and from_dict methods yet. So I’m sorry there’s no way to serialize them right now. But you see that you can serialize all of the inputs and all of the outputs. So hopefully this is enough for your purposes.
@chris Thank you for the fast response, I would update my components to the latest version as I don’t have the LB versions of the Dump and Load Data. Sure, this is good enough for my work now, thanks!