CityofToronto / bdit_data-sources

Data sources used by the Big Data Innovation Team
https://github.com/orgs/CityofToronto/teams/bigdatainnovationteam
GNU General Public License v3.0
39 stars 8 forks source link

Monitor special TTC-Miovision configurations #960

Closed gabrielwol closed 3 months ago

gabrielwol commented 5 months ago

Special vehicle approach boxes were drawn at 3 intersections (Lakeshore/Spadina, Yonge/St Clair, Cherry/Eastern) to monitor streetcar ROW intrusion. We will need to monitor how the data shows up and possibly use a special script to pull those movements.

gabrielwol commented 5 months ago

@dmcelro, @ChrisCodesCities Here are initial results from the special Miovision configurations. They are showing up as "Entrances" (to date only used for bikes, so we have that movement as "bicycle entrance"). When I look directly at the API result they are labelled as "UNDEFINED" exit leg but vendor assured me these are the right movements that we configured yesterday and there's no way to see the special label we assigned. I feel like we can't trust these volumes unless we have someone QC the videos. Thoughts?

"intersection_name" "classification_uid" "classification" "leg" "movement_uid" "movement_pretty_name" "sum"
"Eastern Avenue and Cherry Street" 1 "Light" "N" 7 "Bicycle Entrance" 17
"Eastern Avenue and Cherry Street" 4 "SingleUnitTruck" "S" 7 "Bicycle Entrance" 1
"Eastern Avenue and Cherry Street" 9 "MotorizedVehicle" "N" 7 "Bicycle Entrance" 21
"Eastern Avenue and Cherry Street" 9 "MotorizedVehicle" "S" 7 "Bicycle Entrance" 22
"Lake Shore Boulevard West and Spadina Avenue" 1 "Light" "N" 7 "Bicycle Entrance" 11
"Lake Shore Boulevard West and Spadina Avenue" 1 "Light" "S" 7 "Bicycle Entrance" 1
"Lake Shore Boulevard West and Spadina Avenue" 4 "SingleUnitTruck" "N" 7 "Bicycle Entrance" 17
"Lake Shore Boulevard West and Spadina Avenue" 4 "SingleUnitTruck" "S" 7 "Bicycle Entrance" 1
"Lake Shore Boulevard West and Spadina Avenue" 5 "ArticulatedTruck" "N" 7 "Bicycle Entrance" 14
"Lake Shore Boulevard West and Spadina Avenue" 9 "MotorizedVehicle" "N" 7 "Bicycle Entrance" 1
"Lake Shore Boulevard West and Spadina Avenue" 9 "MotorizedVehicle" "S" 7 "Bicycle Entrance" 13
"Yonge Street and Saint Clair Avenue West" 1 "Light" "E" 7 "Bicycle Entrance" 21
"Yonge Street and Saint Clair Avenue West" 1 "Light" "W" 7 "Bicycle Entrance" 20
"Yonge Street and Saint Clair Avenue West" 4 "SingleUnitTruck" "E" 7 "Bicycle Entrance" 2
"Yonge Street and Saint Clair Avenue West" 4 "SingleUnitTruck" "W" 7 "Bicycle Entrance" 3
"Yonge Street and Saint Clair Avenue West" 5 "ArticulatedTruck" "W" 7 "Bicycle Entrance" 2

query:

SELECT api_name AS intersection_name,
    classification_uid, classification, leg, movement_uid, movement_pretty_name, SUM(volume)
FROM miovision_api.volumes
JOIN miovision_api.classifications USING (classification_uid)
JOIN miovision_api.movements USING (movement_uid)
JOIN miovision_api.intersections USING (intersection_uid)
WHERE datetime_bin >= '2024-05-23' AND datetime_bin < '2024-05-24' AND intersection_uid IN (77, 79, 91) AND movement_uid IN (7, 8)
    AND classification_uid <> 10 --not bikes
GROUP BY 1, 2, 3, 4, 5, 6
ORDER BY 1, 2, 3, 4, 5, 6
gabrielwol commented 3 months ago

With the help of Miovision we configured special detection zones in the streetcar ROW and set them to only pick up (non bus/streetcar) vehicles.