The NYC Department of Transportation recently published 15-minute interval bicycle counts on the city’s Open Data portal. We took a quick look at what’s in the dataset and produced a simple visual comparing daily bicycle counts for three of the East River bridges.

The Data

The data are published by the NYC Department of Transportation as tabular data under the name “Bicycle Counts”. The table includes only four columns: the id of the sensor, the timestamp for a 15-minute interval, the counts for that interval, and a status column. (According to the data dictionary, statuses include “raw”, “excluded”, “deleted”, “modified”, and “certified”.)

The NYC Bicycle Counts dataset contains counts at 15-minute intervals for key locations around the city.

How do we know which id is which? A complementary dataset, “Bicycle Counters”, includes the names and id numbers, along with spatial data (latitude and longitude points) for each. Plotting them on a map gives a quick overview of where we are counting bikes in NYC:

Our analysis below looks at only the three bridges between Manhattan and Brooklyn, but there are many other locations to analyze if you’re interested.

Analyzing The Brooklyn/Manhattan East River Bridges

I conducted my analysis using R Studio Cloud and shared the project publicly if you want to follow along with the code: https://rstudio.cloud/project/959169

The first task was to explore the time ranges available in the raw dataset. I determined the earliest and latest timestamps for each counter id, joining with the locations dataset to get a human-friendly name.

This truncated table shows the date/time ranges available in the raw data for each counter location (only the first 14 rows are shown)

From here, I wanted a solid year of data and found that the three bridges that span the East River between Manhattan and Brooklyn all have data available for the entire year of 2019.

Aggregating the counts by day, we can generate a bar chart for each bridge, along with some descriptive stats for the year: Total Bikes, Weekday Average, Weekend Daily Average, and busiest single day. The results are included in this graphic: