Graph visualization basics pt1: Why graphs?

21st April, 2020

Are you new to graph visualization? Are you keen to understand the basics? Do you need answers to some fundamental graph questions before you add graph visualization to your own applications?

In this first of a 3-part series for beginners, we give you a non-technical, high-level introduction to graphs, graph models, graph databases and graph visualizations.

What are graphs and when are they useful?

A graph is a model of data that features connections (called links or edges) between entities (called nodes or vertices) and properties.

A basic outline where two nodes connected by links with arrowheads.
A simple table with details of 5 people and their phone numbers

Here’s a simple table. Each row of data tells us that there are connections between two entities: a person and a phone number.

The human brain easily makes sense of small pieces of information like this. It’s good at spotting patterns too. We quickly recognize that Joe and Ferris share the same number, establishing a connection between them.

We can build a basic graph model based on this data and then visualize it. The high-level process is simple: identify which entities you want to represent as nodes and links and then apply them. As long as you have connections in your data, even two simple columns are enough to get value out of looking at it in a chart.

We’ve used nodes to represent people and phone numbers and links to connect the two. You can instantly recognize the connection between Joe and Ferris.
We’ve used nodes to represent people and phone numbers and links to connect the two. You can instantly recognize the connection between Joe and Ferris.

We didn’t necessarily need to model this data as a graph and then visualize it to spot our connection. But what happens when our table goes from four rows to 400,000? And what about when we bring in additional columns of property information such as each person’s full name, address, social security number, place of work, and so on? The more data we add, the greater the number of connections.

Here’s a slightly more complex example. The left-hand table is a list of students, each with a primary key. The right-hand table has a list of classes with primary keys. The central table – often called a link table – matches up the two.

Three tables: one showing student names and primary keys, one showing class names and primary keys, and one link table matching the two.

As you can see, this data format works well as a graph.

It’s hard to work out at-a-glance which students are attending what classes. We have to keep tracing each primary key back to their original tables to make sure we’ve got the right information.

Here’s where modeling the data as a graph and visualizing it makes more sense. As we create our graph model, with nodes representing students and classes, and links representing attendance, we turn our conceptual view into a logical view.

Visualizing it instantly brings the data to life, making the chart format is so much clearer than the tabular one.

Applying a graph model to your data makes sense whenever you need to understand the relationships in your data.
Applying a graph model to your data makes sense whenever you need to understand relationships.

We’ve intentionally used simple examples for our graph models, but your data is likely to be more complex. There’s no ‘one size fits all’ approach, and your design will depend on your company style, the type of data you’re modeling, and what it is your users need. We’ve put together data-modeling best practice blog posts to help you.

When creating a graph model is a bad idea

Simple table showing the year, make, model and VIN of 3 cars.

Creating a graph model isn’t always the answer. Some datasets don’t feature connections, so there isn’t much value in applying the node-link structure to them.

This table features a simple list of cars and their VIN numbers. Since each car has a unique VIN number, representing it in graph format wouldn’t reveal any hidden connections

If it included details of vehicle owners, insurance policies, dealerships where the cars were bought, it’d be a very different story. But if a table is restricted to unique data only, graph modeling isn’t effective.

Graph data model vs graph database schema

There’s a distinct difference between a graph model and a graph database schema. The two are related, but they’re not identical.

As we’ve said already, a graph model is when you translate your data into a set of nodes, links and properties. Our previous examples have shown that the data doesn’t need to be in a graph database in order to visualize it. We’ve created our graph models easily from tables, rows, columns, foreign keys and relationships.

A graph database schema already has node, edge and property graph structures built into them. They’re optimized for the job of representing graphs, with connections in a graph database as important as the data itself.

These are just some of the popular graph databases our customers work with. For more information, click on an icon:

Visualizing the Neo4j graph database with KeyLinesVisualizing the DataStax graph database with KeyLinesVisualizing the Amazon Neptune database with KeyLinesVisualizing JanusGraph with KeyLines

Visualize graphs using ArangoDBVisualizing Elasticsearch with KeyLinesVisualizing the OrientDB graph database with KeyLinesVisualizing the Cayley graph database with KeyLines

Microsoft Azure CosmosDB logoVisualizing the Titan graph database with KeyLinesVisualizing the Stardog database with KeyLinesVisualizing the Memgraph database with KeyLines

With data stored in a native graph format, it’s easier to map it to a visual model and create high-performing graph visualizations. There are many graph databases available, and our toolkit technology integrates seamlessly with them all. Find out more in Visualizing Graph Databases.

Why visualize graphs?

Creating a graph data model or connecting with a graph database is the first step towards creating graph visualizations. Once you translate the nodes, links and properties into the real-world representations in your visual model, you can use graph visualizations to bring them to life.

We’ve written before about why you should power your application with graph visualization. Here are some of the main reasons.

Patterns in the data are easier to identify visually

When we try to understand a difficult concept or make sense of a complex problem, we’ll often create a mental picture. We might even draw it out on a whiteboard or notepad. Either way, we’re trying to visualize the facts to gain a new perspective and make sense of it.

That’s precisely what’s happening with graph visualizations. They’re intuitive and they make sense instantly, even to people who’ve never worked with connected data before.

They help you understand what’s going on in the data, see patterns, spot outliers worth investigating further.

This graph visualization shows auto repairs carried out by Fraser’s. Using multiple links to represent the number of offside rear door repairs, it’s immediately clear how much more common this type of repair is compared with others.
This graph visualization shows auto repairs carried out by Fraser’s. Using multiple links to represent the number of offside rear door repairs, it’s immediately clear how much more common this type of repair is compared with others.

There are further great examples of this in our blog post on designing simple visual models that empower & delight users.

You can simplify complexity and focus on what’s important

Graph visualizations are scalable. You can still find and explore the connections that exist even in your largest datasets. This would be a challenge if your data was confined to tables of rows and columns.

When you’re working with large datasets, filtering out the noise lets you focus on the nodes and links of most interest. Whether it’s to examine nodes of a specific type or events that took place at a certain time or in a particular location, our toolkit technology gives you the power to drill down into the detail you need.

Exploring an IT network with details on demand

Learn more in our blog post featuring Five steps to tackling big graph data visualizations.

Graph visualization reveals insight

Users rely on our software to uncover threats hidden in their data connections. The new perspective they gain from visualizing it, together with advanced analysis features, reveal insights that drive investigations.

Our social network analysis measures reveal the relative importance of every node in a network. They quickly identify which nodes are the best connected, have the most power or influence, are the best broadcasters of information, and more.

Social network analysis measures reveal deeper insight hidden in your connected data
Social network analysis measures reveal deeper insight hidden in your connected data

You’ll find more useful information in our blog post on Social network analysis 101: centrality measures explained.

Give graph visualization a go

Now we’ve established the basics of graphs, in part 2 we’ll take a closer look at the most effective graph visualization techniques.

If you’re keen to learn more, take a look at our white papers. And if you’re ready to start visualizing your own data, request a free trial.

More from our blog

Visit our blog