Data acquisition and further planning

The idea is to embed in the WordPress page a timeline of the Venetian territories throughout the period 1100-1600. This timeline consists of two parts:

  • A time slider listing the historical events, in which the user can navigate
  • A map representing geographically the selected event, and the state of the Venetian empire at the time of the event.

A basic example of a geographical timeline created with the tools that will be used in the context of this project is presented below.

Basic timeline example

The first task of these three weeks was to select a data source to work with, and to understand its format. I chose to use historical data gathered by Mélanie Fournier in a large excel file, which includes references to historical sources, of which the most frequently cited book is Venice, A Maritime Republic, by Frederic Chapin Lane. The relevant part of this file contains name of places conquered by Venice, the date of conquest / lost, a brief description of the event, and (incomplete) geographical information.

The second step was to associate shapes (polygons) with the considered historical events. The data spreadsheet contains, if any, only a single point representing each location. For map visualization, it would be a lot better to work with polygons.  As a starting point, I chose to use the Euratlas data that was provided to me. These shapefiles represent political maps of Europe every 100 years.  The task was then to extract the polygons corresponding to the Venetian Empire every century. I installed the Qgis software and managed to import the provided shapefiles. However, I was unable to find an easy way to export the coordinates corresponding to the vectors of the polygons. After some tweaking, I managed to export the relevant coordinates, but there was no way to distinguish the several disjoint polygons contained in the shapefile. The screen capture below represents the state of my Qgis project, after import of the relevant Euratlas shapefiles. The political boundaries of the city of Venice are represented by the straight black line, which simply links the vertices (red crosses on the map). It is the coordinates of those vertices that I am interested in being able to export in a format that is convenient to work with.Capture d’écran 2014-03-05 à 22.47.13

After some headaches, I decided to turn to Matlab. Using the mapping toolbox, I was able to import the relevant shapefiles in the program. The data structure then gave me access to the x and y coordinates of the points, separated by a NaN value whenever a new polygon was created, which is exactly what I needed. It remained to identify which entries of the data structure corresponded to Venice. This identification task was done by going back to Qgis, and carefully checking the position at which Venice appeared every century.

I then built a function to export all this data in a convenient to use matrix, that I then export as .csv for easier manipulation by other programs. A few days later, I realized that, in order to display geographical data using Google Maps, I needed to provide it with geographical coordinates (latitude and longitude), as opposed to the geospatial data (projected coordinates x and y) that I was storing. Thus, I implemented another Matlab function which operated this change of coordinates on the data. The downside of this data set is that the polygons are not identified by a name. Hence, if one wants to display the polygon corresponding to the island of Cyprus, the matching vertices would have to be identified in the matrix.  I did not manage to find an easy way around it other than manually searching for the corresponding set of coordinates.

Having both the geographical and the historical data at hand, I was then able to focus on the way that this data was to be presented. The original idea was to use the Timeline javascript tool, in order to display maps of the Venetian Empire at times corresponding to the historical events to be added. The gmaps tool  was then to be used as a rather easy way to display a Google map tile including the relevant polygons (as opposed to the not-so beginner friendly official Google maps API).

However, it remained to integrate the map in the Timeline framework. After some inspection, I realized that this tool, which allows very easy timeline creation based on Google docs spreadsheets, was to be seriously tweaked in order for it to display the custom maps that I was generating. Since such modifications were way above my programming skills, I then started to look for another displaying tool and stumbled on the timemap Google code project. This tool allows the display of different placemarks on Google Maps in a way that seems rather easy. Once again, though, documentation is non-existent and consists only of code examples.

Thank to the help of Cyril Bornet, we were finally able to load this tool in WordPress after the addition of a new javascript plugin for WordPress, and I am currently working on setting up a minimal example. The plan is now to have a working minimal example by mid-March, before starting to fill it up with some historical data, in order to be able to present a rough prototype in the next project report blogpost.