EL-BID / UrbanTrips

An open-source library to process smart card payment data, infer destination and get meaningful KPI
https://el-bid.github.io/UrbanTrips/
Other
24 stars 2 forks source link

New module to compute travel time and comercial speed #141

Closed alephcero closed 1 day ago

alephcero commented 6 months ago

Main objective

Requirements

Steps

Data schema gps_commercial_speed table: This table holds data by each GPS point from the previous point

- gps_id
- delta_time_hr
- distance_km_h3
- distance_km_graph
- edges_ids

edges_commercial_speed table: This table holds data by each edge or street segment. Data is stored by each line, branch, direction and hour. How many GPS segments where use to compute that speed is stored in the weights attribute in order to compute weighted averages at any aggregated level (branch, line, segment). Aggregated stats will be in the same table with day = 'weekday' or hour = 'all day'.

- edge_id
- day
- hour
- line_id
- branch_id
- direction
- commercial_speed_h3_avg
- commercial_speed_h3_std
- commercial_speed_g_avg
- commercial_speed_g_std
- weights

line_commercial_speed table This table holds aggregated commercial speed stats by line, computed from the gps_commercial_speed table at a service level.

- line_id
- branch_id
- direction
- day
- hour
- commercial_speed_h3_avg
- commercial_speed_h3_std
- commercial_speed_g_avg
- commercial_speed_g_std
- weights

travel_time table

- leg_id
- gps_id_o
- gps_id_d
- travel_time_min
- distance_km_h3
- distance_km_graph
alephcero commented 1 day ago

Closed by https://github.com/EL-BID/UrbanTrips/commit/73470a5cc51181b047f961ff9df52e4eebd9a32b