NorthPitch is a python soccer plotting library that sits on top of Matplotlib

Overview

NorthPitch

NorthPitch is a python soccer plotting library that sits on top of Matplotlib.

Install:

pip install git+https://github.com/devinpleuler/northpitch.git

Basic Example:

from northpitch.pitch import Pitch

fig, ax = plt.subplots(figsize=(15,9))
ax.set_axis_off()

pitch = Pitch()
pitch.create_pitch(ax)

plt.ylim(pitch.ylim)
plt.xlim(pitch.xlim)

plt.show()

alt text

Surface Example:

from northpitch.pitch import draw_tracking_frame
from northpitch.pitch import overlay_surface

frame = tracking_frames[n]
surface = pitch_control_function(frame)

fig, ax = draw_tracking_frame(frame, deltas=True, title="NorthPlotter example")
contours = overlay_surface(ax, surface)

plt.colorbar(contours, ax=ax)
plt.show()

Note: Provide your own list of tracking frames, and pitch control function. Sorry.

alt text

Field Size Examples

import matplotlib.pyplot as plt
from northpitch.pitch import Pitch

fig, ax = plt.subplots()
pitch = Pitch(length=110, width=70) # FIFA Minimum
pitch.create_pitch(ax)
passes = [(30,60, 20,25), (40,20, 30,50)]
pitch.draw_lines(ax, passes)
plt.ylim(pitch.ylim)
plt.xlim(pitch.xlim)
plt.show()

alt text

import matplotlib.pyplot as plt
from northpitch.pitch import Pitch

fig, ax = plt.subplots()
pitch = Pitch(length=130, width=80) # FIFA Maximum
pitch.create_pitch(ax)
passes = [(30,60, 20,25), (40,20, 30,50)]
pitch.draw_lines(ax, passes)
plt.ylim(pitch.ylim)
plt.xlim(pitch.xlim)
plt.show()

alt text

Scale Examples

import matplotlib.pyplot as plt
from northpitch.pitch import Pitch

fig, ax = plt.subplots()
pitch = Pitch(scale=(100, 100)) # Default (Opta)
pitch.create_pitch(ax)
passes = [(50,50, 60,40)]
pitch.draw_lines(ax, passes)
plt.ylim(pitch.ylim)
plt.xlim(pitch.xlim)
plt.show()

alt text

import matplotlib.pyplot as plt
from northpitch.pitch import Pitch

fig, ax = plt.subplots()
pitch = Pitch(scale=(120, 80)) # (StatsBomb)
pitch.create_pitch(ax)
passes = [(50,50, 60,40)]
pitch.draw_lines(ax, passes)
plt.ylim(pitch.ylim)
plt.xlim(pitch.xlim)
plt.show()

alt text

Owner
Devin Pleuler
@TorontoFC, Analytics
Devin Pleuler
Time series visualizer is a flexible extension that provides filling world map by country from real data.

Time-series-visualizer Time series visualizer is a flexible extension that provides filling world map by country from csv or json file. You can know d

Long Ng 3 Jul 09, 2021
Python wrapper for Synoptic Data API. Retrieve data from thousands of mesonet stations and networks. Returns JSON from Synoptic as Pandas DataFrame

☁ Synoptic API for Python (unofficial) The Synoptic Mesonet API (formerly MesoWest) gives you access to real-time and historical surface-based weather

Brian Blaylock 23 Jan 06, 2023
Automatization of BoxPlot graph usin Python MatPlotLib and Excel

BoxPlotGraphAutomation Automatization of BoxPlot graph usin Python / Excel. This file is an automation of BoxPlot-Graph using python graph library mat

EricAugustin 1 Feb 07, 2022
An interactive dashboard for visualisation, integration and classification of data using Active Learning.

AstronomicAL An interactive dashboard for visualisation, integration and classification of data using Active Learning. AstronomicAL is a human-in-the-

45 Nov 28, 2022
Tools for calculating and visualizing Elo-like ratings of MLB teams using Retosheet data

Overview This project uses historical baseball games data to calculate an Elo-like rating for MLB teams based on regular season match ups. The Elo rat

Lukas Owens 0 Aug 25, 2021
Splore - a simple graphical interface for scrolling through and exploring data sets of molecules

Scroll through and exPLORE molecule sets The splore framework aims to offer a si

3 Jun 18, 2022
Editor and Presenter for Manim Generated Content.

Editor and Presenter for Manim Generated Content. Take a look at the Working Example. More information can be found on the documentation. These Browse

Manim Community 149 Dec 29, 2022
Dipto Chakrabarty 7 Sep 06, 2022
GDSHelpers is an open-source package for automatized pattern generation for nano-structuring.

GDSHelpers GDSHelpers in an open-source package for automatized pattern generation for nano-structuring. It allows exporting the pattern in the GDSII-

Helge Gehring 76 Dec 16, 2022
Visualizing weather changes across the world using third party APIs and Python.

WEATHER FORECASTING ACROSS THE WORLD Overview Python scripts were created to visualize the weather for over 500 cities across the world at varying di

G Johnson 0 Jun 12, 2021
Farhad Davaripour, Ph.D. 1 Jan 05, 2022
Focus on Algorithm Design, Not on Data Wrangling

The dataTap Python library is the primary interface for using dataTap's rich data management tools. Create datasets, stream annotations, and analyze model performance all with one library.

Zensors 37 Nov 25, 2022
Python Package for CanvasXpress JS Visualization Tools

CanvasXpress Python Library About CanvasXpress for Python CanvasXpress was developed as the core visualization component for bioinformatics and system

Dr. Todd C. Brett 5 Nov 07, 2022
Here I plotted data for the average test scores across schools and class sizes across school districts.

HW_02 Here I plotted data for the average test scores across schools and class sizes across school districts. Average Test Score by Race This graph re

7 Oct 27, 2021
Implementation of SOMs (Self-Organizing Maps) with neighborhood-based map topologies.

py-self-organizing-maps Simple implementation of self-organizing maps (SOMs) A SOM is an unsupervised method for learning a mapping from a discrete ne

Jonas Grebe 6 Nov 22, 2022
GUI for visualization and interactive editing of SMPL-family body models ie. SMPL, SMPL-X, MANO, FLAME.

Body Model Visualizer Introduction This is a simple Open3D-based GUI for SMPL-family body models. This GUI lets you play with the shape, expression, a

Muhammed Kocabas 207 Jan 01, 2023
Domain Connectivity Analysis Tools to analyze aggregate connectivity patterns across a set of domains during security investigations

DomainCAT (Domain Connectivity Analysis Tool) Domain Connectivity Analysis Tool is used to analyze aggregate connectivity patterns across a set of dom

DomainTools 34 Dec 09, 2022
Extract data from ThousandEyes REST API and visualize it on your customized Grafana Dashboard.

ThousandEyes Grafana Dashboard Extract data from the ThousandEyes REST API and visualize it on your customized Grafana Dashboard. Deploy Grafana, Infl

Flo Pachinger 16 Nov 26, 2022
`charts.css.py` brings `charts.css` to Python. Online documentation and samples is available at the link below.

charts.css.py charts.css.py provides a python API to convert your 2-dimension data lists into html snippet, which will be rendered into charts by CSS,

Ray Luo 3 Sep 23, 2021
A data visualization curriculum of interactive notebooks.

A data visualization curriculum of interactive notebooks, using Vega-Lite and Altair. This repository contains a series of Python-based Jupyter notebooks.

UW Interactive Data Lab 1.2k Dec 30, 2022