sport-activities-features


Namesport-activities-features JSON
Version 0.5.0 PyPI version JSON
download
home_pagehttps://github.com/firefly-cpp/sport-activities-features
SummaryA minimalistic toolbox for extracting features from sport activity files
upload_time2024-12-18 18:23:05
maintainerNone
docs_urlNone
authorIztok Fister Jr.
requires_python<4.0.0,>=3.9.0
licenseMIT
keywords computational intelligence cycling data mining datasets gpx optimization sport activities tcx
VCS
bugtrack_url
requirements matplotlib geopy overpy geotiler numpy tcxreader pandas niaaml tcx2gpx gpxpy ruff pytest
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <img width="200" src="https://raw.githubusercontent.com/firefly-cpp/sport-activities-features/main/.github/logo/sport_activities.png">
</p>

<h1 align="center">
sport-activities-features --- A minimalistic toolbox for extracting features from sports activity files written in Python
</h1>

<p align="center">
  <img alt="PyPI Version" src="https://img.shields.io/pypi/v/sport-activities-features.svg" href="https://pypi.python.org/pypi/sport-activities-features">
  <img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/sport-activities-features.svg">
  <img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/sport-activities-features.svg">
  <img alt="Fedora package" src="https://img.shields.io/fedora/v/python3-sport-activities-features?color=blue&label=Fedora%20Linux&logo=fedora" href="https://src.fedoraproject.org/rpms/python-sport-activities-features">
  <img alt="AUR package" src="https://img.shields.io/aur/version/python-sport-activities-features?color=blue&label=Arch%20Linux&logo=arch-linux" href="https://aur.archlinux.org/packages/python-sport-activities-features">
  <img alt="Packaging status" src="https://repology.org/badge/tiny-repos/python:sport-activities-features.svg" href="https://repology.org/project/python:sport-activities-features/versions">
  <img alt="Downloads" src="https://pepy.tech/badge/sport-activities-features" href="https://pepy.tech/project/sport-activities-features">
  <img alt="GitHub license" src="https://img.shields.io/github/license/firefly-cpp/sport-activities-features.svg" href="https://github.com/firefly-cpp/sport-activities-features/blob/master/LICENSE">
  <img alt="Documentation Status" src="https://readthedocs.org/projects/sport-activities-features/badge/?version=latest" href="https://sport-activities-features.readthedocs.io/en/latest/?badge=latest">
</p>

<p align="center">
  <img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/firefly-cpp/sport-activities-features">
  <img alt="GitHub commit activity" src="https://img.shields.io/github/commit-activity/w/firefly-cpp/sport-activities-features.svg">
  <img alt="Average time to resolve an issue" src="http://isitmaintained.com/badge/resolution/firefly-cpp/sport-activities-features.svg" href="http://isitmaintained.com/project/firefly-cpp/sport-activities-features">
  <img alt="Percentage of issues still open" src="http://isitmaintained.com/badge/open/firefly-cpp/sport-activities-features.svg" href="http://isitmaintained.com/project/firefly-cpp/sport-activities-features">
  <img alt="All Contributors" src="https://img.shields.io/badge/all_contributors-6-orange.svg" href="#-contributors">
</p>

<p align="center">
  <img alt="DOI" src="https://img.shields.io/badge/DOI-10.1109/INES52918.2021.9512927-blue" href="https://doi.org/10.1109/INES52918.2021.9512927">
</p>

<p align="center">
  <a href="#-detailed-insights">๐Ÿ” Detailed insights</a> โ€ข
  <a href="#-installation">๐Ÿ“ฆ Installation</a> โ€ข
  <a href="#-api">๐Ÿ“ฎ API</a> โ€ข
  <a href="#-graphical-user-interface">๐Ÿ’ป Graphical User Interface</a> โ€ข
  <a href="#๏ธ-historical-weather-data">๐ŸŒฆ๏ธ Historical weather data</a> โ€ข
  <a href="#-overpass-api-open-elevation-api--opentopodata-integration">๐Ÿงฉ Overpass API, Open Elevation API & OpenTopoData integration</a>
  <a href="#-examples">๐Ÿš€ Examples</a> โ€ข
  <a href="#-license">๐Ÿ”‘ License</a> โ€ข
  <a href="#-cite-us">๐Ÿ“„ Cite us</a> โ€ข
  <a href="#-further-read">๐Ÿ“– Further read</a> โ€ข
  <a href="#-related-frameworks">๐Ÿ”— Related frameworks</a> โ€ข
  <a href="#-contributors">๐Ÿซ‚ Contributors</a>
</p>

## Unleashing the Power of Sports Activity Analysis: A Framework Beyond Ordinary Metrics ๐Ÿš€

Prepare to dive into the thrilling world of sports activity analysis, where hidden geographic, topological, and personalized data await their grand unveiling. In this captivating journey, we embark on a quest to extract the deepest insights from the wealth of information generated by monitoring sports activities. Brace yourself for a framework that transcends the limitations of conventional analysis techniques. ๐Ÿ’ช๐Ÿ”

Traditional approaches often rely on integral metrics like total duration, total distance, and average heart rate, but they fall victim to the dreaded "overall metrics problem." These metrics fail to capture the essence of sports activities, omitting crucial components and leading to potentially flawed and misleading conclusions. They lack the ability to recognize distinct stages and phases of the activity, such as the invigorating warm-up, the endurance-testing main event, and the heart-pounding intervals. โฑ๏ธ๐Ÿšดโ€โ™€๏ธ๐Ÿ“ˆ

Fortunately, our sport-activities-framework rises above these limitations, revealing a comprehensive panorama of your sports activity files. This framework combines the power of identification and extraction methods to unlock a treasure trove of valuable data. Picture this :camera: : effortlessly identifying the number of hills, extracting average altitudes of these remarkable formations, measuring the total distance conquered on those inclines, and even deriving climbing ratios for a true measure of accomplishment (total distance of hills vs. total distance). But that's just the tip of the iceberg! The framework seamlessly integrates a multitude of extensions, including historical weather parsing, statistical evaluations, and ex-post visualizations that bring your data to life. ๐Ÿ—ป๐Ÿ“Š๐ŸŒฆ๏ธ

For those seeking to venture further, we invite you to explore the realms of scientific papers on data mining that delve into these captivating topics. Discover how our framework complements the world of generating and predicting automated sport training sessions, creating a harmonious synergy between theory and practice. ๐Ÿ“š๐Ÿ”ฌ๐Ÿ’ก

* **Free software:** MIT license
* **Python versions:** 3.8.x, 3.9.x, 3.10.x, 3.11.x, 3.12.x
* **Documentation:** https://sport-activities-features.readthedocs.io/en/latest
* **Tested OS:** Windows, Ubuntu, Debian, Fedora, Alpine, Arch, macOS. **However, that does not mean it does not work on others.**

## ๐Ÿ” Detailed insights

