Introduction

As a major cultural, commercial, and transportation hub with a population of over 1.7 million people, Montreal boasts diverse neighborhoods and a vibrant arts and cultural scene. With an extensive network of cycling infrastructure, the city is also ideal for bike-sharing programs. In this presentation, I will explore bike-sharing and cycling infrastructure in Montreal and propose recommendations to enhance bike-sharing accessibility.

Hypothesis

Based on my analysis of bike-sharing stations and cycling infrastructure in Montreal, I hypothesize that the low density of bike-sharing stations leads to the underutilization of cycling as a mode of transportation, contributing to increased air pollution in the city.

Data Collection

Define the bounding box for Montreal

```{rmontreal_bbox <- c(-73.9860, 45.4121, -73.4730, 45.7006)

Download bike-sharing stations and cycling infrastructure data for Montreal

```{rbike_sharing_query <- opq(bbox = montreal_bbox) %>% add_osm_feature(key = “amenity”, value = “bicycle_rental”) %>% osmdata_sf()

```{rcycling_infra_query <- opq(bbox = montreal_bbox) %>% add_osm_feature(key = “highway”, value = “cycleway”) %>% osmdata_sf()

Count the total number of bike-sharing stations

```{rtotal_stations <- nrow(bike_sharing_query$osm_points)

Calculate the total length of cycling infrastructure

```{rtotal_infra_length <- sum(st_length(cycling_infra_query$osm_lines), na.rm = TRUE)

Create a data frame with the calculated values

```{rmontreal_data <- data.frame( category = c(“Bike-Sharing Stations”, “Cycling Infrastructure Length (km)”), value = c(total_stations, total_infra_length / 1000) )

Current State of Bike-Sharing Stations and Cycling Infrastructure

The bar chart indicates a relatively low density of bike-sharing stations compared to the length of cycling infrastructure. This information is crucial for understanding the current accessibility of bike-sharing programs in Montreal and can guide future recommendations for network improvement.

Visualize the data using a bar chart

```{rbar_plot <- ggplot(montreal_data, aes(x = category, y = value)) + geom_bar(stat = “identity”, fill = “steelblue”) + theme_minimal() + labs(title = “Montreal Bike-Sharing Stations and Cycling Infrastructure”, x = “Category”, y = “Value”)

Calculate the ratio of bike-sharing stations per 0.5 km of cycling infrastructure

```{rstations_per_half_km <- total_stations / (total_infra_length / 2)

Calculate the ratio of bike-sharing stations per linear km of cycling infrastructure

```{rstations_per_km <- total_stations / (total_infra_length / 1000)

Create a leaflet map showing the bike-sharing stations

```{rbike_sharing_map <- leaflet(bike_sharing_query$osm_points) %>% addTiles() %>% addMarkers(clusterOptions = markerClusterOptions())

Display the bar chart and the leaflet map

{rprint(bar_plot){rprint(bike_sharing_map)

Bike-Sharing Impact

Implementing bike-sharing programs in cities can bring numerous benefits, including generating economic activity and promoting sustainable transportation. By increasing the availability of bike-sharing stations in Montreal, the city can work towards a more sustainable future and positively impact the health and wellbeing of its citizens.