All my data science/programming blog posts will now live at notes.mikejarrett.ca. This will be a site powered by Nikola instead of WordPress due to better support for Jupyter notebooks as blog posts.
City staff recently reported to Council about the status of the Mobi bikeshare system. You can see the slideshow for yourself here. Results generally look positive for the future of bikeshare in Vancouver, but a comment one slide stuck out for me: “Temperature influences ridership more than precipitation”.
Is this really true? In my experience, biking on a cool, dry day is much more enjoyable than biking on a warm rainy day. There was no clue in the council report on how they came to this conclusion, but I suspect they used the eyeball test. But the cooler months in Vancouver are also the rainy months, so a more careful analysis is needed. I’d recently seen an example in Jake Vanderplas’ Python Data Science Handbook that looked at the factors influencing bike ridership in Seattle, so I decided to do a similar thing for Vancouver.
I finally got around to learning how to map data on to maps with Cartopy, so here’s some quick maps of Mobi bikeshare station activity.
First, an animation of station activity during a random summer day. The red-blue spectrum represents whether more bikes were taken or returned at a given station, and the brightness represents total station activity during each hour. I could take the time resolution lower than an hour, but I doubt the data is very meaningful at that level.
Six months ago I came across Jake VanderPlas’ blog post examining Seattle bike commuting habits through bike trip data. I wanted to try to recreate it for Vancouver, but the city doesn’t publish detailed bike trip data, just monthly numbers. For plan B, I looked into Mobi bike share data. But still no published data! Luckily, Mobi does publish an API with the number of bike at each station. It doesn’t give trip information, but it’s a start.
Panda’s Dataframe.plot() function is handy, but sometimes I run up against edge cases and spend too much time trying to fix them.
On one case recently, I wanted to overlay a line plot on top of a bar plot. Easy, right? Not when your dataframe has a datetime axis. The bar plot and and line plot functions format the x-axis date labels differently, and cause chaos when you try to use them on the same axes. None of the usual tick label formatting methods got me back anything useable.
In my googling, I’ve found a few solutions to this issue. None are perfect for what I was hoping to do (have Django and MPL work together to produce a nice interactive figure) but I did come across some interesting tools.
In 2015, Christa and I decided we wanted to do a hike in the Rockies. Christa’s parents had given me the Canadian Rockies Trail Guide, so a flipped through it looking for a good one. I somehow settled on the Brazeau Lake Loop, mostly because I liked that it was a loop, I liked the distances, and the book sold it well, so off we went.
• 81 km loop, we took 4 nights
• Elevation gain/loss: 1878 m
• Maximum elevation: 2470 m
After 6 months with my new Brodie Argus touring bike and only a couple trips out of the city it was time to take it on a real test: Bike up the sunshine coast, cross over to the island at Powell River, and ride down to Nanaimo and back home. My first solo multi-day bike trip!
I chose to do the Sunshine Coast loop over a loop of the southern end of Vancouver Island mainly because as it’s my first real attempt at bike touring I’d rather stay a bit closer to civilization. I picked out three camping targets at Smuggler Cove provincial park, Powell River and Parksville but didn’t make reservations anywhere.
In anticipation of a busy summer of hiking and biking, I decided it was time for a spring shakedown so recruited a couple friends to bike out to Alouette Lake in Golden Ears Provincial Park on the weekend of April 18th for an overnight trip.