Group by count
Hi NodeBox folks
I've trying to build a pie chart / wheel diagram from CSV import. I've got an input list of strings, and I'd like to size the arcs by the count of duplicate entries for each unique value in the list.
So if my input list is something like "Alice, Alice, Alice, Bob, Bob", I' like to produce the list of numbers "3, 2" so I can size my arcs accordingly. In SQL land this would be a GROUP BY clause with a COUNT(*) in the SELECT part.
Any ideas?
Pete
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 02 Sep, 2013 09:26 AM
Hi,
There is no built-in node that does this. However, I've created a custom one for you ("group_count") that you can use.
I've added an example that counts all words from a speech by Obama and shows a frequency plot. Be sure to read the comments to understand the network.
Let me know if you have any further questions.
We're planning on adding better aggregation capabilities to NodeBox in the future.
Best,
F
Support Staff 2 Posted by lucasnijs on 02 Sep, 2013 03:29 PM
Comment version still needs to be released?
Support Staff 3 Posted by Frederik De Ble... on 03 Sep, 2013 07:08 AM
Hi,
Sorry for the confusion. A version of NodeBox with support for comments is
not released yet. That said, the file will open fine, you just won't see
any comments.
We'll prepare a new release of NodeBox – with support for comments – this
week.
Best,
F
Support Staff 4 Posted by Frederik De Ble... on 03 Sep, 2013 09:46 AM
We just released a version supporting comments. Download it from the NodeBox site.
5 Posted by Pete on 11 Sep, 2013 09:05 AM
Just what I needed - thanks so much Frederik!
Pete
Frederik De Bleser closed this discussion on 20 Sep, 2013 08:36 AM.