Using the Montréal Open Traffic and Intersection Data

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.

About these ads


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 106 other followers