Little Miss Data

View Original

My pelotonR Package Debut!

Today marks the debut of my first open source package: pelotonR! I created the pelotonR package because I love my Peloton, and I love data. Naturally I wanted to marry the two worlds.

When I first set out to get my hands my Peloton data, it proved a little trickier than I had hoped. The APIs are unsupported and only partially documented by the community, the results are in json format and the calls require paging. After I worked through all the hurdles and was able to graph my data, I thought it would be a good idea to make this data accessible to others.

The package offers a set of easy to use functions which allow the user to:

  • Pull general Peloton data in a variety of formats

  • Authenticate with the Peloton API

  • Pull user-specific data in a variety of formats when authenticated.

  • Gather full data sets in one function call without having to handle paged API calls.

  • Gather joined data sets in one function call.

Tutorial

I have written a full tutorial showing how to use the package on my github. In the tutorial I show you how to pull oodles of Peloton data.

The Data: The data sets include: Peloton metadata, live ride data, instructor data, user workout stats and user workout history joined with all other data sets

The Visualizations: In the tutorial, I also get you started with graphing the data in R. With so many amazing R data visualization packages, the graphing possibilities are endless.

Great Minds Think Alike

At the time of writing this blog, I realize there are a few other Peloton R packages out there. I haven’t had the chance to check them out yet but if you’re looking to round the bases on R peloton packages, I encourage you to check give them a try. Particularly they both seem to have some interesting performance data!

Thank you

Thank you for reading about my new package to gather Peloton data through R. Please remember that the full tutorial is available at https://lgellis.github.io/pelotonR/.

You can also check out two great tutorials using the package

Please drop me a line with your feedback!