runpandas.read_strava¶
-
runpandas.
read_strava
(activity_id, access_token, refresh_token=None, client_id=None, client_secret=None, to_df=False, **kwargs)¶ This method loads the activity data from Strava into a Pandas DataFrame or runpandas Activity. Column names are translated to runpandas terminology (e.g. “heartrate” > “heart_rate”). Datetimes indexes are replaced by time offsets. All NaN rows are removed.
- Attention: Two API requests are made to the Strava webservice: 1 to
retrieve activity metadata, 1 to retrieve the raw data (“streams”).
- Parameters
activity_id (str, The id of the activity) –
access_token (str, The Strava access token) –
refresh_token (str, The Strava refresh token, optional) –
client_id (int, The Strava client id used for token refresh, optional) –
client_secret (str, The strava client secret used for token refresh, optional) –
to_df (bool, optional) – Return a obj:runpandas.Activity if to_df=True, otherwise a
pandas.DataFrame
will be returned. Defaults to False.**kwargs –
args to be passed to the read_strava (Keyword) –
- Returns
Return a obj – a
pandas.DataFrame
will be returned.- Return type
runpandas.Activity if to_df=True, otherwise