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

22 Feb, 2024 05:51 AM
22 Feb, 2024 01:11 AM
21 Feb, 2024 05:27 PM
21 Feb, 2024 04:49 PM
16 Feb, 2024 05:24 PM

 

06 Feb, 2024 04:45 AM
19 Jan, 2024 09:50 AM
13 Jan, 2024 03:47 AM
05 Jan, 2024 05:10 PM
05 Jan, 2024 04:54 PM
04 Jan, 2024 11:49 PM