Export big simulation results as numerical arrays

I have poked around and am quite surprised by how little I find about exporting results from ladybug components.

I have not seen any native components for this in the ladybug tools suite, which surprises me. I did find the data matrix component but I don’t know what use that is.

I found a few comments from people suggesting to use spreadsheet plug-ins that are now pretty old and maybe not R7 ready. That not really a full solution though, as being able to manipulate a data tree into an excel table is not that easy.

I tried simply piping an output (MRT, to be exact) into a data component and then internalizing it. This doesn’t work, as later when the file is loaded the data isn’t good anymore. I tried using the data output component and saving as ghdata, but same problem.

Anyway I’m working on an urban scale and I need to use a coordinate system that I can position things in geolocated software platforms like GIS, where I am using UTM coordinates. This means that the locations of the sample points are actually pretty important. I need to get coordinates followed by a long list of values.

What I have landed on now is using Pancake to construct an associative array and then saving that to csv. I am curious to know what other solutions there are. Ultimately it would be awesome to interoperate with geojson data sources and I imagine that’s doable.

I will run 24h sims but of course if I diverge from that I will have to edit this. I welcome your thoughts.

I think that the ‘to excel’ components in TT Toolboxwould allow for the writing of branches to columns/rows: that may be a bit helpful?

1 Like

there should be a way to take the datatree branches and write em out to csv without BANG! and the compo to the left of it.
LMK if you find your endgame else would be hap to spend an hour trying to figure a streamlined means; when has time!

Thanks @TrevorFedyna

Here is a definition cluster with TT Toolbox, which works fine.

It’s great that it will work no matter how many branches, and it’s nice to put multiple datastreams in one file. A couple of complaints about this method though, one being that this plugin hasn’t been updated in 4 years and I hope it will work with future versions of R/gh. It also means another step to convert to csv later for use in other platforms.

Another problem is visible in the disabled components – if I add the geographic offset then value ends up being rounded to the hundreds or something which is obviously not doable. I don’t know if it’s a grasshopper problem, TT, or excel – excel has a way of formatting things losing significant digits. It would be nice if I could just dump a float to an ascii decimal.

Update on exporting ladybug results in real coordinates:

Now I’m using DeCodingSpaces to export geojson which works pretty well.

The hoy list is flat so that each point will pick up every single hoy as an attribute key – the data tree then has x values per point/branch which correspond to the number of hoy’s.


From QGIS, symbology for a selected hoy.

1 Like

You may be able to conv floats to ascii decimals via a wee bit of ghpython
Additional export big sim results as numerical arrays python stuff that may be in context

And now you use the TT toolbox… Colibri and this are (incoming pun) made for each other
design explorer