CityofToronto / bdit_volumes

Traffic Volumes Modelling Project
7 stars 6 forks source link

Count Type Mismatches #8

Closed aharpalaniTO closed 7 years ago

aharpalaniTO commented 7 years ago

There are 45 artery codes which are identified as 24 HOUR counts in FLOW (traffic.arterydata.count_type) but are identified as TMC counts in our tables (prj_volume.artery_tcl.artery_type). Run below SQL:

SELECT DISTINCT A.arterycode, B.street1, B.street2, B.count_type
FROM prj_volume.artery_tcl A
INNER JOIN traffic.arterydata B USING (arterycode)
WHERE artery_type = 2 AND count_type NOT IN ('R','P')
ORDER BY A.arterycode
sunnyqywang commented 7 years ago

The problem is solved by assigning artery_type based on count_type in table arterydata instead of the existence of a tnode_id.