Venn CBB (Kenpom, MongoDB, D3)

I was brought up as a huge sports fan, and got the chance to witness the Giants' championship runs, the insanity the Warriors were brewing up, and France's 2018 World Cup. Going into Duke, I immediately became a massive college basketball fan, tenting for games, covering myself head to toe in blue paint, and trying to make every stats class project about advanced basketball metrics (2023 and 2025). So, I decided to try to make my own stat analysis website called Venn CBB, which you can find here.

Why Venn?

The basic idea for this site came up when I came across several advanced cbb pages posting stats like the following, which essentially created intersections between multiple stats. cbb report tweet I was wondering if there would be a way to automate this process, as in instead of creating models taking in all of these different stats, we could just find the perfect intersection, top 5 in this, and top 10 in this, etc...

Diagrams

The first iteration consisted of me experimenting with Venn diagrams, which as I came to find out, are pretty hard to create. Tracing them by hand isn't too bad, but algorithmically proves to be an interesting challenge - you essentially have to optimize the circle's locations such that all size constraints are filled. I ended up using the venn.js library by benfred, which handles all the math that goes over my head. It still took a while to integrate it due to it being written in Javascript 7 years ago, but with some modifications I was able to include it in my React Router Typescript project. For other diagrams like box plots, I used Nivo, since it was also built on top of d3.

Data Dashboard

Although the diagrams were promising, I wasn't getting the data visualization I originally wanted, so I decided to create a data dashboard to go along with it, taking a lot of inspiration from Kenpom's layout but tweaking it to add my own favorite features, like sorting, filtering, exporting... The original Venn idea remains in the filtering category, where it shows the user how the filters affect the data, and where you can automatically filter to the min/max of only championship winners to try to find the perfect intersection. I'll definitely come back to this to add even more features that I would like, but it's in a good spot for now...

alt text