Help I broke filtering.

27 views
Skip to first unread message

Amogh Akshintala

unread,
Nov 8, 2016, 5:08:05 PM11/8/16
to dc-js user group
Hey everyone,

First off, I'd like to thank everyone involved in building and maintaining d3, crossfilter, and dc.js for their incredible work that has enabled me to build such useful visualizations.

I've been working on building a visualization for a dataset that I collected recently about the usage of x86 instructions on the Ubuntu repository. You can check out the visualization in it's current form at http://instrstudy.aakshintala.com

Now, onto the problem:
I tried to create a jsFiddle so you can play with it but I can't seem to get that to work (I'm not a particularly proficient  in JS or most Web tech).

I'm trying to add another category to the data. To group data by the popularity of the packages analyzed, I calculate the probability that the package will be installed given a random installation and then group packages by popularity%10. If you excuse the poor nomenclature I'm using, group9 = >90% probablity, group 8 = 80-90% etc. group10 differs from the pattern in that it's actually 1%-10% while group0 is 0%-1% (needed to make that explicit split because 0-10% is the largest category).

I added another rowChart to show the grouping. However, now filtering on the 'Type of Instruction' (leftmost rowchart) seems to be broken. If I select any of the less popular types (other than Data) the other charts don't filter correctly. If I click at least 2 Types it seems to filter correctly. I'm just baffled as to what is going wrong.

Another question:
The popularity chart is currently plotted by groups on the y-axis and reduceSum( d.count) - the number of times each of the instructions occurred - on the x-axis. I want to plot group vs number of packages in the group instead. I have this information in the json file under a separate top level attribute. Essentially I'd like to plot the graph using values from a different dataset, and then have the selection filter the original dataset. My intuition is that I could create another crossfilter for just the popularity groups and then when that changes manually apply the filter to all the dimensions of the other crossfilter object? Does this make sense?

Any help will be greatly appreciated.

Thanks,
Amogh


Amogh Akshintala

unread,
Nov 9, 2016, 7:20:49 PM11/9/16
to dc-js user group
I figured out why this was happening. I had some NULL values in one of the fields in my data. I wish JS would fail explosively on bad input instead of limping along.

Thanks for reading.

Gordon Woodhull

unread,
Nov 21, 2016, 2:00:23 PM11/21/16
to dc.js user group
Thanks for following up, Amogh.

Yes, we've talked about doing some data validation in crossfilter. It would be way too slow to do this during calculation, but it might be possible to optionally do a first pass over the data using the dimension/group accessors to see if there is obviously bad data in there.


-- 
You received this message because you are subscribed to the Google Groups "dc-js user group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dc-js-user-gro...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dc-js-user-group/47f2d5f4-60f6-4156-a919-42d1cceff22e%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages