MobilityDB Workshop

Mahmoud SAKR

Université libre de Bruxelles, Belgium


Université libre de Bruxelles, Belgium


Every module in this workshop illustrates a usage scenario of MobilityDB. The data sets and the tools are described inside each of the modules. Eventually, additional modules will be added to discover more MobilityDB features.

While this workshop illustrates the usage of MobilityDB functions, it does not explain them in detail. If you need help concerning the functions of MobilityDB, please refer to the documentation.

If you have questions, ideas, comments, etc., please contact me on

Table of Contents

1. Managing Ship Trajectories (AIS)
Preparing the Database
Loading the Data
Constructing Trajectories
Basic Data Exploration
Analyzing the Trajectories
2. Dashboard and Visualization of Ship Trajectories (AIS)
Setting up the Data Source
Setting up the Visualization Dashboard
Sign in and Connect to Data Source
Creating a Dashboard
Speed of Individual Ships
Routes Used Most Frequently Visualized with a Static Heat Map
Number of Boats Moving Through a Given Area
Boats in Proximity in a Given Time Range
Dynamic Dashboards - Creating Variables
Dynamic Query: Number of Boats Moving Through a Given Area in a Certain Time Period
Global Variables
Final Dashboard
3. Managing Flight Data and Creating Dashboard with Grafana
Part 1 - Data and Environment Preparation
Preparing the Database
Data Cleaning
Setting up the Dashboard and Connecting to Data Source
Part 2 - Working with Discrete Points
Visualizing 24hr Flight Pattern of Single Airplane
Time-series Graphs for a Single Airplane
Part 3 - Working with Continuous Trajectories in MobilityDB
Creating MobilityDB Trajectories
Aggregating Flight Statistics
Flights Taking-off in Some Interval of Time (User-Defined)
Complete Flight Data Business Intelligence Dashboard
4. Managing GTFS Data
Loading GTFS Data in PostgreSQL
Transforming GTFS Data for MobilityDB
5. Managing Google Location History
Loading Google Location History Data
6. Managing GPX Data
Loading GPX Data

List of Figures

1.1. Visualizing the input points
1.2. Visualizing the ship trajectories
1.3. Visualizing trips with abnormal lengths
1.4. Ship trajectories after filtering
1.5. Ship trajectories with big difference between speed(Trip) and SOG
1.6. Ship trajectories with big difference between azimuth(Trip) and COG
1.7. A sample ship trajectory between Rødby and Puttgarden
1.8. All ferries between Rødby and Puttgarden
1.9. Ship that come closer than 300 meters to one another
1.10. A zoom-in on a dangerous approach
1.11. Another dangerous approach
2.1. Data Source settings
2.2. Datatype transformations in Grafana
2.3. Choosing visualization type
2.4. Value options dialogue box
2.5. Stat styles dialogue box
2.6. Standard options dialogue box
2.7. Thresholds dialogue box
2.8. Individual ship speed statistics visualization
2.9. Setting initial view in map view dialogue box
2.10. Setting up heat-map in data layer dialogue box
2.11. Choosing color scheme in standard options dialogue box
2.12. Route usage frequency heat-map visualization
2.13. Frequency intersecting with geometric envelop visualization
2.14. Multiple layers in data layers dialogue box
2.15. Visualization of ships within 300m using heat-map
2.16. Multiple results for the same ship at various times while in a port
2.17. Dashboard settings gear box
2.18. Selecting Variables in dashboard settings
2.19. Creating user-defined list of custom variables
2.20. Visualization of geometry intersection using dynamic variables
2.21. Assigning time range using global variables
2.22. Full Dashboard
3.1. First row of table single_airframe, with 24hrs of flight information for airplane c827a6
3.2. Full table single_airframe_traj for airplane c827a6 with data in mobilityDB trajectories format
3.3. First row of table flight_traj_sample, which includes 200 flight trajectories.
3.4. Grafana time range panel
3.5. Single airframe geopoints vs time
3.6. Single airframe velocity vs time
3.7. Single airframe altitude vs time
3.8. Single airframe vertrate vs time
3.9. Single airframe callsign vs time
3.10. Average flight speed visualization
3.11. Multiple queries providing results for a single visualization
3.12. Override options for panel with multiple queries
3.13. Statistic visualization of number of flights by license type
3.14. Zoomed in view of flight ascent
3.15. Final visualization with multiple flight ascents
3.16. Flight data business intelligence dashboard
4.1. Visualization of the routes and stops for the GTFS data from Brussels.
5.1. Visualization of the Google location history loaded into MobilityDB.

List of Tables

1.1. AIS columns