difference-in-difference plots regarding a new bike lane


Below are a few exploratory difference-in-difference line plots generated from a survey which questioned pedestrians about their travel and shopping behaviour before and after the implementation of a bike lane in central Toronto (Bloor Street). Plots were built using ggplot2 and Rmarkdown sometime during the summer of 2017 as part of preliminary descriptive analysis for a report on the economic impacts of the bike lane.

Click here for a detailed research report regarding this project

The plots were generated using ggplot2 and Rmarkdown. The p-value pertains to a statistical test that compares whether the changes in percents are significantly different between the two sites - Jeff Allen



Survey Summary

n table

  Bloor (case) Danforth (control) Total
pre bike lane 842 173 1015
post bike lane 1577 412 1989
total 2419 585 3004


Mode Share of Visitors


= Bloor        = Danforth


percent of visitors who arrive by bike                                              percent of visitors who arrive by car

DiD p = 0.073                                                                               DiD p = 0.402


percent of visitors who arrive by transit                                              percent of visitors who arrive by walking

DiD p = 0.186                                                                               DiD p = 0.469



Cycling Frequency


= Bloor        = Danforth

percent of visitors who cycle to the street at least one day per week

DiD p = 0.001



Cycling Safety


= Bloor        = Danforth

percent of visitors who feel safe biking on the street

DiD p = 0.000



Visit Frequency


= Bloor        = Danforth

Percent who visit 15 or more days per month

DiD p = 0.335



Monthly Spending:


= Bloor        = Danforth


percent of all visitors who spend more than $100 per month

DiD p = 0.399


Subseting by mode:

   percent of cyclists who spend more than $100 per month:            percent of drivers who spend more than $100 per month:

DiD p = 0.198                                                                               DiD p = 0.415


   percent of transit riders who spend more than $100 per month:         percent of walkers who spend more than $100 per month:

DiD p = 0.161                                                                               DiD p = 0.354