Welcome after long break!
What I’m going to show you in this short post is nice tool for data presentation in Quantum GIS. The tool is called TimeManager plugin and allows you to present the data on your map in time domain.
Sometimes you would like to have your presentation more interesting for the audience and nothing makes presentation more interesting than effects such as animation. Also with this plugin your are able to present on your map how the situation change dynamically in time.
In this example I will use one of the projects which was presented in one of the previous posts:
We will use the city map as a base map. Also let’s install TimeManager plugin. It is free and you can find it under Plugins menu of Quantum GIS.
What I’m going to show you is how to use this simple plugin for your point data in two scenarios.
Let’s imagine that we have buses, trams, streetcars or trains timetable and stops locations. We would like to present on our map/animated map how the particular means of transport move around the city in a given period of time.
I made new shapefile called tram.shp in my project. It shows trams locations vs. time.
You can notice red points indicating tram/bus position at the particular time.
Attribute table contains date and time of arrival at the stop and tram line. We have three lines here (id = 1,2,3).
Now we will use this attributes to show the trams movement around the city.
Let’s open TimeManager plugin. You should see TimeManager menu at the bottom. Click Settings to set up the animation.
We need to pick the layer which we are going to animate (tram.shp) indicate start time column – this attribute will be used to move our features. We also have to specify ID attribute to present each of the three tram lines separately. I also picked Linear Interpolation option. It will interpolate my feature movement between each time control point. But watch out! It will interpolate movement linearly so if your track or road is not straight it will cause errors (you will see them in a moment). Accept the changes.
Now we have to export the result. Unfortunately I’m using QGIS on Windows machine so the only option is to export separate frames as PNG files and then integrate them in external software into animated GIF or other animated format (I used Photoscape). Select the output folder – there will be stored all your frames.
Also before you will hit the play button check the small icon on the top left corner of TimeManager menu (it should turn green). Also on the slider you can notice that the dates/hours are inserted by the TimeManager correctly. Press play and let the TimeManager record your animation.
After integrating of the PNG frames in Photoscape I obtained following animated GIF.
You can notice moving features and also changing date label in the bottom right corner. You can also see that using interpolation option might cause some problems: some of the trams are not on their tracks because of that.
Let’s imagine the situation that people are gathering in the local park and sit on the lawn on their favourite positions to sunbath and drink some beer. We can track their location and time of the arrival. Weather is great so there are more and more people coming to the park.
I’ve made another point layer, shapefile called crowd.shp. The attribute table is very simple showing only time of the arrival of each feature = human.
You can see that the attributes are given in different format than before. TimeManager uses various time formats but you need to be sure it the one you used is interpreted correctly by the plugin.
This is the point shapefile showing the locations of the sunbathing people.
Again let’s use our TimeManager plugin to run the animation. Select the crowd.shp layer, indicate the start time from the time attribute column and this time pick ‘No end time – accumulate features’ option. This will allow us to show how the cumulative number of people grows in time not just movement or change of single feature in time.
Again we need to specify the output folder. Press OK, mark the small icon on the TimeManager menu (it will turn green) and run the animation.
After it finishes you can join the PNG frames to animated GIF using Photoscape or other software.
Now you can see on your map how the number of people in park dynamically changed during the day.
I hope you liked this short post. I think this simple plugin, TimeManager, can be useful for data presentation in original and interesting way but also might help to see the dynamics of data change both in time and space.
If you liked this post please also check: