Introduction¶
What is MTLDP?¶
MTL data platform is a Python package that can help you you build your own applications based on connected vehicle trajectory data as well as the network modeling and analysis. MTLDP provides a series of fundamental functions that help to parse, process, and match the trajectory data, map data, and signal state data. It also has certain higher-level applications with regard to both safety and mobility measurements and optimization.
The following flowchart shows a brief data flow in MTLDP. MTLDP takes different types of data as input including the OpenStreetMap data, trajectory data and Signal Phase and Timing (SPaT) data. By first loading and parsing the data as a standard in-memory data structure, MTLDP provides a bunch of functions and applications based on this standard data structure including data processing, analysis, visualization, etc.
Note
MTLDP is designed to be a generic data processing platform for different types of trajectory data. Any trajectories with the mandatory attributes (GPS, timestamp) can be loaded into MTLDP.
Data synchronizing or map matching is probably one of the most fundamental process to combine the different data sources. MTLDP can help you to synchronize the loaded data, including:
Match the trajectory to the map: add map/location attributes to the trajectory data;
Allocate the trajectory data to the map for the location-based researches;
Load the SPaT data and add the SPaT information to the network and vehicle trajectory accordingly.
MTLDP provides different trajectory data processing functions for both the unmatched data and matched data. We further divide these functions and applications into basic functions and advanced applications. The basic functions include some generic fundamental trajectory processing functions including converting GPS to distances, smoothing/filtering, etc. Advanced applications refers to higher-level trajectory data analysis including mobility/safety performance measurements, trajectory data mining, etc. Besides the trajectory processing, by inheriting the features in NetworkX, MTLDP also provides some transportation network analysis functions.
MTLDP modules¶
Map and network¶
Map and network module of the MTDP (mtldp.mtlmap
) mainly focused on the
map and network related features including:
Parse the OpenStreetMap to a well-defined python object
mtldp.mtlmap.Network
;Basic OSM data cleaning function including splitting ways that traverses the intersections;
Map and network data visualization (support
matplotlib
andleaflet/mapbox
);Network analysis based on NetworkX, implement network-related algorithms (e.g. shortest path);
Provide support for transportation network modeling applications;
Note
Besides the OpenStreetMap data, the SPaT data is also directly loaded to the map data. For the network modeling and analysis, the map and network module can also process some network flow/volume data including OD flow, path flow, link flow, etc.
Trajectory data¶
The goal of this trajectory module is to enhance access and analysis of connected vehicle trajectory data. The trajectory module organizes the standard in-memory trajectory data in a three-level structure: 1) overall point table, 2) trajectories, and 3) trajectory dictionaries. The module contains a variety of features including:
Parse each level to well-defined python objects;
Store trajectory point level information in Pandas data frames in the trajectory point table and trajectory objects;
Extract trajectory level information in Pandas data frames from the trajectory dictionary object;
Easily add new point and trajectory attributes;
Seamless integration with Fast Map Matching;
Add basic map info such as intersection, link, and movement ids;
Split trajectories based on movements, links, time gaps, and distance gaps;
Organize trajectory dictionaries by map information, time of day, and other trajectory attributes