Tutorial: Create instant location based timelines using Wikidata queries

location timeline
This tutorial will teach you how create an instant timeline based on a specific location and radius. Just like the “descendants of” timelines from the previous tutorial these location based timelines are made using Wikidata queries

To create the query we are going to select a specific location using a geo-coordinate and set a radius in km. The query then will then populate the timeline with all the events that have their location set within the defined radius.

This means we can explore the local history of any location, you might want to make a timeline of the area where you were born, or where you live, or maybe from a famous landmark or building.

Here are a couple of queries to give you an idea.

5km radius of the Eifel Tower, Paris

http://histropedia.com/timeline?q=around[625, 48.858366, 2.294449,5]

3km radius of Big Ben, London

http://histropedia.com/timeline?q=around[625, 51.500732, -0.124239,3]


During this tutorial I will use the example above of 3km radius from Big Ben, London.

The first part of this tutorial will show you how to use Google Maps to get the geo-coordinates needed for the query. If you already know how to find geo-coordinate you can jump to part 2.

NOTE: for the query you need longitude and latitude coordinates expressed in decimals, not degrees, minutes, second as used in Wikipedia articles.


PART 1 – Finding the geo-coordinates

Step 1 – Find a location of interest on Google Maps.

Open Google Maps and navigate to the place of interest, in this case Big Ben, London.

Step 2 – Get the geo-coordinates

Right click (cmd+click if you using a Mac) on the point on the map you want to get the coordinates for and select “what’s here?”


An information box will appear under the search box on Google Maps, in the bottom of the box there are 2 sets of numbers, these are the geo-coordinates for that location. Select the numbers and copy them to the clipboard, or make a note of them somewhere, you will need them for the query.


The geo-coordinates for Big Ben, which is actually the nickname for the  Great Bell of the clock in the Palace of Westminster, are 51.500732, -0.124239.

NOTE: If you are using the classic version of Google Maps when you chose what links here the coordinates appear in the search box, not in the drop down info box as shown above. This actually makes copying the coordinates much easier. Also sometimes Google Maps opens in classic mode when you follow a link to a location.



PART 2 – Building the query URL

To run a Wikidata query on Histropedia we simply have to append the query to the Histropedia timeline URL. The query URL to create a location based timeline can be broken into 4 parts as shown in the diagram below.


The URL has been filled in with coordinates for Big Ben, 51.500732, -0.124239, and a radius of 3 km, here it is in plain text so it can easily be copied and pasted

http://histropedia.com/timeline?q=around[625, 51.500732, -0.124239,3]



PART 3 – Create the timeline

To create the timeline simply copy and paste the URL into a web browser.

Click here to run the example query of a 3km radius from Big Ben, London.


Our timeline creating robot, Histrobot, will run the query on Wikidata and add the results straight to the timeline.

Wikidata-Histropedia query-running


If you already have events on the timeline from a previous session, you will be prompted with the following message:

Merge or Replace (in answers doc)

Select “Replace” to discard the previous events and show the new result only. Learn more about the Merge or Replace feature



PART 4 – About this query

The purpose of this query, and the timeline it creates, is to allow you to show events taking place around any location, this is why we are using geo-coordinates instead of places, such as towns, cities or countries. Because of this, the query is limited to Wikidata items with the property “location” shown as geo-coordinates. The main event type that is missing from these queries are people, who have properties such as, “born in”,” lived in” and “died in”. These properties are always shown as a place, not as coordinates. We will be looking at creating timelines using these other location properties in our next tutorial.(see below)




Create timelines based on defined locations such as countries, cities, towns and venues.

Because these queries work on a radius from a single location they are not always ideal for towns or cities, which rarely have perfectly circular boundaries. For larger towns and cities there may be a Wikipedia category that can be used to make some interesting timelines, however we can also use a Wikidata query to create this type of timeline, which can include results for things such as books or films whose narrative was set in a specific city or country. It also allows for people and other types of events that don’t have their location set as a geo-coordinate to be included in the timelines. In the next tutorial we will look at this second type of location based timeline and explore some of the different options for further filtering the queries.




Sean McBirnie

Co-Founder at Histropedia

Latest posts by Sean McBirnie (see all)

One comment

  • boundaries for our needs first, it’ll just put more cash in foreign oil pockets and
    may have very little affect our retail prices. Creative financing choices
    are in place which help homeowners adopt their own solar powered energy systems.
    Again, just those places of the world with volatile volcanic activity and underground systems can be
    relied to produce this kind of their time.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.