Bike traffic throughout the week

In 2012, the City of Seattle installed meters to count bicycles crossing the Fremont Bridge, a major thoroughfare for cyclists commuting to downtown Seattle from the northern neighborhoods.

A 2D NumPy array called bike_traffic is loaded, which contains the average number of cyclists that were counted crossing the Fremont Bridge during each hour of the day for each day of the week from Oct 2012 to mid-June 2018.

  • Each column is a day of the week, starting on Monday.
  • Each row is an hour of the day, beginning with the 12am-1am hour.

Don't forget that indexing in Python is a bit different from MATLAB:

  • Python indexing starts at 0, not 1
  • In Python, you can use negative indices: -1 is equivalent to MATLAB's end

This exercise is part of the course

Python for MATLAB Users

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Print the shape of bike traffic
print(bike_traffic.____)