Using the Montréal Open Traffic and Intersection Data
Posted: December 19, 2011 Filed under: Uncategorized | Tags: counts, databases, intersections, montreal, open data, traffic, transportation Leave a comment »The City of Montréal finally adopted an open data policy in October and liberated more interesting transportation datasets recently about traffic counts and intersections. Despite some format issues (unnecessarily added mixed ‘.’ and ‘,’ for integer numbers), the data is interesting and timely. The format is csv, but it is actually more interesting in an actual database. I just imported the data in an SQLite, adding two boolean to the intersection table if the intersection has pedestrian signals or sound devices. The fields are mostly unchanged from the original csv files. The database file is available here. Please respect the license under which the data is made available.
Obtaining the maximum vehicle flow for each intersection can then be done with the following SQL statement:
select int_no, date, max(ND+NTD+NG+ED+ETD+EG+SD+STD+SG+OD+OTD+OG) as maxVehicleCount from comptages group by idDemande, date
All comments welcome.