Prepare to be astounded by the capabilities of the sport-activities-features framework. It effortlessly handles TCX & GPX activity files and harnesses the power of the [Overpass API](https://wiki.openstreetmap.org/wiki/Overpass_API) nodes. Presenting the range of functions at your disposal:

- **Unleash the integral metrics**: From total distance to total duration and even calorie count, witness the extraction of these vital statistics with a single glance. ๐Ÿ“โฐ๐Ÿ”ฅ ([See example](examples/integral_metrics_extraction.py))

- **Conquer the peaks**: Ascend to new heights by extracting topographic features like the number of hills, their average altitudes, the total distance covered on these majestic slopes, and the thrilling climbing ratio. Prepare for a breathtaking adventure! โ›ฐ๏ธ๐Ÿ“ˆ๐Ÿง—โ€โ™‚๏ธ ([See example](examples/hill_data_extraction.py))

- **Embark on a visual journey**: Immerse yourself in the beauty of your accomplishments as you plot the identified hills on a mesmerizing map. Witness the landscape come alive before your eyes. ๐Ÿ—บ๏ธ๐Ÿž๏ธ๐Ÿ–Œ๏ธ ([See example](examples/draw_map_with_identified_hills.py))

- **Embrace the rhythm of intervals**: Explore the intervals within your sports activities, uncovering their numbers, durations, distances, and heart rates. Unveil the heartbeat of your performance! ๐Ÿƒโ€โ™€๏ธ๐Ÿ“Š๐Ÿ’“ ([See example](examples/draw_map_with_identified_intervals.py))

- **Calculate the training loads**: Dive deep into the intricate world of training loads and discover the Banister TRIMP and Lucia TRIMP methods. Gain invaluable insights into optimizing your training regimen. ๐Ÿ“ˆโš–๏ธ๐Ÿ‹๏ธโ€โ™‚๏ธ ([See example](examples/calculate_training_load.py))

- **Weather the storm**: Unlock the power of historical weather data from external services, adding a fascinating layer of context to your sports activities. โ˜€๏ธ๐ŸŒง๏ธโ›ˆ๏ธ

- **Unveil the secrets within coordinates**: Explore the integral metrics of your activities within specific geographical areas, uncovering valuable data on distance, heart rate, and speed. Peer into the depths of your performance! ๐ŸŒ๐Ÿ“๐Ÿ“‰ ([See example](examples/extract_data_inside_area.py))

- **Embrace randomness**: Extract activities from CSV files and indulge in the excitement of randomly selecting a specific number of activities. Embrace the element of surprise! ๐ŸŽฒ๐Ÿ“‚๐ŸŽ‰ ([See example](examples/extract_random_activities_from_csv.py))

- **Conquer the dead ends**: Unravel the mysteries of your sports activities by identifying the dead ends. Prepare to navigate the uncharted territories of your performance! ๐Ÿšง๐Ÿ—บ๏ธ๐Ÿ” ([See example](examples/dead_end_extraction.py))

- **Unlock the format**: Seamlessly convert TCX files to GPX, opening doors to even more possibilities. Adapt and conquer! โš™๏ธ๐Ÿ”„โœจ ([See example](examples/convert_tcx_to_gpx.py))

And that's just the beginning! The sport-activities-framework holds countless other features, awaiting your exploration. Brace yourself for an exhilarating journey of discovery, where the ordinary becomes extraordinary, and your sports activities come alive like never before. ๐ŸŒŸ๐Ÿ”ฅ๐Ÿƒโ€โ™‚๏ธ

The framework comes with two (testing) [benchmark datasets](https://github.com/firefly-cpp/sports-activity-dataset-collections), which are freely available to download from: [DATASET1](http://iztok-jr-fister.eu/static/publications/Sport5.zip), [DATASET2](http://iztok-jr-fister.eu/static/css/datasets/Sport.zip).


## ๐Ÿ“ฆ Installation

### pip

Install sport-activities-features with pip:

```sh
pip install sport-activities-features
```

### Alpine Linux

To install sport-activities-features on Alpine, use:

```sh
$ apk add py3-sport-activities-features
```

### Fedora Linux

To install sport-activities-features on Fedora, use:

```sh
$ dnf install python3-sport-activities-features
```

### Arch Linux

To install sport-activities-features on Arch Linux, please use an [AUR helper](https://wiki.archlinux.org/title/AUR_helpers):

```sh
$ yay -Syyu python-sport-activities-features
```

## ๐Ÿ“ฎ API

There is a simple API for remote work with the sport-activities-features package available [here](https://github.com/alenrajsp/sport-activities-features-api).

## ๐Ÿ’ป Graphical User Interface

There is a simple Graphical User Interface for the sport-activities-features package available [here](https://github.com/firefly-cpp/sport-activities-features-gui).

## ๐ŸŒฆ๏ธ Historical weather data
Weather data parsed is collected from the [Visual Crossing Weather API](https://www.visualcrossing.com/).
Please note that this is an external unaffiliated service, and users must register to use the API.
The service has a free tier (1000 Weather reports/day) but is otherwise operating on a pay-as-you-go model.
For pricing and terms of use, please read the [official documentation](https://www.visualcrossing.com/weather-data-editions) of the API provider.

## ๐Ÿงฉ Overpass API, Open Elevation API & OpenTopoData integration
Without performing activities, we can use the [OpenStreetMap](https://www.openstreetmap.org/) for the identification of hills,
total ascent, and descent. This is done using the [Overpass API](https://wiki.openstreetmap.org/wiki/Overpass_API)
which is a read-only API that allows querying of OSM map data. In addition to that altitude, data is retrieved by using the
[Open-Elevation API](https://open-elevation.com/) or [OpenTopoData API](https://www.opentopodata.org/)  which are open-source and free alternatives to the Google Elevation API.
Both of the solutions can be used by using free publicly acessible APIs ([Overpass](https://wiki.openstreetmap.org/wiki/Overpass_API), [Open-Elevation](https://open-elevation.com/#public-api), [OpenTopoData](https://www.opentopodata.org/#public-api)) or can be self hosted on a server or as a Docker container ([Overpass](https://wiki.openstreetmap.org/wiki/Overpass_API/Installation), [Open-Elevation](https://github.com/Jorl17/open-elevation/blob/master/docs/host-your-own.md), [OpenTopoData](https://www.opentopodata.org/server/)).

## ๐Ÿš€ Examples

### Reading files

#### (*.TCX)
```python
from sport_activities_features.tcx_manipulation import TCXFile

# Class for reading TCX files
tcx_file=TCXFile()
tcx_exercise = tcx_file.read_one_file("path_to_the_file")
data = tcx_file.extract_activity_data(tcx_exercise) # Represents data as dictionary of lists

# Alternative choice
data = tcx_file.extract_activity_data(tcx_exercise, numpy_array= True) # Represents data as dictionary of numpy.arrays

```

#### (*.GPX)
```python
from sport_activities_features.gpx_manipulation import GPXFile

# Class for reading GPX files
gpx_file=GPXFile()

# Read the file and generate a dictionary with 
gpx_exercise = gpx_file.read_one_file("path_to_the_file")
data = gpx_file.extract_activity_data(gpx_exercise) # Represents data as dictionary of lists

# Alternative choice
data = gpx_file.extract_activity_data(gpx_exercise, numpy_array= True) # Represents data as dictionary of numpy.arrays

```

### Extraction of topographic features
```python
from sport_activities_features.hill_identification import HillIdentification
from sport_activities_features.tcx_manipulation import TCXFile
from sport_activities_features.topographic_features import TopographicFeatures
from sport_activities_features.plot_data import PlotData

# Read TCX file
tcx_file = TCXFile()
tcx_exercise = tcx_file.read_one_file("path_to_the_file")
activity = tcx_file.extract_activity_data(tcx_exercise)

# Detect hills in data
Hill = HillIdentification(activity['altitudes'], 30)
Hill.identify_hills()
all_hills = Hill.return_hills()

# Extract features from data
Top = TopographicFeatures(all_hills)
num_hills = Top.num_of_hills()
avg_altitude = Top.avg_altitude_of_hills(activity['altitudes'])
avg_ascent = Top.avg_ascent_of_hills(activity['altitudes'])
distance_hills = Top.distance_of_hills(activity['positions'])
hills_share = Top.share_of_hills(distance_hills, activity['total_distance'])
```

### Extraction of intervals
```python
import sys
sys.path.append('../')

from sport_activities_features.interval_identification import IntervalIdentificationByPower, IntervalIdentificationByHeartrate
from sport_activities_features.tcx_manipulation import TCXFile

# Reading the TCX file
tcx_file = TCXFile()
tcx_exercise = tcx_file.read_one_file("path_to_the_file")
activity = tcx_file.extract_activity_data(tcx_exercise)

# Identifying the intervals in the activity by power
Intervals = IntervalIdentificationByPower(activity["distances"], activity["timestamps"], activity["altitudes"], 70)
Intervals.identify_intervals()
all_intervals = Intervals.return_intervals()

# Identifying the intervals in the activity by heart rate
Intervals = IntervalIdentificationByHeartrate(activity["timestamps"], activity["altitudes"], activity["heartrates"])
Intervals.identify_intervals()
all_intervals = Intervals.return_intervals()
```

### Parsing of Historical weather data from an external service
```python
from sport_activities_features import WeatherIdentification
from sport_activities_features import TCXFile

# Read TCX file
tcx_file = TCXFile()
tcx_exercise = tcx_file.read_one_file("path_to_the_file")
tcx_data = tcx_file.extract_activity_data(tcx_exercise)

# Configure visual crossing api key
visual_crossing_api_key = "weather_api_key" # https://www.visualcrossing.com/weather-api

# Explanation of elements - https://www.visualcrossing.com/resources/documentation/weather-data/weather-data-documentation/
weather = WeatherIdentification(tcx_data['positions'], tcx_data['timestamps'], visual_crossing_api_key)
weatherlist = weather.get_weather(time_delta=30)
tcx_weather = weather.get_average_weather_data(timestamps=tcx_data['timestamps'],weather=weatherlist)
# Add weather to TCX data
tcx_data.update({'weather':tcx_weather})
```

The weather list is of the following type:
```json
     [
        {
            "temperature": 14.3,
            "maximum_temperature": 14.3,
            "minimum_temperature": 14.3,
            "wind_chill": null,
            "heat_index": null,
            "solar_radiation": null,
            "precipitation": 0.0,
            "sea_level_pressure": 1021.6,
            "snow_depth": null,
            "wind_speed": 6.9,
            "wind_direction": 129.0,
            "wind_gust": null,
            "visibility": 40.0,
            "cloud_cover": 54.3,
            "relative_humidity": 47.6,
            "dew_point": 3.3,
            "weather_type": "",
            "conditions": "Partially cloudy",
            "date": "2016-04-02T17:26:09+00:00",
            "location": [
                46.079871179535985,
                14.738618675619364
            ],
            "index": 0
        }, ...
    ]
```

### Extraction of integral metrics
```python
import sys
sys.path.append('../')

from sport_activities_features.tcx_manipulation import TCXFile

# Read TCX file
tcx_file = TCXFile()
tcx_exercise = tcx_file.read_one_file("path_to_the_file")
integral_metrics = tcx_file.extract_integral_metrics(tcx_exercise)

print(integral_metrics)

```

### Weather data extraction
```python
from sport_activities_features.weather_identification import WeatherIdentification
from sport_activities_features.tcx_manipulation import TCXFile

#read TCX file
tcx_file = TCXFile()
tcx_exercise = tcx_file.read_one_file("path_to_the_file")
tcx_data = tcx_file.extract_activity_data(tcx_exercise)


#configure visual crossing api key
visual_crossing_api_key = "API_KEY" # https://www.visualcrossing.com/weather-api

#return weather objects
weather = WeatherIdentification(tcx_data['positions'], tcx_data['timestamps'], visual_crossing_api_key)
weatherlist = weather.get_weather()
```

### Using Overpass queried Open Street Map nodes
```python
import overpy
from sport_activities_features.overpy_node_manipulation import OverpyNodesReader

# External service Overpass API (https://wiki.openstreetmap.org/wiki/Overpass_API) (can be self-hosted)
overpass_api = "https://lz4.overpass-api.de/api/interpreter"

# External service Open Elevation API (https://api.open-elevation.com/api/v1/lookup) (can be self-hosted)
open_elevation_api = "https://api.open-elevation.com/api/v1/lookup"

# OSM Way (https://wiki.openstreetmap.org/wiki/Way)
open_street_map_way = 164477980

overpass_api = overpy.Overpass(url=overpass_api)

# Get an example Overpass way
q = f"""(way({open_street_map_way});<;);out geom;"""
query = overpass_api.query(q)

# Get nodes of an Overpass way
nodes = query.ways[0].get_nodes(resolve_missing=True)

# Extract basic data from nodes (you can, later on, use Hill Identification and Hill Data Extraction on them)
overpy_reader = OverpyNodesReader(open_elevation_api=open_elevation_api)
# Returns {
#         'positions': positions, 'altitudes': altitudes, 'distances': distances, 'total_distance': total_distance
#         }
data = overpy_reader.read_nodes(nodes)
```

### Extraction of data inside the area
```python
import numpy as np
import sys
sys.path.append('../')

from sport_activities_features.area_identification import AreaIdentification
from sport_activities_features.tcx_manipulation import TCXFile

# Reading the TCX file.
tcx_file = TCXFile()
tcx_exercise = tcx_file.read_one_file("path_to_the_file")
activity = tcx_file.extract_activity_data(tcx_exercise)

# Converting the read data to arrays.
positions = np.array([*activity['positions']])
distances = np.array([*activity['distances']])
timestamps = np.array([*activity['timestamps']])
heartrates = np.array([*activity['heartrates']])

# Area coordinates should be given in clockwise orientation in the form of 3D array (number_of_hulls, hull_coordinates, 2).
# Holes in area are permitted.
area_coordinates = np.array([[[10, 10], [10, 50], [50, 50], [50, 10]],
                             [[19, 19], [19, 21], [21, 21], [21, 19]]])

# Extracting the data inside the given area.
area = AreaIdentification(positions, distances, timestamps, heartrates, area_coordinates)
area.identify_points_in_area()
area_data = area.extract_data_in_area()
```

### Identify interruptions
```python
from sport_activities_features.interruptions.interruption_processor import InterruptionProcessor
from sport_activities_features.tcx_manipulation import TCXFile

"""
Identify interruption events from a TCX or GPX file.
"""

# read TCX file (also works with GPX files)
tcx_file = TCXFile()
tcx_exercise = tcx_file.read_one_file("path_to_the_file")
tcx_data = tcx_file.extract_activity_data(tcx_exercise)

"""
Time interval = time before and after the start of an event
Min speed = Threshold speed to trigger an event/interruption (trigger when under min_speed)
overpass_api_url = Set to something self-hosted, or use a public instance from https://wiki.openstreetmap.org/wiki/Overpass_API
"""
interruptionProcessor = InterruptionProcessor(time_interval=60, min_speed=2,
                                              overpass_api_url="url_to_overpass_api")

"""
If classify is set to true, also discover if interruptions are close to intersections. Returns a list of [ExerciseEvent]
"""
events = interruptionProcessor.events(tcx_data, True)
```

### Overpy (Overpass API) node manipulation
Generate TCXFile parsed like data object from overpy.Node objects
```python
import overpy
from sport_activities_features.overpy_node_manipulation import OverpyNodesReader

# External service Overpass API (https://wiki.openstreetmap.org/wiki/Overpass_API) (can be self-hosted)
overpass_api = "https://lz4.overpass-api.de/api/interpreter"

# External service Open Elevation API (https://api.open-elevation.com/api/v1/lookup) (can be self-hosted)
open_elevation_api = "https://api.open-elevation.com/api/v1/lookup"

# OSM Way (https://wiki.openstreetmap.org/wiki/Way)
open_street_map_way = 164477980

overpass_api = overpy.Overpass(url=overpass_api)

# Get an example Overpass way
q = f"""(way({open_street_map_way});<;);out geom;"""
query = overpass_api.query(q)

# Get nodes of an Overpass way
nodes = query.ways[0].get_nodes(resolve_missing=True)

# Extract basic data from nodes (you can, later on, use Hill Identification and Hill Data Extraction on them)
overpy_reader = OverpyNodesReader(open_elevation_api=open_elevation_api)
# Returns {
#         'positions': positions, 'altitudes': altitudes, 'distances': distances, 'total_distance': total_distance
#         }
data = overpy_reader.read_nodes(nodes)
```
### Missing elevation data extraction
```python
from sport_activities_features import ElevationIdentification
from sport_activities_features import TCXFile

tcx_file = TCXFile()
tcx_exercise = tcx_file.read_one_file("path_to_the_file")
tcx_data = tcx_file.extract_activity_data(tcx_exercise)

elevations = ElevationIdentification(tcx_data['positions'])
"""Adds tcx_data['elevation'] = eg. [124, 21, 412] for each position"""
tcx_data.update({'elevations':elevations})
```

### Example of a visualization of the area detection

![Area Figure](https://i.imgur.com/Iz8Ga3B.png)

### Example of visualization of dead-end identification
![Dead End Figure](https://imgur.com/LgZzCFS.png)

## ๐Ÿ”‘ License

This package is distributed under the MIT License. This license can be found online at <http://www.opensource.org/licenses/MIT>.

## Disclaimer

This framework is provided as-is, and there are no guarantees that it fits your purposes or that it is bug-free. Use it at your own risk!

## ๐Ÿ“„ Cite us

I. Jr. Fister, L. Lukaฤ, A. Rajลกp, I. Fister, L. Peฤnik and D. Fister, "[A minimalistic toolbox for extracting features from sport activity files](http://iztok-jr-fister.eu/static/publications/294.pdf)", 2021 IEEE 25th International Conference on Intelligent Engineering Systems (INES), 2021, pp. 121-126, doi: [10.1109/INES52918.2021.9512927](http://dx.doi.org/10.1109/INES52918.2021.9512927).

## ๐Ÿ“– Further read

[1] [Awesome Computational Intelligence in Sports](https://github.com/firefly-cpp/awesome-computational-intelligence-in-sports)

## ๐Ÿ”— Related frameworks

[1] [AST-Monitor: A wearable Raspberry Pi computer for cyclists](https://github.com/firefly-cpp/AST-Monitor)

[2] [TCXReader.jl: Julia package designed for parsing TCX files](https://github.com/firefly-cpp/TCXReader.jl)

[3] [TCXWriter: A Tiny Library for writing/creating TCX files on Arduino](https://github.com/firefly-cpp/tcxwriter)

## ๐Ÿซ‚ Contributors

Thanks go to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
  <tbody>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/alenrajsp"><img src="https://avatars.githubusercontent.com/u/27721714?v=4?s=100" width="100px;" alt="alenrajsp"/><br /><sub><b>alenrajsp</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=alenrajsp" title="Code">๐Ÿ’ป</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=alenrajsp" title="Tests">โš ๏ธ</a> <a href="#example-alenrajsp" title="Examples">๐Ÿ’ก</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=alenrajsp" title="Documentation">๐Ÿ“–</a> <a href="#ideas-alenrajsp" title="Ideas, Planning, & Feedback">๐Ÿค”</a> <a href="https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3Aalenrajsp" title="Bug reports">๐Ÿ›</a> <a href="#maintenance-alenrajsp" title="Maintenance">๐Ÿšง</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://www.iztok-jr-fister.eu/"><img src="https://avatars.githubusercontent.com/u/1633361?v=4?s=100" width="100px;" alt="Iztok Fister Jr."/><br /><sub><b>Iztok Fister Jr.</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=firefly-cpp" title="Code">๐Ÿ’ป</a> <a href="https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3Afirefly-cpp" title="Bug reports">๐Ÿ›</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=firefly-cpp" title="Tests">โš ๏ธ</a> <a href="#example-firefly-cpp" title="Examples">๐Ÿ’ก</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=firefly-cpp" title="Documentation">๐Ÿ“–</a> <a href="#ideas-firefly-cpp" title="Ideas, Planning, & Feedback">๐Ÿค”</a> <a href="#mentoring-firefly-cpp" title="Mentoring">๐Ÿง‘โ€๐Ÿซ</a> <a href="#platform-firefly-cpp" title="Packaging/porting to new platform">๐Ÿ“ฆ</a> <a href="#maintenance-firefly-cpp" title="Maintenance">๐Ÿšง</a> <a href="#data-firefly-cpp" title="Data">๐Ÿ”ฃ</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/luckyLukac"><img src="https://avatars.githubusercontent.com/u/73126820?v=4?s=100" width="100px;" alt="luckyLukac"/><br /><sub><b>luckyLukac</b></sub></a><br /><a href="#ideas-luckyLukac" title="Ideas, Planning, & Feedback">๐Ÿค”</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=luckyLukac" title="Code">๐Ÿ’ป</a> <a href="https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3AluckyLukac" title="Bug reports">๐Ÿ›</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=luckyLukac" title="Tests">โš ๏ธ</a> <a href="#example-luckyLukac" title="Examples">๐Ÿ’ก</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/rhododendrom"><img src="https://avatars.githubusercontent.com/u/3198785?v=4?s=100" width="100px;" alt="rhododendrom"/><br /><sub><b>rhododendrom</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=rhododendrom" title="Code">๐Ÿ’ป</a> <a href="#design-rhododendrom" title="Design">๐ŸŽจ</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=rhododendrom" title="Documentation">๐Ÿ“–</a> <a href="#ideas-rhododendrom" title="Ideas, Planning, & Feedback">๐Ÿค”</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/lukapecnik"><img src="https://avatars.githubusercontent.com/u/23029992?v=4?s=100" width="100px;" alt="Luka Peฤnik"/><br /><sub><b>Luka Peฤnik</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=lukapecnik" title="Code">๐Ÿ’ป</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=lukapecnik" title="Documentation">๐Ÿ“–</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=lukapecnik" title="Tests">โš ๏ธ</a> <a href="https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3Alukapecnik" title="Bug reports">๐Ÿ›</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/spelap"><img src="https://avatars.githubusercontent.com/u/19300429?v=4?s=100" width="100px;" alt="spelap"/><br /><sub><b>spelap</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=spelap" title="Code">๐Ÿ’ป</a></td>
      <td align="center" valign="top" width="14.28%"><a href="http://carlosal1015.github.io"><img src="https://avatars.githubusercontent.com/u/21283014?v=4?s=100" width="100px;" alt="Oromion"/><br /><sub><b>Oromion</b></sub></a><br /><a href="#maintenance-carlosal1015" title="Maintenance">๐Ÿšง</a> <a href="https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3Acarlosal1015" title="Bug reports">๐Ÿ›</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/KoprivcLuka"><img src="https://avatars.githubusercontent.com/u/45632449?v=4?s=100" width="100px;" alt="Luka Koprivc"/><br /><sub><b>Luka Koprivc</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3AKoprivcLuka" title="Bug reports">๐Ÿ›</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/garyjellyarms"><img src="https://avatars.githubusercontent.com/u/79595804?v=4?s=100" width="100px;" alt="Nejc Graj"/><br /><sub><b>Nejc Graj</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3Agaryjellyarms" title="Bug reports">๐Ÿ›</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/Mtvrt123"><img src="https://avatars.githubusercontent.com/u/50879568?v=4?s=100" width="100px;" alt="MlinaricNejc"/><br /><sub><b>MlinaricNejc</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3AMtvrt123" title="Bug reports">๐Ÿ›</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/KukovecRok"><img src="https://avatars.githubusercontent.com/u/33880044?v=4?s=100" width="100px;" alt="Tatookie"/><br /><sub><b>Tatookie</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=KukovecRok" title="Code">๐Ÿ’ป</a> <a href="https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3AKukovecRok" title="Bug reports">๐Ÿ›</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=KukovecRok" title="Tests">โš ๏ธ</a> <a href="#example-KukovecRok" title="Examples">๐Ÿ’ก</a> <a href="#maintenance-KukovecRok" title="Maintenance">๐Ÿšง</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/zala-lahovnik"><img src="https://avatars.githubusercontent.com/u/105444201?v=4?s=100" width="100px;" alt="Zala Lahovnik"/><br /><sub><b>Zala Lahovnik</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=zala-lahovnik" title="Documentation">๐Ÿ“–</a> <a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=zala-lahovnik" title="Code">๐Ÿ’ป</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/lahovniktadej"><img src="https://avatars.githubusercontent.com/u/57890734?v=4?s=100" width="100px;" alt="Tadej Lahovnik"/><br /><sub><b>Tadej Lahovnik</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=lahovniktadej" title="Documentation">๐Ÿ“–</a></td>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/HlisTilen"><img src="https://avatars.githubusercontent.com/u/44733158?v=4?s=100" width="100px;" alt="HlisTilen"/><br /><sub><b>HlisTilen</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=HlisTilen" title="Documentation">๐Ÿ“–</a></td>
    </tr>
    <tr>
      <td align="center" valign="top" width="14.28%"><a href="https://github.com/MihaMi27"><img src="https://avatars.githubusercontent.com/u/82605811?v=4?s=100" width="100px;" alt="Miha Mirt"/><br /><sub><b>Miha Mirt</b></sub></a><br /><a href="https://github.com/firefly-cpp/sport-activities-features/commits?author=MihaMi27" title="Code">๐Ÿ’ป</a></td>
    </tr>
  </tbody>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome!

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/firefly-cpp/sport-activities-features",
    "name": "sport-activities-features",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0.0,>=3.9.0",
    "maintainer_email": null,
    "keywords": "computational intelligence, cycling, data mining, datasets, gpx, optimization, sport activities, tcx",
    "author": "Iztok Fister Jr.",
    "author_email": "iztok@iztok-jr-fister.eu",
    "download_url": "https://files.pythonhosted.org/packages/bf/b9/d7fa96a69efcd98e7977dbc4e45c9b6f7adedb69bf235fe884cf1dfa9877/sport_activities_features-0.5.0.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <img width=\"200\" src=\"https://raw.githubusercontent.com/firefly-cpp/sport-activities-features/main/.github/logo/sport_activities.png\">\n</p>\n\n<h1 align=\"center\">\nsport-activities-features --- A minimalistic toolbox for extracting features from sports activity files written in Python\n</h1>\n\n<p align=\"center\">\n  <img alt=\"PyPI Version\" src=\"https://img.shields.io/pypi/v/sport-activities-features.svg\" href=\"https://pypi.python.org/pypi/sport-activities-features\">\n  <img alt=\"PyPI - Python Version\" src=\"https://img.shields.io/pypi/pyversions/sport-activities-features.svg\">\n  <img alt=\"PyPI - Downloads\" src=\"https://img.shields.io/pypi/dm/sport-activities-features.svg\">\n  <img alt=\"Fedora package\" src=\"https://img.shields.io/fedora/v/python3-sport-activities-features?color=blue&label=Fedora%20Linux&logo=fedora\" href=\"https://src.fedoraproject.org/rpms/python-sport-activities-features\">\n  <img alt=\"AUR package\" src=\"https://img.shields.io/aur/version/python-sport-activities-features?color=blue&label=Arch%20Linux&logo=arch-linux\" href=\"https://aur.archlinux.org/packages/python-sport-activities-features\">\n  <img alt=\"Packaging status\" src=\"https://repology.org/badge/tiny-repos/python:sport-activities-features.svg\" href=\"https://repology.org/project/python:sport-activities-features/versions\">\n  <img alt=\"Downloads\" src=\"https://pepy.tech/badge/sport-activities-features\" href=\"https://pepy.tech/project/sport-activities-features\">\n  <img alt=\"GitHub license\" src=\"https://img.shields.io/github/license/firefly-cpp/sport-activities-features.svg\" href=\"https://github.com/firefly-cpp/sport-activities-features/blob/master/LICENSE\">\n  <img alt=\"Documentation Status\" src=\"https://readthedocs.org/projects/sport-activities-features/badge/?version=latest\" href=\"https://sport-activities-features.readthedocs.io/en/latest/?badge=latest\">\n</p>\n\n<p align=\"center\">\n  <img alt=\"GitHub repo size\" src=\"https://img.shields.io/github/repo-size/firefly-cpp/sport-activities-features\">\n  <img alt=\"GitHub commit activity\" src=\"https://img.shields.io/github/commit-activity/w/firefly-cpp/sport-activities-features.svg\">\n  <img alt=\"Average time to resolve an issue\" src=\"http://isitmaintained.com/badge/resolution/firefly-cpp/sport-activities-features.svg\" href=\"http://isitmaintained.com/project/firefly-cpp/sport-activities-features\">\n  <img alt=\"Percentage of issues still open\" src=\"http://isitmaintained.com/badge/open/firefly-cpp/sport-activities-features.svg\" href=\"http://isitmaintained.com/project/firefly-cpp/sport-activities-features\">\n  <img alt=\"All Contributors\" src=\"https://img.shields.io/badge/all_contributors-6-orange.svg\" href=\"#-contributors\">\n</p>\n\n<p align=\"center\">\n  <img alt=\"DOI\" src=\"https://img.shields.io/badge/DOI-10.1109/INES52918.2021.9512927-blue\" href=\"https://doi.org/10.1109/INES52918.2021.9512927\">\n</p>\n\n<p align=\"center\">\n  <a href=\"#-detailed-insights\">\ud83d\udd0d Detailed insights</a> \u2022\n  <a href=\"#-installation\">\ud83d\udce6 Installation</a> \u2022\n  <a href=\"#-api\">\ud83d\udcee API</a> \u2022\n  <a href=\"#-graphical-user-interface\">\ud83d\udcbb Graphical User Interface</a> \u2022\n  <a href=\"#\ufe0f-historical-weather-data\">\ud83c\udf26\ufe0f Historical weather data</a> \u2022\n  <a href=\"#-overpass-api-open-elevation-api--opentopodata-integration\">\ud83e\udde9 Overpass API, Open Elevation API & OpenTopoData integration</a>\n  <a href=\"#-examples\">\ud83d\ude80 Examples</a> \u2022\n  <a href=\"#-license\">\ud83d\udd11 License</a> \u2022\n  <a href=\"#-cite-us\">\ud83d\udcc4 Cite us</a> \u2022\n  <a href=\"#-further-read\">\ud83d\udcd6 Further read</a> \u2022\n  <a href=\"#-related-frameworks\">\ud83d\udd17 Related frameworks</a> \u2022\n  <a href=\"#-contributors\">\ud83e\udec2 Contributors</a>\n</p>\n\n## Unleashing the Power of Sports Activity Analysis: A Framework Beyond Ordinary Metrics \ud83d\ude80\n\nPrepare to dive into the thrilling world of sports activity analysis, where hidden geographic, topological, and personalized data await their grand unveiling. In this captivating journey, we embark on a quest to extract the deepest insights from the wealth of information generated by monitoring sports activities. Brace yourself for a framework that transcends the limitations of conventional analysis techniques. \ud83d\udcaa\ud83d\udd0d\n\nTraditional approaches often rely on integral metrics like total duration, total distance, and average heart rate, but they fall victim to the dreaded \"overall metrics problem.\" These metrics fail to capture the essence of sports activities, omitting crucial components and leading to potentially flawed and misleading conclusions. They lack the ability to recognize distinct stages and phases of the activity, such as the invigorating warm-up, the endurance-testing main event, and the heart-pounding intervals. \u23f1\ufe0f\ud83d\udeb4\u200d\u2640\ufe0f\ud83d\udcc8\n\nFortunately, our sport-activities-framework rises above these limitations, revealing a comprehensive panorama of your sports activity files. This framework combines the power of identification and extraction methods to unlock a treasure trove of valuable data. Picture this :camera: : effortlessly identifying the number of hills, extracting average altitudes of these remarkable formations, measuring the total distance conquered on those inclines, and even deriving climbing ratios for a true measure of accomplishment (total distance of hills vs. total distance). But that's just the tip of the iceberg! The framework seamlessly integrates a multitude of extensions, including historical weather parsing, statistical evaluations, and ex-post visualizations that bring your data to life. \ud83d\uddfb\ud83d\udcca\ud83c\udf26\ufe0f\n\nFor those seeking to venture further, we invite you to explore the realms of scientific papers on data mining that delve into these captivating topics. Discover how our framework complements the world of generating and predicting automated sport training sessions, creating a harmonious synergy between theory and practice. \ud83d\udcda\ud83d\udd2c\ud83d\udca1\n\n* **Free software:** MIT license\n* **Python versions:** 3.8.x, 3.9.x, 3.10.x, 3.11.x, 3.12.x\n* **Documentation:** https://sport-activities-features.readthedocs.io/en/latest\n* **Tested OS:** Windows, Ubuntu, Debian, Fedora, Alpine, Arch, macOS. **However, that does not mean it does not work on others.**\n\n## \ud83d\udd0d Detailed insights\n\nPrepare to be astounded by the capabilities of the sport-activities-features framework. It effortlessly handles TCX & GPX activity files and harnesses the power of the [Overpass API](https://wiki.openstreetmap.org/wiki/Overpass_API) nodes. Presenting the range of functions at your disposal:\n\n- **Unleash the integral metrics**: From total distance to total duration and even calorie count, witness the extraction of these vital statistics with a single glance. \ud83d\udccf\u23f0\ud83d\udd25 ([See example](examples/integral_metrics_extraction.py))\n\n- **Conquer the peaks**: Ascend to new heights by extracting topographic features like the number of hills, their average altitudes, the total distance covered on these majestic slopes, and the thrilling climbing ratio. Prepare for a breathtaking adventure! \u26f0\ufe0f\ud83d\udcc8\ud83e\uddd7\u200d\u2642\ufe0f ([See example](examples/hill_data_extraction.py))\n\n- **Embark on a visual journey**: Immerse yourself in the beauty of your accomplishments as you plot the identified hills on a mesmerizing map. Witness the landscape come alive before your eyes. \ud83d\uddfa\ufe0f\ud83c\udfde\ufe0f\ud83d\udd8c\ufe0f ([See example](examples/draw_map_with_identified_hills.py))\n\n- **Embrace the rhythm of intervals**: Explore the intervals within your sports activities, uncovering their numbers, durations, distances, and heart rates. Unveil the heartbeat of your performance! \ud83c\udfc3\u200d\u2640\ufe0f\ud83d\udcca\ud83d\udc93 ([See example](examples/draw_map_with_identified_intervals.py))\n\n- **Calculate the training loads**: Dive deep into the intricate world of training loads and discover the Banister TRIMP and Lucia TRIMP methods. Gain invaluable insights into optimizing your training regimen. \ud83d\udcc8\u2696\ufe0f\ud83c\udfcb\ufe0f\u200d\u2642\ufe0f ([See example](examples/calculate_training_load.py))\n\n- **Weather the storm**: Unlock the power of historical weather data from external services, adding a fascinating layer of context to your sports activities. \u2600\ufe0f\ud83c\udf27\ufe0f\u26c8\ufe0f\n\n- **Unveil the secrets within coordinates**: Explore the integral metrics of your activities within specific geographical areas, uncovering valuable data on distance, heart rate, and speed. Peer into the depths of your performance! \ud83c\udf0d\ud83d\udccd\ud83d\udcc9 ([See example](examples/extract_data_inside_area.py))\n\n- **Embrace randomness**: Extract activities from CSV files and indulge in the excitement of randomly selecting a specific number of activities. Embrace the element of surprise! \ud83c\udfb2\ud83d\udcc2\ud83c\udf89 ([See example](examples/extract_random_activities_from_csv.py))\n\n- **Conquer the dead ends**: Unravel the mysteries of your sports activities by identifying the dead ends. Prepare to navigate the uncharted territories of your performance! \ud83d\udea7\ud83d\uddfa\ufe0f\ud83d\udd0d ([See example](examples/dead_end_extraction.py))\n\n- **Unlock the format**: Seamlessly convert TCX files to GPX, opening doors to even more possibilities. Adapt and conquer! \u2699\ufe0f\ud83d\udd04\u2728 ([See example](examples/convert_tcx_to_gpx.py))\n\nAnd that's just the beginning! The sport-activities-framework holds countless other features, awaiting your exploration. Brace yourself for an exhilarating journey of discovery, where the ordinary becomes extraordinary, and your sports activities come alive like never before. \ud83c\udf1f\ud83d\udd25\ud83c\udfc3\u200d\u2642\ufe0f\n\nThe framework comes with two (testing) [benchmark datasets](https://github.com/firefly-cpp/sports-activity-dataset-collections), which are freely available to download from: [DATASET1](http://iztok-jr-fister.eu/static/publications/Sport5.zip), [DATASET2](http://iztok-jr-fister.eu/static/css/datasets/Sport.zip).\n\n\n## \ud83d\udce6 Installation\n\n### pip\n\nInstall sport-activities-features with pip:\n\n```sh\npip install sport-activities-features\n```\n\n### Alpine Linux\n\nTo install sport-activities-features on Alpine, use:\n\n```sh\n$ apk add py3-sport-activities-features\n```\n\n### Fedora Linux\n\nTo install sport-activities-features on Fedora, use:\n\n```sh\n$ dnf install python3-sport-activities-features\n```\n\n### Arch Linux\n\nTo install sport-activities-features on Arch Linux, please use an [AUR helper](https://wiki.archlinux.org/title/AUR_helpers):\n\n```sh\n$ yay -Syyu python-sport-activities-features\n```\n\n## \ud83d\udcee API\n\nThere is a simple API for remote work with the sport-activities-features package available [here](https://github.com/alenrajsp/sport-activities-features-api).\n\n## \ud83d\udcbb Graphical User Interface\n\nThere is a simple Graphical User Interface for the sport-activities-features package available [here](https://github.com/firefly-cpp/sport-activities-features-gui).\n\n## \ud83c\udf26\ufe0f Historical weather data\nWeather data parsed is collected from the [Visual Crossing Weather API](https://www.visualcrossing.com/).\nPlease note that this is an external unaffiliated service, and users must register to use the API.\nThe service has a free tier (1000 Weather reports/day) but is otherwise operating on a pay-as-you-go model.\nFor pricing and terms of use, please read the [official documentation](https://www.visualcrossing.com/weather-data-editions) of the API provider.\n\n## \ud83e\udde9 Overpass API, Open Elevation API & OpenTopoData integration\nWithout performing activities, we can use the [OpenStreetMap](https://www.openstreetmap.org/) for the identification of hills,\ntotal ascent, and descent. This is done using the [Overpass API](https://wiki.openstreetmap.org/wiki/Overpass_API)\nwhich is a read-only API that allows querying of OSM map data. In addition to that altitude, data is retrieved by using the\n[Open-Elevation API](https://open-elevation.com/) or [OpenTopoData API](https://www.opentopodata.org/)  which are open-source and free alternatives to the Google Elevation API.\nBoth of the solutions can be used by using free publicly acessible APIs ([Overpass](https://wiki.openstreetmap.org/wiki/Overpass_API), [Open-Elevation](https://open-elevation.com/#public-api), [OpenTopoData](https://www.opentopodata.org/#public-api)) or can be self hosted on a server or as a Docker container ([Overpass](https://wiki.openstreetmap.org/wiki/Overpass_API/Installation), [Open-Elevation](https://github.com/Jorl17/open-elevation/blob/master/docs/host-your-own.md), [OpenTopoData](https://www.opentopodata.org/server/)).\n\n## \ud83d\ude80 Examples\n\n### Reading files\n\n#### (*.TCX)\n```python\nfrom sport_activities_features.tcx_manipulation import TCXFile\n\n# Class for reading TCX files\ntcx_file=TCXFile()\ntcx_exercise = tcx_file.read_one_file(\"path_to_the_file\")\ndata = tcx_file.extract_activity_data(tcx_exercise) # Represents data as dictionary of lists\n\n# Alternative choice\ndata = tcx_file.extract_activity_data(tcx_exercise, numpy_array= True) # Represents data as dictionary of numpy.arrays\n\n```\n\n#### (*.GPX)\n```python\nfrom sport_activities_features.gpx_manipulation import GPXFile\n\n# Class for reading GPX files\ngpx_file=GPXFile()\n\n# Read the file and generate a dictionary with \ngpx_exercise = gpx_file.read_one_file(\"path_to_the_file\")\ndata = gpx_file.extract_activity_data(gpx_exercise) # Represents data as dictionary of lists\n\n# Alternative choice\ndata = gpx_file.extract_activity_data(gpx_exercise, numpy_array= True) # Represents data as dictionary of numpy.arrays\n\n```\n\n### Extraction of topographic features\n```python\nfrom sport_activities_features.hill_identification import HillIdentification\nfrom sport_activities_features.tcx_manipulation import TCXFile\nfrom sport_activities_features.topographic_features import TopographicFeatures\nfrom sport_activities_features.plot_data import PlotData\n\n# Read TCX file\ntcx_file = TCXFile()\ntcx_exercise = tcx_file.read_one_file(\"path_to_the_file\")\nactivity = tcx_file.extract_activity_data(tcx_exercise)\n\n# Detect hills in data\nHill = HillIdentification(activity['altitudes'], 30)\nHill.identify_hills()\nall_hills = Hill.return_hills()\n\n# Extract features from data\nTop = TopographicFeatures(all_hills)\nnum_hills = Top.num_of_hills()\navg_altitude = Top.avg_altitude_of_hills(activity['altitudes'])\navg_ascent = Top.avg_ascent_of_hills(activity['altitudes'])\ndistance_hills = Top.distance_of_hills(activity['positions'])\nhills_share = Top.share_of_hills(distance_hills, activity['total_distance'])\n```\n\n### Extraction of intervals\n```python\nimport sys\nsys.path.append('../')\n\nfrom sport_activities_features.interval_identification import IntervalIdentificationByPower, IntervalIdentificationByHeartrate\nfrom sport_activities_features.tcx_manipulation import TCXFile\n\n# Reading the TCX file\ntcx_file = TCXFile()\ntcx_exercise = tcx_file.read_one_file(\"path_to_the_file\")\nactivity = tcx_file.extract_activity_data(tcx_exercise)\n\n# Identifying the intervals in the activity by power\nIntervals = IntervalIdentificationByPower(activity[\"distances\"], activity[\"timestamps\"], activity[\"altitudes\"], 70)\nIntervals.identify_intervals()\nall_intervals = Intervals.return_intervals()\n\n# Identifying the intervals in the activity by heart rate\nIntervals = IntervalIdentificationByHeartrate(activity[\"timestamps\"], activity[\"altitudes\"], activity[\"heartrates\"])\nIntervals.identify_intervals()\nall_intervals = Intervals.return_intervals()\n```\n\n### Parsing of Historical weather data from an external service\n```python\nfrom sport_activities_features import WeatherIdentification\nfrom sport_activities_features import TCXFile\n\n# Read TCX file\ntcx_file = TCXFile()\ntcx_exercise = tcx_file.read_one_file(\"path_to_the_file\")\ntcx_data = tcx_file.extract_activity_data(tcx_exercise)\n\n# Configure visual crossing api key\nvisual_crossing_api_key = \"weather_api_key\" # https://www.visualcrossing.com/weather-api\n\n# Explanation of elements - https://www.visualcrossing.com/resources/documentation/weather-data/weather-data-documentation/\nweather = WeatherIdentification(tcx_data['positions'], tcx_data['timestamps'], visual_crossing_api_key)\nweatherlist = weather.get_weather(time_delta=30)\ntcx_weather = weather.get_average_weather_data(timestamps=tcx_data['timestamps'],weather=weatherlist)\n# Add weather to TCX data\ntcx_data.update({'weather':tcx_weather})\n```\n\nThe weather list is of the following type:\n```json\n     [\n        {\n            \"temperature\": 14.3,\n            \"maximum_temperature\": 14.3,\n            \"minimum_temperature\": 14.3,\n            \"wind_chill\": null,\n            \"heat_index\": null,\n            \"solar_radiation\": null,\n            \"precipitation\": 0.0,\n            \"sea_level_pressure\": 1021.6,\n            \"snow_depth\": null,\n            \"wind_speed\": 6.9,\n            \"wind_direction\": 129.0,\n            \"wind_gust\": null,\n            \"visibility\": 40.0,\n            \"cloud_cover\": 54.3,\n            \"relative_humidity\": 47.6,\n            \"dew_point\": 3.3,\n            \"weather_type\": \"\",\n            \"conditions\": \"Partially cloudy\",\n            \"date\": \"2016-04-02T17:26:09+00:00\",\n            \"location\": [\n                46.079871179535985,\n                14.738618675619364\n            ],\n            \"index\": 0\n        }, ...\n    ]\n```\n\n### Extraction of integral metrics\n```python\nimport sys\nsys.path.append('../')\n\nfrom sport_activities_features.tcx_manipulation import TCXFile\n\n# Read TCX file\ntcx_file = TCXFile()\ntcx_exercise = tcx_file.read_one_file(\"path_to_the_file\")\nintegral_metrics = tcx_file.extract_integral_metrics(tcx_exercise)\n\nprint(integral_metrics)\n\n```\n\n### Weather data extraction\n```python\nfrom sport_activities_features.weather_identification import WeatherIdentification\nfrom sport_activities_features.tcx_manipulation import TCXFile\n\n#read TCX file\ntcx_file = TCXFile()\ntcx_exercise = tcx_file.read_one_file(\"path_to_the_file\")\ntcx_data = tcx_file.extract_activity_data(tcx_exercise)\n\n\n#configure visual crossing api key\nvisual_crossing_api_key = \"API_KEY\" # https://www.visualcrossing.com/weather-api\n\n#return weather objects\nweather = WeatherIdentification(tcx_data['positions'], tcx_data['timestamps'], visual_crossing_api_key)\nweatherlist = weather.get_weather()\n```\n\n### Using Overpass queried Open Street Map nodes\n```python\nimport overpy\nfrom sport_activities_features.overpy_node_manipulation import OverpyNodesReader\n\n# External service Overpass API (https://wiki.openstreetmap.org/wiki/Overpass_API) (can be self-hosted)\noverpass_api = \"https://lz4.overpass-api.de/api/interpreter\"\n\n# External service Open Elevation API (https://api.open-elevation.com/api/v1/lookup) (can be self-hosted)\nopen_elevation_api = \"https://api.open-elevation.com/api/v1/lookup\"\n\n# OSM Way (https://wiki.openstreetmap.org/wiki/Way)\nopen_street_map_way = 164477980\n\noverpass_api = overpy.Overpass(url=overpass_api)\n\n# Get an example Overpass way\nq = f\"\"\"(way({open_street_map_way});<;);out geom;\"\"\"\nquery = overpass_api.query(q)\n\n# Get nodes of an Overpass way\nnodes = query.ways[0].get_nodes(resolve_missing=True)\n\n# Extract basic data from nodes (you can, later on, use Hill Identification and Hill Data Extraction on them)\noverpy_reader = OverpyNodesReader(open_elevation_api=open_elevation_api)\n# Returns {\n#         'positions': positions, 'altitudes': altitudes, 'distances': distances, 'total_distance': total_distance\n#         }\ndata = overpy_reader.read_nodes(nodes)\n```\n\n### Extraction of data inside the area\n```python\nimport numpy as np\nimport sys\nsys.path.append('../')\n\nfrom sport_activities_features.area_identification import AreaIdentification\nfrom sport_activities_features.tcx_manipulation import TCXFile\n\n# Reading the TCX file.\ntcx_file = TCXFile()\ntcx_exercise = tcx_file.read_one_file(\"path_to_the_file\")\nactivity = tcx_file.extract_activity_data(tcx_exercise)\n\n# Converting the read data to arrays.\npositions = np.array([*activity['positions']])\ndistances = np.array([*activity['distances']])\ntimestamps = np.array([*activity['timestamps']])\nheartrates = np.array([*activity['heartrates']])\n\n# Area coordinates should be given in clockwise orientation in the form of 3D array (number_of_hulls, hull_coordinates, 2).\n# Holes in area are permitted.\narea_coordinates = np.array([[[10, 10], [10, 50], [50, 50], [50, 10]],\n                             [[19, 19], [19, 21], [21, 21], [21, 19]]])\n\n# Extracting the data inside the given area.\narea = AreaIdentification(positions, distances, timestamps, heartrates, area_coordinates)\narea.identify_points_in_area()\narea_data = area.extract_data_in_area()\n```\n\n### Identify interruptions\n```python\nfrom sport_activities_features.interruptions.interruption_processor import InterruptionProcessor\nfrom sport_activities_features.tcx_manipulation import TCXFile\n\n\"\"\"\nIdentify interruption events from a TCX or GPX file.\n\"\"\"\n\n# read TCX file (also works with GPX files)\ntcx_file = TCXFile()\ntcx_exercise = tcx_file.read_one_file(\"path_to_the_file\")\ntcx_data = tcx_file.extract_activity_data(tcx_exercise)\n\n\"\"\"\nTime interval = time before and after the start of an event\nMin speed = Threshold speed to trigger an event/interruption (trigger when under min_speed)\noverpass_api_url = Set to something self-hosted, or use a public instance from https://wiki.openstreetmap.org/wiki/Overpass_API\n\"\"\"\ninterruptionProcessor = InterruptionProcessor(time_interval=60, min_speed=2,\n                                              overpass_api_url=\"url_to_overpass_api\")\n\n\"\"\"\nIf classify is set to true, also discover if interruptions are close to intersections. Returns a list of [ExerciseEvent]\n\"\"\"\nevents = interruptionProcessor.events(tcx_data, True)\n```\n\n### Overpy (Overpass API) node manipulation\nGenerate TCXFile parsed like data object from overpy.Node objects\n```python\nimport overpy\nfrom sport_activities_features.overpy_node_manipulation import OverpyNodesReader\n\n# External service Overpass API (https://wiki.openstreetmap.org/wiki/Overpass_API) (can be self-hosted)\noverpass_api = \"https://lz4.overpass-api.de/api/interpreter\"\n\n# External service Open Elevation API (https://api.open-elevation.com/api/v1/lookup) (can be self-hosted)\nopen_elevation_api = \"https://api.open-elevation.com/api/v1/lookup\"\n\n# OSM Way (https://wiki.openstreetmap.org/wiki/Way)\nopen_street_map_way = 164477980\n\noverpass_api = overpy.Overpass(url=overpass_api)\n\n# Get an example Overpass way\nq = f\"\"\"(way({open_street_map_way});<;);out geom;\"\"\"\nquery = overpass_api.query(q)\n\n# Get nodes of an Overpass way\nnodes = query.ways[0].get_nodes(resolve_missing=True)\n\n# Extract basic data from nodes (you can, later on, use Hill Identification and Hill Data Extraction on them)\noverpy_reader = OverpyNodesReader(open_elevation_api=open_elevation_api)\n# Returns {\n#         'positions': positions, 'altitudes': altitudes, 'distances': distances, 'total_distance': total_distance\n#         }\ndata = overpy_reader.read_nodes(nodes)\n```\n### Missing elevation data extraction\n```python\nfrom sport_activities_features import ElevationIdentification\nfrom sport_activities_features import TCXFile\n\ntcx_file = TCXFile()\ntcx_exercise = tcx_file.read_one_file(\"path_to_the_file\")\ntcx_data = tcx_file.extract_activity_data(tcx_exercise)\n\nelevations = ElevationIdentification(tcx_data['positions'])\n\"\"\"Adds tcx_data['elevation'] = eg. [124, 21, 412] for each position\"\"\"\ntcx_data.update({'elevations':elevations})\n```\n\n### Example of a visualization of the area detection\n\n![Area Figure](https://i.imgur.com/Iz8Ga3B.png)\n\n### Example of visualization of dead-end identification\n![Dead End Figure](https://imgur.com/LgZzCFS.png)\n\n## \ud83d\udd11 License\n\nThis package is distributed under the MIT License. This license can be found online at <http://www.opensource.org/licenses/MIT>.\n\n## Disclaimer\n\nThis framework is provided as-is, and there are no guarantees that it fits your purposes or that it is bug-free. Use it at your own risk!\n\n## \ud83d\udcc4 Cite us\n\nI. Jr. Fister, L. Luka\u010d, A. Raj\u0161p, I. Fister, L. Pe\u010dnik and D. Fister, \"[A minimalistic toolbox for extracting features from sport activity files](http://iztok-jr-fister.eu/static/publications/294.pdf)\", 2021 IEEE 25th International Conference on Intelligent Engineering Systems (INES), 2021, pp. 121-126, doi: [10.1109/INES52918.2021.9512927](http://dx.doi.org/10.1109/INES52918.2021.9512927).\n\n## \ud83d\udcd6 Further read\n\n[1] [Awesome Computational Intelligence in Sports](https://github.com/firefly-cpp/awesome-computational-intelligence-in-sports)\n\n## \ud83d\udd17 Related frameworks\n\n[1] [AST-Monitor: A wearable Raspberry Pi computer for cyclists](https://github.com/firefly-cpp/AST-Monitor)\n\n[2] [TCXReader.jl: Julia package designed for parsing TCX files](https://github.com/firefly-cpp/TCXReader.jl)\n\n[3] [TCXWriter: A Tiny Library for writing/creating TCX files on Arduino](https://github.com/firefly-cpp/tcxwriter)\n\n## \ud83e\udec2 Contributors\n\nThanks go to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n  <tbody>\n    <tr>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/alenrajsp\"><img src=\"https://avatars.githubusercontent.com/u/27721714?v=4?s=100\" width=\"100px;\" alt=\"alenrajsp\"/><br /><sub><b>alenrajsp</b></sub></a><br /><a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=alenrajsp\" title=\"Code\">\ud83d\udcbb</a> <a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=alenrajsp\" title=\"Tests\">\u26a0\ufe0f</a> <a href=\"#example-alenrajsp\" title=\"Examples\">\ud83d\udca1</a> <a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=alenrajsp\" title=\"Documentation\">\ud83d\udcd6</a> <a href=\"#ideas-alenrajsp\" title=\"Ideas, Planning, & Feedback\">\ud83e\udd14</a> <a href=\"https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3Aalenrajsp\" title=\"Bug reports\">\ud83d\udc1b</a> <a href=\"#maintenance-alenrajsp\" title=\"Maintenance\">\ud83d\udea7</a></td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"http://www.iztok-jr-fister.eu/\"><img src=\"https://avatars.githubusercontent.com/u/1633361?v=4?s=100\" width=\"100px;\" alt=\"Iztok Fister Jr.\"/><br /><sub><b>Iztok Fister Jr.</b></sub></a><br /><a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=firefly-cpp\" title=\"Code\">\ud83d\udcbb</a> <a href=\"https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3Afirefly-cpp\" title=\"Bug reports\">\ud83d\udc1b</a> <a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=firefly-cpp\" title=\"Tests\">\u26a0\ufe0f</a> <a href=\"#example-firefly-cpp\" title=\"Examples\">\ud83d\udca1</a> <a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=firefly-cpp\" title=\"Documentation\">\ud83d\udcd6</a> <a href=\"#ideas-firefly-cpp\" title=\"Ideas, Planning, & Feedback\">\ud83e\udd14</a> <a href=\"#mentoring-firefly-cpp\" title=\"Mentoring\">\ud83e\uddd1\u200d\ud83c\udfeb</a> <a href=\"#platform-firefly-cpp\" title=\"Packaging/porting to new platform\">\ud83d\udce6</a> <a href=\"#maintenance-firefly-cpp\" title=\"Maintenance\">\ud83d\udea7</a> <a href=\"#data-firefly-cpp\" title=\"Data\">\ud83d\udd23</a></td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/luckyLukac\"><img src=\"https://avatars.githubusercontent.com/u/73126820?v=4?s=100\" width=\"100px;\" alt=\"luckyLukac\"/><br /><sub><b>luckyLukac</b></sub></a><br /><a href=\"#ideas-luckyLukac\" title=\"Ideas, Planning, & Feedback\">\ud83e\udd14</a> <a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=luckyLukac\" title=\"Code\">\ud83d\udcbb</a> <a href=\"https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3AluckyLukac\" title=\"Bug reports\">\ud83d\udc1b</a> <a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=luckyLukac\" title=\"Tests\">\u26a0\ufe0f</a> <a href=\"#example-luckyLukac\" title=\"Examples\">\ud83d\udca1</a></td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/rhododendrom\"><img src=\"https://avatars.githubusercontent.com/u/3198785?v=4?s=100\" width=\"100px;\" alt=\"rhododendrom\"/><br /><sub><b>rhododendrom</b></sub></a><br /><a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=rhododendrom\" title=\"Code\">\ud83d\udcbb</a> <a href=\"#design-rhododendrom\" title=\"Design\">\ud83c\udfa8</a> <a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=rhododendrom\" title=\"Documentation\">\ud83d\udcd6</a> <a href=\"#ideas-rhododendrom\" title=\"Ideas, Planning, & Feedback\">\ud83e\udd14</a></td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/lukapecnik\"><img src=\"https://avatars.githubusercontent.com/u/23029992?v=4?s=100\" width=\"100px;\" alt=\"Luka Pe\u010dnik\"/><br /><sub><b>Luka Pe\u010dnik</b></sub></a><br /><a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=lukapecnik\" title=\"Code\">\ud83d\udcbb</a> <a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=lukapecnik\" title=\"Documentation\">\ud83d\udcd6</a> <a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=lukapecnik\" title=\"Tests\">\u26a0\ufe0f</a> <a href=\"https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3Alukapecnik\" title=\"Bug reports\">\ud83d\udc1b</a></td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/spelap\"><img src=\"https://avatars.githubusercontent.com/u/19300429?v=4?s=100\" width=\"100px;\" alt=\"spelap\"/><br /><sub><b>spelap</b></sub></a><br /><a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=spelap\" title=\"Code\">\ud83d\udcbb</a></td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"http://carlosal1015.github.io\"><img src=\"https://avatars.githubusercontent.com/u/21283014?v=4?s=100\" width=\"100px;\" alt=\"Oromion\"/><br /><sub><b>Oromion</b></sub></a><br /><a href=\"#maintenance-carlosal1015\" title=\"Maintenance\">\ud83d\udea7</a> <a href=\"https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3Acarlosal1015\" title=\"Bug reports\">\ud83d\udc1b</a></td>\n    </tr>\n    <tr>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/KoprivcLuka\"><img src=\"https://avatars.githubusercontent.com/u/45632449?v=4?s=100\" width=\"100px;\" alt=\"Luka Koprivc\"/><br /><sub><b>Luka Koprivc</b></sub></a><br /><a href=\"https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3AKoprivcLuka\" title=\"Bug reports\">\ud83d\udc1b</a></td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/garyjellyarms\"><img src=\"https://avatars.githubusercontent.com/u/79595804?v=4?s=100\" width=\"100px;\" alt=\"Nejc Graj\"/><br /><sub><b>Nejc Graj</b></sub></a><br /><a href=\"https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3Agaryjellyarms\" title=\"Bug reports\">\ud83d\udc1b</a></td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/Mtvrt123\"><img src=\"https://avatars.githubusercontent.com/u/50879568?v=4?s=100\" width=\"100px;\" alt=\"MlinaricNejc\"/><br /><sub><b>MlinaricNejc</b></sub></a><br /><a href=\"https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3AMtvrt123\" title=\"Bug reports\">\ud83d\udc1b</a></td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/KukovecRok\"><img src=\"https://avatars.githubusercontent.com/u/33880044?v=4?s=100\" width=\"100px;\" alt=\"Tatookie\"/><br /><sub><b>Tatookie</b></sub></a><br /><a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=KukovecRok\" title=\"Code\">\ud83d\udcbb</a> <a href=\"https://github.com/firefly-cpp/sport-activities-features/issues?q=author%3AKukovecRok\" title=\"Bug reports\">\ud83d\udc1b</a> <a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=KukovecRok\" title=\"Tests\">\u26a0\ufe0f</a> <a href=\"#example-KukovecRok\" title=\"Examples\">\ud83d\udca1</a> <a href=\"#maintenance-KukovecRok\" title=\"Maintenance\">\ud83d\udea7</a></td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/zala-lahovnik\"><img src=\"https://avatars.githubusercontent.com/u/105444201?v=4?s=100\" width=\"100px;\" alt=\"Zala Lahovnik\"/><br /><sub><b>Zala Lahovnik</b></sub></a><br /><a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=zala-lahovnik\" title=\"Documentation\">\ud83d\udcd6</a> <a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=zala-lahovnik\" title=\"Code\">\ud83d\udcbb</a></td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/lahovniktadej\"><img src=\"https://avatars.githubusercontent.com/u/57890734?v=4?s=100\" width=\"100px;\" alt=\"Tadej Lahovnik\"/><br /><sub><b>Tadej Lahovnik</b></sub></a><br /><a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=lahovniktadej\" title=\"Documentation\">\ud83d\udcd6</a></td>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/HlisTilen\"><img src=\"https://avatars.githubusercontent.com/u/44733158?v=4?s=100\" width=\"100px;\" alt=\"HlisTilen\"/><br /><sub><b>HlisTilen</b></sub></a><br /><a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=HlisTilen\" title=\"Documentation\">\ud83d\udcd6</a></td>\n    </tr>\n    <tr>\n      <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/MihaMi27\"><img src=\"https://avatars.githubusercontent.com/u/82605811?v=4?s=100\" width=\"100px;\" alt=\"Miha Mirt\"/><br /><sub><b>Miha Mirt</b></sub></a><br /><a href=\"https://github.com/firefly-cpp/sport-activities-features/commits?author=MihaMi27\" title=\"Code\">\ud83d\udcbb</a></td>\n    </tr>\n  </tbody>\n</table>\n\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome!\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A minimalistic toolbox for extracting features from sport activity files",
    "version": "0.5.0",
    "project_urls": {
        "Documentation": "https://sport-activities-features.readthedocs.io/en/latest/",
        "Homepage": "https://github.com/firefly-cpp/sport-activities-features",
        "Repository": "https://github.com/firefly-cpp/sport-activities-features"
    },
    "split_keywords": [
        "computational intelligence",
        " cycling",
        " data mining",
        " datasets",
        " gpx",
        " optimization",
        " sport activities",
        " tcx"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0cbd45a4132628059b353e6d9341eb45c8ab934cf4627124f1cf4aede729e951",
                "md5": "5b21cd145072b01c90f571cf6d72a118",
                "sha256": "c6e048b0874dc38ada661c08162884cf331c7ce49da7c47989abb0e4bda0824f"
            },
            "downloads": -1,
            "filename": "sport_activities_features-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5b21cd145072b01c90f571cf6d72a118",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0.0,>=3.9.0",
            "size": 60433,
            "upload_time": "2024-12-18T18:23:02",
            "upload_time_iso_8601": "2024-12-18T18:23:02.845999Z",
            "url": "https://files.pythonhosted.org/packages/0c/bd/45a4132628059b353e6d9341eb45c8ab934cf4627124f1cf4aede729e951/sport_activities_features-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bfb9d7fa96a69efcd98e7977dbc4e45c9b6f7adedb69bf235fe884cf1dfa9877",
                "md5": "4107d8f7bb68d86bab6114b9cedc1225",
                "sha256": "8ffdba5506bbe9b717853c37b6ebb22bf1b20ec9a5e45cc4b028e2795713133f"
            },
            "downloads": -1,
            "filename": "sport_activities_features-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4107d8f7bb68d86bab6114b9cedc1225",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0.0,>=3.9.0",
            "size": 57534,
            "upload_time": "2024-12-18T18:23:05",
            "upload_time_iso_8601": "2024-12-18T18:23:05.867430Z",
            "url": "https://files.pythonhosted.org/packages/bf/b9/d7fa96a69efcd98e7977dbc4e45c9b6f7adedb69bf235fe884cf1dfa9877/sport_activities_features-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-18 18:23:05",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "firefly-cpp",
    "github_project": "sport-activities-features",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "matplotlib",
            "specs": [
                [
                    ">=",
                    "3.3.3"
                ]
            ]
        },
        {
            "name": "geopy",
            "specs": [
                [
                    ">=",
                    "2.0.0"
                ]
            ]
        },
        {
            "name": "overpy",
            "specs": [
                [
                    ">=",
                    "0.6"
                ]
            ]
        },
        {
            "name": "geotiler",
            "specs": [
                [
                    ">=",
                    "0.14.5"
                ]
            ]
        },
        {
            "name": "numpy",
            "specs": [
                [
                    "==",
                    "1.24"
                ]
            ]
        },
        {
            "name": "tcxreader",
            "specs": [
                [
                    ">=",
                    "0.4.4"
                ]
            ]
        },
        {
            "name": "pandas",
            "specs": [
                [
                    "==",
                    "1.5.3"
                ]
            ]
        },
        {
            "name": "niaaml",
            "specs": [
                [
                    "==",
                    "1.1.11"
                ]
            ]
        },
        {
            "name": "tcx2gpx",
            "specs": [
                [
                    "==",
                    "0.1.4"
                ]
            ]
        },
        {
            "name": "gpxpy",
            "specs": [
                [
                    ">=",
                    "1.4.2"
                ]
            ]
        },
        {
            "name": "ruff",
            "specs": [
                [
                    "==",
                    "0.0.292"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    ">=",
                    "7.2.2"
                ]
            ]
        }
    ],
    "lcname": "sport-activities-features"
}
        
Elapsed time: 0.39058s