Skip to main content

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.

example animation

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:

  1. Basic Plots
  2. Animations
  3. Faceting
  4. Tips and Tricks

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

Metadata

Release files for ptplot 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ptplot 0.3.1
File Size Uploaded Provenance
ptplot-0.3.1.tar.gz 46.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ptplot 0.3.1
File Interpreter ABI Platform
ptplot-0.3.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 76.9 kB

Release files / ptplot-0.3.1.tar.gz

Download URL ptplot-0.3.1.tar.gz
Size 46.6 kB
Tags Source
SHA-256 checksum
How to use checksums
4d23b74bae59a217e37001fbcb3ef9a99b640e5c8dce504847f82697e46c149a
BLAKE2b-256 checksum
How to use checksums
0e121d256b20ebc15b6cb3101919e0a64326da0685b27394497b3468703b5eec
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / ptplot-0.3.1-py2.py3-none-any.whl

Download URL ptplot-0.3.1-py2.py3-none-any.whl
Size 30.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
435f47e5ce8114eebcea51244d71be5aaf20fb841aac5120d75756c2985dbd43
BLAKE2b-256 checksum
How to use checksums
59a8e88fedcdd34058fea9547b8cefbc275b9993e80d8f6145404f13007ad238
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for ptplot 0.3.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page