Skip to content

mindofbp/climberPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A basic tool to create simple graphics of climbs from FIT files that works with Python3 (>=3.8)

Inspired by the graphics you see on procyclingstats.com

Installation

climberPy is available on PyPI

$ pip install climberpy

It can also be installed from source

$ git clone [email protected]:mindofbp/climberpy.git
$ cd climberpy
$ pip install .

Usage Example

Find and visualize climbs in a FIT file.

import climberpy

points = climberpy.parsers.parse_fit(input_file)
climbs = climberpy.identifiers.ClimbIdentifier(points).identify()

for climb in climbs:
    climb.plot()

The resulting PNG file(s) will be in the directory the method is called from

Command Line Utilities

ClimberPy can be called from the command line to generate the PNG files

$ climberpy path/to/activity.fit

Overview

This is a simple library to parse FIT file activities for subsegments matching certain characteristics. Currently this is exclusive to climbs.

The library was designed with cycling in mind and the default parameters were decided as such. But this is not exclusive and will work with any FIT file activity.

What is a climb?

As is default, a climb is any subsegment that meets the following:

  1. An average gradient is greater than or equal to 3.5%
  2. Does not have a subsegment of itself which is between 0% and 3.5% gradient for more than 800 meters
  3. Does not have a subsegment of itself which is less than 0% gradient for more than 200 meters

These values are customizable by design.

Ambitions

  • Add category ratings to climbs
  • Make climbs identifiable by real world names
  • Expand the metadata of a segment to include at least GPX information about the start and end of a segment
  • Expand CLI
  • Add features for other sports (running, skiing)
  • Add more segment types
  • Export identified segments in JSON

Any and all feedback, suggestions, critiques, and criticism is welcomed.

License

This project is distributed under the terms of the MIT license. See the LICENSE file for more details.

Credits

This project uses fitdecode to handle the parsing of the FIT files and Pycairo to generate the graphics.

About

A basic tool to create simple graphics of climbs from FIT files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages