Analyzing Your Own Mobility Dataset — Part 1
By: Eric Bauer
Tags: Cycling, Mobility, Data, Learning, Data Science

Learning data science, we spend a lot of time wrangling and analyzing sample datasets. Some like the Titanic or the Iris datasets have become canonical problems for aspiring students to study. On one hand, these well-recognized datasets are great for demonstrating new concepts. On the other hand — they’re boring. By now, they are too cliché to showcase to employers, and they don’t spark burning questions that you feel compelled to answer. Luckily, you can always choose a different dataset to practice. There are many free sources of data, each with varying levels of quality and accessibility. However, why not make your own?

Dealing with your own data has several benefits. First and foremost, you can choose something you are personally invested in. This pays dividends when learning because it unlocks your curiosity. It is immensely satisfying to answer questions you personally care about — it can even be addicting! Curiosity is a key ingredient to working as a data scientist since it allows you to uncover rare insights others might miss. Practicing the curious mindset with your own data makes it easier to invoke on the job.

Another benefit is domain familiarity. Data science is not one skill. It is a blend of mathematics, software engineering and domain expertise [ref]. When you’re learning anything — not just data science — it is helpful to isolate a topic to focus on. With your own dataset, you are likely a domain expert already. Perhaps you want to analyze your spending habits to optimize your budget. Exporting your transactions from Mint is easy to do. Moreover, as the one doing the spending, you will no doubt uncover that correlation between fridge emptiness and fast food spending.

I wanted my dataset to be about biking. Enter COVID-19.

In early spring of 2020, the world transformed into pandemic mode. COVID anxiety was getting me down by mid-April. To combat the lock-down blues, I promised myself to bike at least 30 minutes every day. My car was not seeing much use while working from home, but I still needed to move around. If not mobility for practical reasons, then at least mobility for mental health.

Driving is a fun and efficient way to see new cities and destinations. Biking, however, was an entirely new way to experience mobility. It was a simple habit to start, but it unlocked hours of exploration. Sidewalks, parks and bike paths had always existed in my local community, but it took a pandemic for me to explore its extensive network and hidden gems.

Photo by Sean Benesh on Unsplash

Biking is also a great way to create your own mobility dataset. Working at 99P Labs, I am continuously analyzing data from our Developer Portal. My coworkers have done the heavy lifting to productionalize telematics data from vehicles into APIs. In cases like biking, it is a refreshing challenge to wrangle my own dataset for exploration. The volume and scope of data is also much lower — after all, my only sensor is the GPS on my phone. Using the phone app Strava, I can record each bike ride and visually check my progress. I can also download trip data from their website.

In this way, I can create my own mobility dataset from the hundreds of rides I have done since April. Using this growing dataset, I will try to answer the following questions over the next installments in this series:

1. What is my true average speed on each trip?

2. How has my riding evolved over time — especially on benchmark segments/routes?

3. How do I fix erroneous ride data or at least diagnose its cause?

4. What other trends can I find when I fuse my ride data with other datasets (weather, ride purpose, road infrastructure, traffic, etc.)?

In this series, we will explore how to access your data from Strava, parse .gpx files, enrich the data, handle privacy concerns, and more. These articles will utilize the Python Jupyter Notebook environment provided by the 99P Labs Developer Portal. The syntax and libraries will differ if using other languages like R, but the methodology should be the same. This series will assume readers have a basic familiarity with the Pandas and Numpy libraries as well as some data visualization. If you need to brush up on your data science libraries, check out the Learning section on the Developer Portal.

Next time, we will dive into this unique mobility dataset. See you then!

Disclaimer: 99P Labs neither endorses nor is endorsed by Strava. Inclusion in this article is by the author’s personal choice.