Gaze of Time

Web based timeline visualizations

Leandro Vieira

--

This article is about Gaze of Time (available on Notebook and PC), a website where you can see Wikidata items as timelines, so that different aspects of the cosmological, geological, evolutionary, cultural and technological history are displayed to be observed and studied.

Example of a simple timeline, fragment of prehistoric inventions

Importing the data

As Wikidata, the main data source of the project, has so many items (currently more than 45 millions), and the timeline visualization should be limited to something that our brains (and computers) can handle, instead of loading the whole database, I carefully imported a few hundred thousand items, each one related to the timelines I worked on.

The importer module is a console, written in PHP and JavaScript, that allows users to input a list of names and Wikidata IDs. Each item is retrieved and loaded according to the selected options, finding the information mainly in Wikidata and Wikipedia but also trough other APIs, such as The appache 64 for IMDB queries.

During the process, the items are mirrored in the site and relations created.

Importer console at work

Items hierarchy

This was one of the main problems in creating the application. As the timelines are automatically generated, a single one of them may have thousands of items to load (for example, items related to “writer” or “female”), so I needed to set some kind of score on each item, so I could limit the visualization to the few hundred most important ones.

But that wasn’t enough, the hierarchy must be particular for each context.

If Bobby Fischer is not too important among the most powerful people in history, he is definitely in the top when it comes to greatest chess players.

Thus, each visualization isn’t really showing the items themselves, but the relation between that item and the subject of the current timeline. That way, when you are seeing the timeline of chess players, the relation between “chess player” and “Bobby Fischer” has a high score, but if you are seeing the timeline of the “english” language, even thought that was his mother tongue, the score is much lower, as you would expect to see things like countries, institutions and writers.

In short, the score of each item is calculated based on a combination of the amount of relationships of an item, the amount of shared relationships with the item that is subject of the timeline, the amount of backlinks on Wikipedia and the length of the Wikipedia article. Finally, movies are also affected by it’s review score (in sites like IMDB, Rotten Tomatoes, Film Affinity and Metacritic), and all items get a boost for being older, as you wouldn’t expect to see people or cities when looking at a span of millions of years.

This technique is far from perfect, but has proven to be a good enough approximation as a starting point. Hereafter, the score of items and relations can be regulated in the interface, feature that soon will be available for everyone.

Detail view of an item, with editing tools, including hierarchy modifier

The visualization

Which is, of course, the core of the project.

There could be a lot to talk about it, but I will let you to look for yourselves.

As a quick note, I decided very early in the development not to use a third party library, even thought I love tools like D3.js, the idea was to use pure HTML/CSS, so none was needed.

As a token of appreciation, I will soon write an article dedicated to many sources of inspiration, all kind of brilliant solutions to the problem of time visualization, before which Gaze of Time is a very simple and generic example, as is not created for a particular subject and have to deal with the obstacles of the medium.

Timeline of Roman Emperors

Filters

Making use of some of the power of Wikidata, each timeline has its one filters, allowing you to show/hide and color code the items according to different forms of grouping.

Collections

Finally, collections are a different type of node. Unlike items, they are created in the site itself. They are a custom list of existing items, which have sense outside the realm of Wikidata relations. One example is Harold Bloom’s Western Canon of literature.

Thank you for reading!

--

--