Package 'pelotonR'

Title: PelotonR Pulls Data From The Peloton Apis
Description: pelotonR pulls data from the Peloton APIs.
Authors: Laura Ellis [aut, cre]
Maintainer: Laura Ellis <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2025-02-27 05:18:32 UTC
Source: https://github.com/ats/pelotonR

Help Index


Add basic augmented fields to Peloton data frame

Description

This function augments a data frame obtained from get_workouts_df with some time and duration information.

Usage

augment_peloton_df(df, tzone = "America/Los_Angeles")

Arguments

df

Peloton data frame to process

tzone

Name of time zone to convert the original UTC time from. Defaults to "America/Los_Angeles"

Examples

augment_peloton_df()

Authenticate with the Peloton API

Description

This function allows you to authenticate with the Peloton API to pull your details and workout stats. In this function you are able to pass in your 'username' and 'password'. If you pass in no value, the system will prompt you for a user name and password.

Usage

authenticate(username, password)

Arguments

username

Your Peloton screen name.

password

Your Peloton password.

Examples

authenticate()
authenticate("example user name", "example password")

Get DataFrame with a Subset of Ride Information

Description

This function returns a data frame with a subset of information related to a particular ride.

Usage

get_basic_ride_info_df(ride_id)

Arguments

ride_id

The id of the ride that you are pulling information for.

Examples

get_basic_ride_info_df("55214456a1984c5885a087021e3f67b7")

Get Data Frame with Instructors

Description

This function returns a data frame with all instructor information.

Usage

get_instructors_df()

Examples

get_instructors_df()

Get Live Rides and Details

Description

This function returns a data frame with all current live rides as well as the joined ride and instructor data for each ride.

Usage

get_live_ride_and_details_df()

Examples

get_live_ride_and_details_df()

Get Current Peloton Live Rides

Description

This function returns a data frame with all of the current live rides.

Usage

get_live_rides_df()

Examples

get_live_rides_df()

Get Metadata Mapping For Peloton Categories

Description

This function returns a data frame of metadata available on Peloton for a particular category type.

Usage

get_metadata_mapping_df(type)

Arguments

type

The type of metadata to pull. Available data types include: 'instructors', 'class_types', 'equipment', 'fitness_disciplines', device_type_display_names', 'content_focus_labels',

Examples

get_metadata_mapping_df("fitness_disciplines")
get_metadata_mapping_df("equipment")

Get Full User Stats In a List

Description

This function will gather all stats for the current authenticated user and return the results in a list.

Usage

get_my_stats_list()

Examples

get_my_stats_list()

Get Workout Stats Data Frame

Description

This function will gather the workout counts by category for the current authenticated user.

Usage

get_my_workout_stats_df()

Examples

get_my_workout_stats_df()

Get Full Set of Ride Information In a List

Description

This function returns a list with all information related to a particular ride.

Usage

get_ride_info_list(ride_id)

Arguments

ride_id

The id of the ride that you are pulling information for.

Examples

get_ride_info_list("55214456a1984c5885a087021e3f67b7")

Get Workout and Instructor Details in a DataFrame

Description

This function will gather all individual workouts and all related instructor data for a user and return it in a data frame. If a user id is not passed into the function, it will return the current users workouts.

Usage

get_workouts_and_instructors_df(user_id, pages = 0)

Arguments

user_id

Your Peloton user id.

pages

Integer number of pages to retrieve from API (defaults to 0 for no limit)

Examples

get_workouts_and_instructors_df()

Get Workout Details in a DataFrame

Description

This function will gather all individual workouts for a specified user and return the results in a data frame. If a user id is not passed into the function, it will return the current users workouts.

Usage

get_workouts_df(user_id, pages = 0)

Arguments

user_id

Peloton user id.

pages

Integer number of pages to retrieve from API (defaults to 0, which specifies no limit)

Examples

get_workouts_df()