项目作者: statsbomb

项目描述 :
Python package that helps you visualize football data :soccer:
高级语言: Python
项目地址: git://github.com/statsbomb/socplot.git
创建时间: 2019-01-06T16:19:03Z
项目社区:https://github.com/statsbomb/socplot

开源协议:

下载


Socplot

Socplot is a python 3 package that helps you visualize football data. [WIP]

Why Socplot?

  • Made by football enthusiast.
  • Fully configurable in terms of dimensions, colors and types.
  • Lightweight and Flexibility: Socplot is built on top of matplotlib. You have full control.
  • Straightforward: Socplot has many built in figures that gets you directly to the point.

Pressure heat map

pressures position heat map for an example match

Pass map

pass map for selected time window in an example match

first 15 mins passes in an example match

Example

  1. code snippet used to generate the last image
  2. import pandas as pd
  3. from socplot.pitch import Pitch
  4. pitch = Pitch()
  5. # load the passes dataset
  6. for _, row in passes.iterrows():
  7. pitch.plot_pass(row['sx'], row['sy']],[row['ex'], row['ey']] , row['type'])
  8. pitch.heat_map(df['sx'], df['sx'], color='tan')

__

Installation

pip installtion coming soon

Dev Installation

  1. # fork the repo
  2. cd socplot
  3. virtualenv -p python3 env
  4. source env/bin/activate
  5. pip install -r requirements.txt

LICENCE

ArqamFc/Socplot licensed under the Apache License 2.0.