tag:support.nodebox.net,2012-11-01:/discussions/nodebox-2-3/6849-importing-cvs-file-quesitonNodeBox: Discussion 2024-03-12T06:28:08Ztag:support.nodebox.net,2012-11-01:Comment/555563322022-08-29T08:59:55Z2022-08-29T08:59:55Zimporting cvs file quesiton<div><p>Hello Bertha!</p>
<p>Welcome to the Nodebox community. I'm the admin of this forum, but also specialize in data visualization (as well as generative art). Nodebox is an ideal tool for data visualization - especially for developing new forms of visualization. I also genuinely enjoy helping newbies so look forward to as many questions as you can shoot my way!</p>
<p>Your first question has a simple cause that resulted in a non-obvious error message.</p>
<p>If you look at your CSV file, you will notice that the Making value is missing from the final line. So when you did a lookup on Making, Nodebox created a list of strings with a final item that evaluates as missing.</p>
<p>The add node did just fine with the first 93 values (quietly interpreting them as numbers, not strings), but when it hit the 94th item it choked.</p>
<p>So all you have to do is replace that final value in your CSV file, resave it, and reload your Nodebox network (command R).</p>
<p>Once you put a number into that final value, the Making column will evaluate as numbers instead of strings, by the way. Nodebox is flexible with its data typing, so normally you don't have to worry much about this, but in some situations you may have to force typing by, for example, feeding a value or list into a number node.</p>
<p>Keep those questions coming!</p>
<p>John</p></div>johntag:support.nodebox.net,2012-11-01:Comment/555563322022-08-30T00:47:02Z2022-08-30T00:49:13Zimporting cvs file quesiton<div><p>Hi Jonh!</p>
<p>Thank you so much for answering, I understand now and can fill the last column up.<br>
At the moment I'm going through all the tutorials I can find.<br>
Since I'm using Data in a determined time frame, I want to make something similar to this image.<br>
I've been able to create a graph and make a trend line, How ever I'm struggling to place it around a circle. as you can see they are tilted,?</p>
<p>Now right now there are only columns based on the number of instances, but I would like it to be more time representative like the image. would I have to add the missing information in excel or is there a way I can do it in nodebox?</p>
<p>Thank you so much!!</p></div>bbarreratag:support.nodebox.net,2012-11-01:Comment/555563322022-08-30T00:50:20Z2022-08-30T00:50:20Zimporting cvs file quesiton<div><p>sorry! forgot to upload the image of my current results.<br>
here it is</p></div>bbarreratag:support.nodebox.net,2012-11-01:Comment/555563322022-08-30T05:05:05Z2022-08-30T05:09:26Zimporting cvs file quesiton<div><p>Hi Bertha,</p>
<p>To plot this data as a horizontal trend line, you would simply lookup one value (e.g. "Seconds") as your X and another (e.g Making2) as your Y, feed these into a make_point node, and use a connect node to connect those points into a line. You might also want to first multiply those X and Y values by a scaling factor.</p>
<p>The result would be a spiky line. You could make it look smoother using the round_segments node.</p>
<p>Wrapping that trend line around a circle is just as easy. Instead of a make_point node, you can use a coordinates node, using X as the angle and Y as the distance. To wrap around a circle of radius R, add R to the Y value.</p>
<p>In your attempt, instead of using the Seconds column to determine the angle, you distributed your values evenly around a circle. To show you what this would look like, I made a circular chart plotting your Making2 values in blue (see screenshot).</p>
<p>I then overlayed a trend chart using the Seconds column in red. The attached zip file contains your original files and my example.</p>
<p>You can see how this works by adjusting the RADIUS value and the EXPANSION value. I only wrapped the trend lines from due north (-90 degrees in Nodebox) to 7/8s of the way around (225 degrees). This was easily done using a convert range node. The gap left room for a simple legend, which I wrote as a subnetwork (control click and Edit Children to see how I did that).</p>
<p>As for the "missing information", do you mean more precise frequency values instead of the simple Making2 values? If so, and if these are raw data that cannot be computed directly from the values already in your CSV file, then yes: it would be easiest to simply type them in using Excel. (You can also enter a list of values directly in Nodebox using a make_numbers node, but Excel is easier for a long list of values.)</p>
<p>But if you mean create interpolated values at regular intervals between the existing Making2 values to create smoother curves, then you could do that entirely in Nodebox. It would take a bit of math to add the interpolated values in a pleasing manner.</p>
<p>Please play with this and see if it answers your questions. Then ask more questions!</p>
<p>John</p></div>johntag:support.nodebox.net,2012-11-01:Comment/555563322022-09-01T01:29:57Z2022-09-01T01:31:29Zimporting cvs file quesiton<div><p>Hello,<br>
Just wanted to update you on how my endeavors are going, I know that it's far from where I want to get to at the moment, But ill slowly get there and I'm sure I'll come in with some more questions in the near future.</p>
<p>John, Thankyou so much, I understood a lot with the example you sent!! still grasping some on the information. but I'm working through it.<br>
-Bertha</p></div>bbarreratag:support.nodebox.net,2012-11-01:Comment/555563322022-09-01T05:55:54Z2022-09-01T05:55:54Zimporting cvs file quesiton<div><p>Looks like you are making good progress!</p>
<p>Sometimes when I answer a question the asker simply disappears and I am left wondering if the answer was even received. So thanks for the update - I really appreciate it!</p>
<p>John</p></div>johntag:support.nodebox.net,2012-11-01:Comment/555563322022-09-07T02:20:02Z2022-09-07T02:20:02Zimporting cvs file quesiton<div><p>Hi, So another 2 questions<br>
One because I don't know how to do it, and the other one because I can't understand why it's not working.</p>
<p>1) as seen in the picture team A I'm having trouble creating the 3 names for the 3 circles, I have tried many ways and I can't seem to make it work, my attempt to this is inside the "legend" subnode</p>
<p>2) In the decisions subnode I can make the coordinates and make an ellipse on each one of them,,,, however when I try to create a connect node to those coordinates they don't seem to connect.... I don't know what is wrong there,,,</p>
<p>thankyou!<br>
-Bertha</p></div>bbarreratag:support.nodebox.net,2012-11-01:Comment/555563322022-09-07T04:59:44Z2022-09-07T05:01:38Zimporting cvs file quesiton<div><p>Hi Bertha,</p>
<p>I updated your project (attached).</p>
<p>I wasn't sure from the annotation exactly what you wanted for your legend, so I replaced that subnetwork making it much simpler (see screenshot). This is probably not quite what you want, but it should be easier to modify now.</p>
<p>Your decision node is making those ellipses one at a time. Each time it fires, it draws another ellipse. So inside that subnetwork there is only one ellipse at a time and so nothing to connect.</p>
<p>The way to handle this situation is to do your connecting OUTSIDE the subnetwork, downstream. The subnetwork fires many times and then produces a single list of ellipses. In order to connect them I first feed that list into a centroid node to produce a list of center points. THEN you can connect those points.</p>
<p>This is one of the tricky things about working with subnetworks. You have to keep in mind what makes the subnetwork fire and remember that the nodes inside your subnetwork have no idea what's going on outside and what the sum of the final output will be. If your subnetwork only makes one object at a time, there is nothing to connect inside that subnetwork each time it fires.</p>
<p>Hope that helps!</p>
<p>John</p></div>johntag:support.nodebox.net,2012-11-01:Comment/555563322022-09-08T07:30:44Z2022-09-08T07:30:44Zimporting cvs file quesiton<div><p>Thanks John that worked beautifully!!</p>
<p>and thankyou for explaining the subnetwork I assumed because the coordinates were at that level, I could connect them there</p>
<p>Another basic question, can I modify the bounds when I export as pdf? when I export the PDF, it creates a clipping mask, which then I have to manually modify in Illustrator... but I was hoping I can avoid that step.<br>
Any suggestions?</p>
<p>-Bertha</p></div>bbarreratag:support.nodebox.net,2012-11-01:Comment/555563322022-09-08T08:08:32Z2022-09-08T08:10:06Zimporting cvs file quesiton<div><p>Bertha,</p>
<p>When you export to PDF (or any other format), Nodebox clips to the canvas size. Canvas size is defined in the File menu under Document Properties. The properties dialog is a little funky by the way and doesn't respond well to the use of a tab key. So double-click into the canvasHeight value, select the whole thing and replace with desired height, then click away from that cell, repeat with cavasWidth value, and hit Save.</p>
<p>You can see the outline of the canvas boundary as you work by checking the Bounds box above the display panel.</p>
<p>You may also want to define a solid background by placing a colorized rect, the same dimensions as your canvas, under the rest of your illustration by using a combine node. Connect the rect to the first port of the combine node and everything else to the other ports. This makes the boundary really easy to see at all times.</p>
<p>If you want to shrink your work inside the defined boundary or expand it so the boundary clips it in an interesting way (but don't want to redo your entire illustration), you can always use a scale node at the end. Since everything is vector-based, your illustration will retain its quality even when stretched.</p>
<p>(Note: the scale node changes the proportions of all the shapes, but does NOT change the thickness of the strokes. This can sometimes become noticeable. If that happens you will need to adjust your stroke widths accordingly in each shape.)</p>
<p>Your visualization looks nice by the way!</p>
<p>John</p></div>johntag:support.nodebox.net,2012-11-01:Comment/555563322024-01-19T08:23:31Z2024-01-19T08:23:31Zimporting cvs file quesiton<div><p>Hello,</p>
<p>Just to give a little update, I was able to publish my paper, with the use of my viz, from here, so just wanted to post it in case someone wants so see,</p>
<p>Thank @ john for the help in creating them.</p>
<p><a href="http://www.aodr.org/_common/do.php?a=current&b=91&bidx=3479&aidx=38534">http://www.aodr.org/_common/do.php?a=current&b=91&bidx=3479...</a></p></div>bbarreratag:support.nodebox.net,2012-11-01:Comment/555563322024-01-19T09:50:06Z2024-01-19T09:50:06Zimporting cvs file quesiton<div><p>Congratulations, Bertha!</p>
<p>Your paper is interesting. I wonder if you could use Nodebox more directly in some future study of design thinking.</p>
<p>I find the processes of ideation and problem-solving and trial and error are all enhanced by the very nature of the design-time Nodebox experience. The constant spatial manipulation of nodes and links, coupled with the tight feedback loop in the rendering pane often lead me to make discoveries and insights that would be harder to achieve (and less fun!) in "normal" coding environments.</p>
<p>Please keep in touch and let me know if I can help you with any future Nodebox adventures.</p>
<p>John</p></div>john