Temporal and Spatial Analysis in Knowledge Graphs

Ondřej Paterka

by Ondřej Paterka
· 3 min read

Graphs are a natural fit for investigative use cases. Whenever you want to analyse a situation containing people, objects, locations, and events (POLE), graphs emphasising relationships between objects are your natural companion.

To gain a basic situational understanding, you need to first analyse and understand the rough shape of your data. Who is who, what is what, and how is everything in your model connected. The closer the model is to the actual reality, the more reliable will be the answers you want to get from it. Here is where you don’t want to be constrained by fixed tables (looking at you, relational databases), but you need something as alike to the real world as possible. You want a knowledge graph.

When gathering real-world data, it might be the case that you already have what you need for it. After you map and outline your data in a knowledge graph, you can add one or two additional dimensions discussed here: space and time. Adding these will bring your model closer to the real world and deepen your understanding of what is (or was) happening. And help you take the right action.

Spatial Analysis - Where Things Are

You have everything nicely outlined in your visualisation, on your canvas, but something is missing here. Where is everything located in the real world? Some of your nodes may have properties that contain geospatial information, such as geographic coordinates. You should then put it up for good use.

In its simplest form, Spatial Analysis is putting stuff on a map. Easy right? You will need a visualisation tool that takes the suitable properties and visualises nodes in the real world. What you are doing is combining two models. One is your knowledge graph, and the other model is the map. Once these are aligned and the coordinates of the visible map match some of your nodes, the nodes will overlay on the map.

This gives you the added dimension of understanding. Who is nearest to whom? What is in a reachable distance? Is there an interesting cluster? Maybe something suspicious is happening? Here is where your expertise comes in. Or some clever algorithm. Or maybe both.

Geospatial

Temporal Analysis - When Things Were

So we know where things are, or more precisely, where they were at the time the data was collected. Now, did something move or change? How did the situation evolve? For this, you will need one extra set of properties - timestamps. Again, some of your nodes might already contain them.

In the tool of our choice, we add the time bar. Now, for the selected nodes, you can see “when” they appeared on our canvas. And you can follow how the whole situation unfolded. Is there a particular event that triggered many more? This is typical for fraudulent activities. One innocent card transaction happens in time, just before many fraudulent ones. What does it tell us? You can follow this line of investigation just like we did in our recent workshop.

Temporal

Combining When and Where

If our knowledge graph contains both timestamps and geospatial properties, we can combine these and dig deep into Spatiotemporal analysis. You will be able to see and analyse a real-world representation of where people or objects were at any given time and what happened where. This can answer questions like:

  • Did someone meet someone else repeatedly?
  • Was it feasible for someone to conduct some specific actions on multiple locations in the given time?
  • Is some object’s location adjacent to one or more people as time flows?
  • Who started a particular chain of events and where?

Just looking at your canvas with added time and space dimensions will extend your capacity to understand what has happened or is still happening entirely. If you combine this with your expertise and some clever pre-canned graph data science algorithms, you can get the answers you were looking for. And take action. Possibly in real-time. With automated alerting. You will find the bad guys, stop fraud from happening and protect the interests of your community. With the right tools, you will make sure the bad guys do not win!

Share this blog post: