My Notion Graph
One of the party members in my main D&D group finally downloaded Obsidian and has started converting his hellish notes doc into Actual Proper Markdown With Frontmatter in order to get the nice links and graphs. And since I'm infinitely jealous I wanted to make my D&D notes, which live in Notion, into their own little knowledge graph.
Surely someone has a little plug-in for this, I foolishly thought. There are a few apps that claim to do this but I couldn't get any of them to work in the few minutes I was willing to spend. Instead, I vibed up a "download all Notion pages and throw then into a network" script to do something similar enough.
Interactive
Throwing everything into D3, we get a nice simulated network plot. There's a couple thousand nodes, so I disabled simulation by default. Hit Play to watch it go.
Thoughts
This was definitely interesting to see! I knew I had a lot of notes in various databases, but I didn't realize how large my clippings were or how connected my projects database was to software.
My biggest clusters ended up being:
- My Software/Projects/Blog Posts amalgamation, where I take notes on all of my computer-y stuff and publish some of them.
- My Internet Clippings, where I save bookmarks that could be helpful later. These get linked to from Projects occasioanlyl but are otherwise isolated.
- My Recommendations and Media Log databases, where I log who suggested things to me and how much I liked them.
- My D&D Notes, both public and private, which have all of my prep work, session notes, vignettes, and evil plans.
Experimenting
I also spent some time with the built-in NetworkX graph visualizers. I know that it isn't designed for visualization, but they were very helpful for debugging things along the way.
The Useful Ones
Both of these did a good job of showing the relative densities of pages, the clumps of high word-count pages, and connections across databases. I never really picked a favorite between these two, when in doubt I'd say go with the spring.
Spring Layout
The classic force-directed layout that treats nodes like physical objects connected by springs. Strongly connected nodes get pulled together while disconnected ones get pushed apart. This is your bread-and-butter for most network visualization - it naturally clusters related content and gives you a good intuitive sense of what's connected to what. Unfortunately it can take a while to compute for large graphs.
Fruchterman Reingold Layout
Another force-directed approach, but with more sophisticated math behind the scenes. It tends to produce more evenly distributed layouts than plain spring, with better edge crossing minimization. Still, it ends up looking basically the same as the spring layout.
Honorable Mentions
I was surprised at how useful these two were, all things considered. They aren't ideal for actual use, but they gave some good insights.
Kamada Kawai Layout
The Kamada Kawai was actually the first one I tried after good ol' spring. This layout tries to make all shortest-path distances match up with euclidean distances on the page, which means it's really good at spreading everything out evenly. Anything not in a cluster gets thrown way out there, which is nice for viewing strict hierarchies.
Random Layout
It turns out if you just throw everything on a page at random and draw lines between the connections you basically just have a red-string murder-board. But honestly? Sometimes this is exactly what you need. It strips away any algorithmic bias about what "should" be close together and just shows you the raw connectivity patterns. It's a good sanity check - if the random layout still shows obvious clusters purely through edge density, you know you've got some real structure in your data.
The Circles
I'm not actually sure what these circular layouts are supposed to be good for. Maybe if my connections were less hierarchical it could be helpful?
Circular Layout
This one just puts all your nodes in a big circle and draws the edges. It's deterministic and looks very neat, but completely ignores the actual structure of your network. The only time this might be useful is if you have a small number of nodes and you want to see every possible connection clearly, or if you're making a poster and need something that fits in a specific circular frame. Otherwise, it's basically just decoration.
Shell Layout
Like circular, but with multiple concentric circles (shells). NetworkX tries to put more central nodes in the inner shells and less important ones on the outside. This can actually be pretty useful for networks with a consistent hierarchical structure (known in advance) where you want to see all "levels" of importance.
The Rest
Spiral Layout
I thought this one was pretty funny. I have no idea how the databases got stuck on the end of each of these arms, seemingly connected at random to other arms.
ARF Layout
Maximum spread. No cohesion. It spreads everything out as much as possible with no regard for the actual connections, like a circle version of the random layout.
BFS Layout
The $1 trillion line.