Hacker News new | ask | show | jobs
by benfrederickson 2990 days ago
Neat demonstration!

A while back I wrote a small package in Javascript for computing area proportional Venn and Euler diagrams: https://github.com/benfred/venn.js . The 2 circle case here is relatively easy, but the problem gets tricky when you have 3+ sets. I wrote up my approach here https://www.benfrederickson.com/venn-diagrams-with-d3.js/ and https://www.benfrederickson.com/better-venn-diagrams/

2 comments

I really like this project. I have some high-dimension data (object deduplication) that would really benefit from a visualization like this.

In the music example, it has to give up on rendering all intersections since the layout isn't feasible with area-proportional circles - is there anything else that could be done? Is it possible to use ellipses or curved-shapes instead?

But then I guess searching for a solution could become too computationally expensive for client-side JS.

There is a pretty good breakdown of a bunch of different options for visualizing sets here: http://www.cvast.tuwien.ac.at/SetViz

Venn/Euler diagrams don't work all that well past 3 sets, not all areas will be shown if using circles - so unless some of the sets are disjoint it will be a misleading diagram (like in the music example). However, I think it works well for 3 set diagams, I have an interactive example on last.fm data here https://www.benfrederickson.com/distance-metrics/ in the context of explaining some simple distance metrics.

You could give up on trying to represent the sets with overlapping circles, and use a different approach, such as UpSet: http://caleydo.org/tools/upset/
I wanted to do this for three circles a while ago and found this aS well. http://www.eulerdiagrams.com/Euler3.html

I thought it was pretty neat