Group by count

Pete's Avatar

Pete

28 Aug, 2013 02:05 PM

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

  1. Support Staff 1 Posted by Frederik De Ble... on 02 Sep, 2013 09:26 AM

    Frederik De Bleser's Avatar

    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

  2. Support Staff 2 Posted by lucasnijs on 02 Sep, 2013 03:29 PM

    lucasnijs's Avatar

    Comment version still needs to be released?

  3. Support Staff 3 Posted by Frederik De Ble... on 03 Sep, 2013 07:08 AM

    Frederik De Bleser's Avatar

    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

  4. Support Staff 4 Posted by Frederik De Ble... on 03 Sep, 2013 09:46 AM

    Frederik De Bleser's Avatar

    We just released a version supporting comments. Download it from the NodeBox site.

  5. 5 Posted by Pete on 11 Sep, 2013 09:05 AM

    Pete's Avatar

    Just what I needed - thanks so much Frederik!

    Pete

  6. Frederik De Bleser closed this discussion on 20 Sep, 2013 08:36 AM.

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

Recent Discussions

18 Nov, 2024 11:24 PM
18 Nov, 2024 09:01 PM
07 Nov, 2024 10:53 AM
02 Nov, 2024 11:22 AM
01 Nov, 2024 12:41 AM

 

01 Oct, 2024 07:59 AM
30 Sep, 2024 11:37 PM
30 Sep, 2024 11:11 AM
30 Sep, 2024 02:37 AM
28 Sep, 2024 10:33 AM
26 Sep, 2024 06:41 AM