A API Wrapper for Catapult Openfield System
Project description
CatapultPy
A lightweight Python wrapper for the Catapult Sports OpenField API. This package is modeled after CatapultR and is designed to make it easier to pull data into Python for analysis.
Table of Contents
Installation
Install via pip:
pip install CatapultPy
Basic Functions
token = ofCreateToken(api_key, region = "us")
Creates the token to call the API. Must include your region name being "us", "eu", "au", "cn".
ofGetActivities(token)
Returns a pandas dataframe of all of the activities.
ofGetAthletes(token)
Get a Pandas Dataframe of all the athletes within a dataframe.
ofGetParams(token)
Return a Pandas Dataframe of all paramaters.
Activity based Functions
ofGetActivitiesAthletes(token, activity_id)
Returns a Pandas dataframe of all the Athletes from within a activity. Must input the activity id.
ofGetActivitesPeriod(token, activity_id)
Return a Pandas dataframe of all the periods within an activity.
ofGetActivitiesTags(token, activity_id)
Return a Pandas dataframe of all the tags within a activity.
ofGetActivitiesDevices(token, acitvity_id)
Return a Pandas Dataframe of all the devices within a activity.
ofGetActivityEvents(token, activity_id, athlete_id, events = ["ima_jumps", "baseball_swing"])
Return a Pandas Dataframe of all the events for a single athlete in a activity. events must be listed in a list format.
ofGetActivityEfforts(token, activity_id, athlete_id, efforts= ['acceleration', 'velocity'])
Return a Pandas Dataframe of all the efforts for a single athlete in a activity. Effort can be acceleartion, velocity or both. It is defaulted as both.
Aggragated data
ofGetStats(token,
params = ["athlete_name", "date", "start_time", "end_time", "position_name",
"total_distance", "total_duration", "total_player_load", "max_vel",
"hsr_efforts", "max_heart_rate", "mean_heart_rate",
"period_id", "period_name", "activity_name"],
group_by = ["athlete", "period", "activity"],
filters = {
"name" : "activity_id",
"comparison" : "=",
"values" : ["activity_id_1", "activity_id_2"]
})
Returns a Pandas Dataframe of aggragated stats. params and group_by must be inputed as lists. Filters must be imputed as a dicitonary, values must be implemented as a list of activity_id's.
10Hz Data
ofGetActivity10hz(token, activity_id, athlete_id)
Returns a Pandas Dataframe of 10 Hz data of an athlete from within an activity.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file catapultpy-0.0.1.tar.gz.
File metadata
- Download URL: catapultpy-0.0.1.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8a136e5eea1004207500dd20d88da288264c715378ec5a677164464ae232d1d6
|
|
| MD5 |
4c55e5561733f93bd0fdf03f1e0ed184
|
|
| BLAKE2b-256 |
b9d97359268931e2c52643c3bbbe6cd63cf7b491ef0ce2cdfeda35bd075c38a1
|
File details
Details for the file catapultpy-0.0.1-py3-none-any.whl.
File metadata
- Download URL: catapultpy-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f0896cf280156e57d4bf885529b387d886f1f0e6ce8df316894847aee4a4414
|
|
| MD5 |
c001d31ad276edcd52467146933f7c52
|
|
| BLAKE2b-256 |
65d22d804ab61a7232614797348e8f1bcf34e021780f102332dbbab2184d646b
|