VMPY - Performance Velo Metrics Toolbox
VMPY is a toolbox for evaluating typical Cycling Performance Metrics from the ride data e.g. power, heart-rate, velocity, gradient, cadence streams.
All functions within the package do follow the convention, where input/output formats are either traditional Python built-in data structures or are the nd-arrays. This design choice favors easy integration into other projects, e.g. velometria.com
To help you getting started VMPY also provides a very thin wrapper around the Strava API.
Installation
Official release:
pip install vmpy
The bleeding edge work in progress:
pip install git+git://github.com/sladkovm/vmpy.git@development
Scope
The VMPY package provides the following functionality:
streams.py: Streams shape preserving calculations e.g. masking, filtering, zone conversions
metrics.py: Cycling Performance Metrics
strava.py: Python wrapper around the Strava API v3 for fetching Athletes, Activities and Stream data
Usage
>>> from vmpy import strava >>> stream = strava.retrieve_streams(activity_id=1282167861, access_token=STRAVA_ACCESS_TOKEN)
>>> from vmpy import streams >>> power_zones = streams.compute_zones(stream['watts'], ftp=270) >>> hr_zones = streams.compute_zones(stream['heartrate'], lthr=160) >>> watts_3sec = streams.rolling_mean(stream['watts'], window=3, mask=stream['moving']) >>> gradient_wo_outliers = streams.median_filter(stream['grade_smooth'], window=31, threshold=1)
>>> from vmpy import metrics >>> normalizes_power = metrics.normalized_power(stream['watts']) >>> time_in_power_zones = metrics.time_in_zones(stream['watts'], ftp=260)
Quick Start
Register Strava App
In order to be able to use Strava API the user App must be registered at the linkhttp://www.strava.com/developers:
Application Name: ex.: My Awesome App
Website: ex.: myawesomeapp.com (can be anything, even your FB or Strava page will do)
Application Description ex.: Just fooling around with some Strava data
Authorization Callback Domain 127.0.0.1 (unless you are building a serious App)
Access Token
The Access Token will be found at the users profile page It will look like this: 83ebeabdec09f6670863766f792ead24d61fe3f9
Access Token must be passed explicitly as an argument to the functions found in strava.py module
Contribution guidelines
This project is absolutely open for contributions. No strong guidelines yet, except for:
Don’t push on master branch
Test
Write docstrings in NumPy style
Useful links
Strava API v3 documentation - https://strava.github.io/api/
Metadata
Release files for vmpy 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vmpy-0.1.6.tar.gz | 9.3 kB | Without provenance | Details for vmpy-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vmpy-0.1.6-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for vmpy-0.1.6-py2.py3-none-any.whl |
Total release size: 21.2 kB
Release files / vmpy-0.1.6.tar.gz
| Download URL | vmpy-0.1.6.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6c725ca5c26564bd7d4ac5d9eb2e3ddfd3fea46147129334f07619980a2fbda1
|
|
BLAKE2b-256 checksum How to use checksums |
b64df2a8becac4bb113eab992775ab9829d509a903f49a7a0651401d35ff7195
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / vmpy-0.1.6-py2.py3-none-any.whl
| Download URL | vmpy-0.1.6-py2.py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
d1d6e4e18bd961fdda47b99c73005b010a40244953462edf82042549984d9174
|
|
BLAKE2b-256 checksum How to use checksums |
2861929b10072054839e31e28abf21c898fe1d5cca244c219f6a8f829ac970aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for vmpy 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.