I am in the middle of creating a chord diagram, and I now have all the data in place to make it happen. However, I am not sure of the best way to go about it. Attached is my .gh file with an example of how I want it to look (thanks .gh forum). I also tried to internalize my excel file/upload it with no success, I am not sure how to do this (image is attached).
My pseudo code (logic) for the diagram is to:
Create points for the two data branches on the edge of the matrix.
Each cell should either have a number or not - if it does have number, draw that many lines between the points of the two branches - exp. if the cell says six - six lines are drawn between the two edge points - this could also be done with line thickness as a way to denote the relative strength of the cell
I have used the ReadExcelSheet from TT Toolbox to get the branches and have put the lettering from each on the outside of the circle. These two lists are matched so a line between the two branches should work.
I am struggling with associating the branches with points as all of the text functions I have seen don’t have outputs except bake and I need to have them at a cartesian location (I do recognize Human can break down a text to its location).
I am unsure how to make the excel data I have read like I want. Do I construct a domain and then try to pull the number from there? Or is the domain not already built, and it is a matter of matching the lists together?
I hope I explained myself clear enough - and I have tried for many hours to figure it out with limited success.
Any help you could give would be seriously appreciated.
If someone could even help to link a text object to a point, so I could then try to figure out how to connect the points, that would be an awesome start. I need the labels that go around my circle to have points associated with them.
I would have responded earlier but I have been running around for the morning.
GH forums wont allow me to attach a csv - unless you know a work around?
I will attempt to link those points to the data - I thought of this of course, but I couldn’t think of a component that would associate the point with the excel file, therefore I was attempting to extract a point from the text itself.
I just opened both the .csv file, and the text panel file and I noticed that the data doesn’t appear like it does in the xlsx file - a glaring difference is the first row which doesn’t read all 64 headers as one branch, but now has 5 branches.
However, I have been trying to read the data in this format in GH the last couple days so I can see how this is very useful, so long as the data matches the original sheet.
Lets say that the data did match the original sheet, would it be possible to use a “greater than component”, and a “dispatch” component to filter the text panel for anything “greater than, or equal to one” and drawing a line between the x and y trend (which is what the data is) exp. P5 and P10.
This is how I would start to parse the .csv data using Split(Text Split) with a comma as ‘C’ input, but honestly, I’m not following this thread in detail and at a glance, it’s too much work to understand how you want to use this?
@brendan.webb how is your data to be interpreted?
for instance, how are to be interpreted empty cells (like F5) in the chord diagram?
same question for (for instance) F7 that carries a value but it’s a zero, or like D21 that has value 11?
what data identifies the “between this pair there is a chord” ?
Empty cells, and 0’s, are to be interpreted as no connection between the points. I should have selected all 0’s in the excel file and made them blank to make this clear… Anywhere there is a number 1 or greater, that should be a line between the two points on the x and y. I have yet to decide how I want to interpret that number further (for example should the higher the number is, the brighter the hue) - to begin though I am just attempting to ensure there is a curve connection between the x and y where appropriate.
I ended up adding a column in Google Sheet and using the formula TextJoin(";";False;A1:BM1) to get all the cells of that row separated by a “;” (a few header cells had a Return stroke to be deleted otherwise the whole thing was not working properly)
Sorry for the delayed response - this is the first time that I have been able to get to my computer since I last messaged here - I will look at everything this afternoon but from the images, it looks great! Thank you so much for the help!!! I have been struggling with this for a while, and hopefully the script you have given will help me understand how data from excel is translated in GH.
Based on your comment about patience, I’m assuming that I didn’t give a good enough description in my original post for adequate understanding of the problem… I will work on my clarity in the future… Thank you so much for the help!!! I would have responded earlier but this is the first time that I have been able to get to my computer since the last time I messaged here.