in Other

DriveThirteen.ca

Article Image

A fun website I made, and some random trivia I learned along the way

Driving to Every Province in Canada

I made a website called drivethirteen.ca that calculates how long it would take to drive from one location in Canada to every other. This idea started when I decided to put bumper stickers on my car for every province I have been to. I wondered what it would take to collect every sticker, so I made a tool to calculate exactly that.

I decided the best way to go about this problem would be to calculate every road that crosses a provincial / territorial border, an interesting visualization in its own right. I got the road data from OpenStreetMap, and the provincial border data from Canadian census data. I created a Python script that looked for locations where road segments got very close to provincial borders. This created a few false positives, and missed some crossings, namely bridges and ferries. After tweaking the algorithm and some manual updating, I was happy with the data set -- a CSV file with roughly 1300 rows that list the two regions the crossing point straddles, and its lat and long.

Calculating your location to every province would mean finding the shortest path from your location to any one of these points -- I hope it is evident that the fastest way to a new province will be via one of these crossings. After briefly going down the road of implementing my own algorithm to do this, I decided not to reïnvent the wheel and use Project OSRM to do the pathing algorithm. What I ended up with was a back end that gives OSRM the starting location and end candidates, and OSRM calculates the shortest path. With this I was able to calculate how long it would take to drive from Halifax to every other province and territory -- or in other words, what I'd be in for if I ever wanted to put every provincial flag as a bumper sticker on my car.

The Answer

On average it takes 39h 14m to reach any one province, and assuming I went to each province one at a time, all trips total 509h 58m. This is both an overestimate in some regards and an underestimate in another. Most people with the goal of getting to every province would not drive to them one at a time -- that would introduce so much backtracking and is inefficient. For instance, if I were to drive coast-to-coast to British Columbia from Halifax, I would cross Alberta, Saskatchewan, Manitoba, Ontario, Quebec, and New Brunswick on my way there.

On the other hand, most people don't plan road trips to provincial borders; they go to cities or national parks that are usually not at these crossing points. I think people do a bit of both -- maybe road trips to single nearby provinces or territories -- but the only way they ever reach the farthest ones is on long road trips across the country, or when moving.

Seeing this data, two questions immediately came to mind:

  • Where is the best place to complete this challenge, assuming you drive to each province one at a time?
  • Where is the worst?

Take your bets now. I started this project in part due to thinking Halifax would be one of the worst -- it's so far east that driving to anything west of Ontario is a multi-day drive. My guess for the best would be somewhere more central, and my guess for the worst would be Tuktoyaktuk, NWT, all the way on the Arctic Ocean.

The Results

Best

Kenora, Ontario Average: 26h 23m All trips total: 342h 53m

Worst

Nain (Nunajnguk), Newfoundland and Labrador Average: 81h 34m All trips total: 1060h 19m

Tuk was the 3rd worst, for those keeping score. Halifax ranked in the second worst quartile of connected Canadian settlements with over 1000 people. Kenora was not suprising, its geographically in the middle of Canada, close to the Ontario - Manitoba border. Nain was a bit surprising at first, but made sense once seeing that those driving to other provinces first need to board a seasonal car ferry that takes many hops before arriving at Goose Bay, Labrador, and then continuing on their journey.

I hope you have fun messing with the website. I found it very interesting and enjoyable as a way to visualize how vast Canada is. I also included a mode with seven additional regions, if you want more bumper stickers to log your travels.

Gallery

Gallery image 1 Gallery image 2 Gallery image 3 Gallery image 4