8000 GitHub - agusrjs/futsal-pitch: This project uses the mplsoccer library to create a visual representation of a futsal pitch for use in sports data analysis, utilizing event data.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

This project uses the mplsoccer library to create a visual representation of a futsal pitch for use in sports data analysis, utilizing event data.

License

Notifications You must be signed in to change notification settings

agusrjs/futsal-pitch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Futsal Pitch

This project uses the mplsoccer library to create a visual representation of a futsal pitch, which has several differences from a regular football pitch, including its dimensions of 40 by 20 meters. Additionally, futsal has its own markings, as outlined in the FIFA rules Futsal Laws of the Game.

The goal of this project is to provide a script that can use this futsal pitch in sports data analysis, utilizing event data. The project includes a Jupyter notebook that demonstrates how to use this pitch for visualizing match data and performing analysis.

Futsal Pitch

The Script

This script defines a futsal class to represent a futsal pitch and its tactical features using matplotlib. The pitch can be drawn in both horizontal and vertical orientations and supports both full and half-pitch views. The code also includes adaptations needed for blind football.

Key functions of the futsal class:

  • _setup_ax: Initializes the plotting axes.
  • _draw_pitch: Handles the drawing of the pitch, including various features depending on the orientation (horizontal/vertical) and whether the full or half-pitch view is required.

Features of the Pitch:

  1. Outline: The outer boundary of the pitch is drawn as a rectangle.
  2. Center Circle: A circle at the center of the pitch.
  3. Penalty Spots: Circles representing the penalty spots on both sides of the pitch.
  4. Penalty Areas: Areas with arcs representing the penalty zones.
  5. Goals: Lines representing the goals on both sides of the pitch.
  6. Substitution Lines: Vertical lines indicating where substitutions can take place.
  7. Corners: Arcs drawn at each corner of the pitch.

Customization:

  • Orientation: The pitch can be drawn horizontally or vertically.
  • Half-Pitch: Option to draw only half the pitch (left/right or upper/lower).
  • Color: Option to change the background color of the pitch to blue and the lines to red for better visual clarity in blind football.

The Notebook

The data used for the visualization can be found here.

Attack Map

In this section, we visualize the attacks made by the two teams (ARG and CRC) during the match.

Attack Map

Pass Map

In this section, we present a pass map illustrating the passing patterns of the teams ARG and CRC during the match.

Pass Map

Heat Map

In this section, we present a heatmap of all events involving the Argentine team during the match.

Heatmap


Note: This script also includes a class for Blind Football based on this project. You can find the related code in this repository.

About

This project uses the mplsoccer library to create a visual representation of a futsal pitch for use in sports data analysis, utilizing event data.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0