heartandsole.Activity.elevation.gain

Activity.elevation.gain(source='records')[source]

Return total elevation gain in meters.

Parameters

source (str) –

Source from which to obtain elevation gain.

  • records (default): result when the records DataFrame is passed to pandas.DataFrame.xyz.z_gain_threshold().

  • summary: gain value in the summary Series.

  • laps: sum of gain column in the laps DataFrame.

Returns

Total elevation gain according to the requested source. If the Activity does not possess the requested data source, return None.

Return type

float or None

Raises

ValueError – If source is not a valid option.

See also

pandas.DataFrame.xyz.z_gain_threshold()

A 5-meter threshold elevation gain algorithm. From the pandas-xyz package.