Member-only story
Graph This, Part 1: Building Knowledge Graphs in R and Python
How to model a dataset as nodes and edges, then build and visualize that model in both languages
I gave a talk at the Kansas City Developer Conference this September on a question that shows up in nearly every analytics engagement I run. A client asks something that sounds simple. Which of our products share the same customers? Who came back after the first order? The answer takes three joins, a subquery, and twenty minutes of explaining why the number moved.
The data was never the problem. How data is visually presented often can be a problem.
Tables are excellent at storing facts about things. Managers are accustomed to reviewing data in spreadsheet fields, which is easy when only a few entries exist. But when many entries exist, relationships among those fields are not automatically clear. Every relationship between those fields lives somewhere else, in the join you wrote, the filter you applied, or the query logic a colleague has to reverse-engineer six months later. Knowledge graphs reveal relationships within the data itself, where you can label each connection and store it alongside the entities it links.
This piece covers the modeling half of what I walked through at KCDC: how to think about a…








