CityofToronto / bdit_traffic_prophet

Suite of algorithms for predicting average daily traffic on Toronto streets
GNU General Public License v3.0
1 stars 1 forks source link

Reshape Miovision data for ingestion into Traffic Prophet #28

Open cczhu opened 4 years ago

cczhu commented 4 years ago

Miovision intersection turning-movement count data can help resolve the lack of permanent count locations in downtown Toronto. To use Miovision data, ATR counts need to be associated with centreline geo_id and direction bin, with a format identical to the current one for prj_volume.uoft_centreline_volumes_output:

Field Name Data Type Description Example
centreline_id integer Centreline segment associated with volume count 117
dir_bin integer Direction of traffic; 1 for the first direction, -1 for the second (just 1 if one-way) 1
count_bin timestamp Timebin of the count, in 15-minute increments (starting at 00:00 for each day) 2001-03-27 00:00:00
volume integer Number of vehicles 1

@radumas mentions there is already a relationship between centreline_intersection and centreline via ref and nref nodes that can be used for mapping to the centreline.

Following #27, we would ideally replace or enhance dir_bin with something that allowed for mapping of counts to a directional street network, but could be converted back to a dir_bin if needed. This is beyond the scope of this issue, but completing it will help inform us of how to resolve #27.

The 15-minute regular increments are a much finer resolution than currently being used in TEPS, but may become necessary in the far future when we explore hourly variation with Gaussian process regression. If 15-minute bins aren't available, 1 day is the largest bin size that is still useful to Traffic Prophet.

We'll also need to determine the date ranges over which we have valid, reliable data. @aharpalaniTO is the best resource for this.