Make beautiful plots of player tracking data
Project description
ptplot
ptplot
makes it easy to turn player-tracking data into beautiful,
interactive visualizations — including animations! These visualizations can be used to guide
data exploration/analysis work, or to embed in webpages to share with
the world.
Installation
ptplot
can be installed via pip:
$ pip install ptplot
It is strongly recommended that you install ptplot
into a virtual
environment, such as with conda
:
[After installing conda]
$ conda create -n player_tracking python=3
$ conda activate player_tracking
$ pip install ptplot
You may wish to install some of ptplot
's dependencies
via conda, specifically pandas
and bokeh
:
[After installing conda]
$ conda create -n player_tracking python=3 pandas bokeh
$ conda activate player_tracking
$ pip install ptplot
Getting Started
Making your first plot can be as simple as
import pandas as pd
from bokeh.plotting import show
from ptplot import PTPlot
from ptplot.nfl import Field
from ptplot.plot import Positions
data = pd.read_csv("YOUR PLAYER TRACKING DATA")
plot = PTPlot(data) + Field() + Positions("X_COORDINATE_COLUMN", "Y_COORDINATE_COLUMN")
show(plot.draw())
For additional documentation and examples, check out the
notebooks in the notebooks/
directory, which can be viewed
online with all of the plots correctly rendered via nbviewer:
Additionally, layers within ptplot
have docstrings with
more usage details. Those can be accessed either by reading the
source code or running help([FUNCTION])
inside of Python.
Development Docs
See here
Project details
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
File details
Details for the file ptplot-0.3.0.tar.gz
.
File metadata
- Download URL: ptplot-0.3.0.tar.gz
- Upload date:
- Size: 45.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4dd7e71fbaf4daeede961a60350e31352b5612948c956f3005382aa256e572d |
|
MD5 | 4f1f3a26ca7e3ef57abc05883b831bfa |
|
BLAKE2b-256 | 5b084d096878b35af752f88fd538da27ae7cb2b62dc8b6cdb8d36e0c7f81b367 |
File details
Details for the file ptplot-0.3.0-py2.py3-none-any.whl
.
File metadata
- Download URL: ptplot-0.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 29.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b3911013ace114af65937cfa2469d1d8246d6cb842464a795c546d361792b20 |
|
MD5 | 99222b1ddd4de04b5d720ab316297777 |
|
BLAKE2b-256 | 6661c093bc412f24b41c2222a84593a59e6441848490f0b51350f9bf080554fe |