Activity
Constructor
|
Represents a running activity. |
Attributes and underlying data
The records (time series) of the Activity. |
|
The lap data of the Activity. |
|
The summary data of the Activity. |
|
Unique rows in the records DataFrame. |
|
Return whether the records DataFrame contains GPS coordinates. |
|
GPS coordinate records as a list of [lat, lon] lists. |
|
GPS coordinates as a list of [lon, lat] lists. |
Methods
|
Return whether all given streams exist in the records DataFrame. |
IO / conversion
|
Construct an Activity from a .fit file. |
|
Construct an Activity from a .tcx file. |
|
Construct an Activity from a .gpx file. |
|
Construct an Activity from a .csv file. |
Field accessors
heartandsole provides field-specific methods under various accessors.
These are separate namespaces within Activity that only apply
to specific data types. Each accessor works with Activity data that bears
its name:
In the
recordsDataFrame, column labels must exactly match the corresponding accessor name.In the
lapsDataFrame, column labels should be of the form <accessor_name>_<stat_name> or <stat_name>_<accessor_name>.In the
summarySeries, row labels should be of the form <accessor_name>_<stat_name> or <stat_name>_<accessor_name>.
Data Type |
Accessor |
|---|---|
Datetime |
|
Time in Seconds |
|
GPS Coordinates |
|
Distance |
|
Speed |
|
Elevation |
|
Decimal Grade |
|
Heart Rate |
|
Step Cadence |
Common field accessor methods/properties
All field accessors have the following properties at Activity.<field>.<property>
The column of the record DataFrame for this field. |
|
A subset of the laps DataFrame for the field. |
|
A subset of the summary Series for the field. |
Timestamp field accessor
Datetime-specific methods and attributes are provided under the
Activity.timestamp accessor.
|
Return start time as a datetime. |
|
Return end time as a datetime. |
|
Return elapsed time as a timedelta. |
|
Ensure all recognized timestamp data is timezone-aware. |
Time field accessor
Integer time-specific methods and attributes are provided under the
Activity.time accessor.
|
Time records calculated from timestamp records. |
|
Return elapsed time in seconds. |
|
Return total time, in seconds, when the device was active. |
GPS coordinate field accessors
GPS coordinate-specific methods and attributes are provided under the
Activity.lat and Activity.lon accessors.
The midpoint of the coordinate stream's extents. |
|
The midpoint of the coordinate stream's extents. |
Distance field accessor
Cumulative distance-specific methods and attributes are provided under the
Activity.distance accessor.
|
Return total distance in meters. |
Cumulative distance records calculated from GPS coordinate records. |
Speed field accessor
Speed-specific methods and attributes are provided under the
Activity.speed accessor.
Elevation field accessor
Elevation-specific methods and attributes are provided under the
Activity.elevation accessor.
|
Return total elevation gain in meters. |
|
Return total elevation loss in meters. |
Grade field accessor
Decimal grade-specific methods and attributes are provided under the
Activity.grade accessor.
Heart rate field accessor
Heart rate-specific methods and attributes are provided under the
Activity.heartrate accessor.
Cadence field accessor
Cadence-specific methods and attributes are provided under the
Activity.cadence accessor.