connecting through the link node
Hi,
I'm trying to connect two different keys by using the link node. The data of both keys consists out of (the same) years. Through the distinct count node (see bottom part of attachment), created by Frederik earlier, I'm able to count the amount of appearances of each year.
So far I've managed to create a line for both of the keys, both divided into the (distinct) amount of points of each key. I've placed rectangles on top of them. The hard part is to connect these rectangles by using this data. I understand I have to layer rectangles on top of each other in the amount of the specific value, and that assigned tot the right points on both lines.
How am I able to transform the data into the right amount of rectangles and distribute them onto the right position? And as a result, will I then be able to connect them through the link node.
Thank you!
Mark
- So-far.jpg 247 KB
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Frederik De Ble... on 10 Feb, 2014 11:31 AM
Hi,
The big trick is to use the zip map to create a mapping between an element and its position.
Here's an example where I map the favorite foods of a number of people. Since some people like the same food, we have to do a lookup.
distinct
node.grid
node.zipmap
node to link the two: the list of unique food items, and a list of positions.lookup
node to take the original list of food items, and generate positions based on that. The result will be a list of positions in the same order as the original list of food items.I've attached the example so you can play around with it.
Hope this helps,
F
Frederik De Bleser closed this discussion on 30 Jun, 2014 11:41 AM.