Skip to content

A webapp for exploring and visualizing subgraphs induced on the shortest paths between two nodes. Originally used with data from the Stanford Encyclopedia of Philosophy.

License

Notifications You must be signed in to change notification settings

reppertj/philosophical-graphiti

Repository files navigation

Philosophical Graphiti

Explore relationships among philosophical topics

Philosophical Graphiti shows you paths between and neighbors of philosophical topics generated from a directed graph formed by the "related" links on Stanford Encyclopedia of Philosophy (SEP) articles. It's general enough that it could do the same for other graphs of modest size without much modification.

The site currently works by keeping a single Networkx digraph object (basically a dict of dicts) in memory and only querying the database to return metadata. Node attributes (like titles and links to articles) are stored in the database, but edges are not. Because the SEP graph is relatively small, this has worked surprisingly well, even during modest load testing on a "hobby" heroku dyno.

The server generates a Vega visualization specification, which, thanks to Vega-Embed on the front end, results in an interactive canvas element in the browser. One of my goals was to allow the user to manipulate the way the graph appears to their liking (and save the result), while still coming up with a pretty good "default" presentation most of the time. Vega includes a basic particle simulation (based on d3-force), which allowed me to get pretty close to what I had in mind; I can also use Django's template system to easily change specifications in the JSON based on the graph structure, user-agent, etc. For instance, I initially present touch users with bigger nodes to make it easier for them to manipulate the graph. The specifications are flexible and deep, and once you get used to the grammar model behind its design, you can express a wide range of user, data, and mark interactions in a relatively small JSON string passed as a variable to the renderer.

Animation of the Philosophical Graphiti website


Justin Reppert

Distributed under the MIT license. See LICENSE for more information.

About

A webapp for exploring and visualizing subgraphs induced on the shortest paths between two nodes. Originally used with data from the Stanford Encyclopedia of Philosophy.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published