stravadata is an R package providing convenient access to my Strava activity data. The package contains the following data frames.
activities
: aggregate activity features.streams
: disaggregate activity streams.best_efforts
: activity best efforts.
I obtain these data via the Strava API using the process described here.
See my blog post for examples.
The public version of this package does not include any data. Users need to add their own. The steps for doing so are as follows.
- Clone or fork the repo.
- Log in to Strava and create an API application on the API settings page. (I put "localhost" in the "Authorization Callback Domain" field.)
- Create
credentials.yaml
in the repo's top-level directory, and include the API application's client ID and secret as follows:
client_id: xxxxx
secret: xxxxx
- Run
make data
in a Terminal window at the repo's top-level directory. (This may take some time for users with many Strava activities or a slow internet connection.)
After creating the data, run make package
in the same Terminal window or devtools::install()
in a fresh stravadata.Rproj
instance to install the package.
Run
install.packages(c('tidyverse', 'vroom'))
at the R console to install the packages necessary for adding data.
MIT