Skip to content
Create a pitch plot ready for Statsbomb data
Branch: master
Clone or download
Latest commit 9dcb4f8 Jun 19, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
R Update pitchCreate.R Jun 19, 2018
images Add files via upload Jun 13, 2018
man Update create_Pitch.Rd Jun 19, 2018
DESCRIPTION Update DESCRIPTION Jun 13, 2018
NAMESPACE
README.md Update README.md Jun 13, 2018

README.md

SBpitch

Statsbomb have released a free dataset to help the public get used to their data product but also provide data to kick start people's journey into football analytics.

To help people on their journey I have created a R package that creates customisable plots of pitches in ggplot2 that allows event data to be plotted on top.

I have also created some tutorials to help others explore the data.

Installation

Installation is straight forward via the devtools package and the install_github() function.

devtools::install_github("FCrSTATS/SBpitch")

The Default Plot

The package offers lots of customisable features but the default plot.

create_Pitch()

Variables to Customise

Basic Features

create_Pitch(BasicFeatures = TRUE)

Middle Third Shading

create_Pitch(middlethird = TRUE))

Box Type

Line Design

create_Pitch(goaltype = "line")

Box Design

create_Pitch(goaltype = "box")

Barca Numbers Design

create_Pitch(goaltype = "barcanumbers")

Juego de Posicion

create_Pitch(JdeP = TRUE)

Colour Schemes

There are 4 colours that you can adjust

Blue Example

create_Pitch(grass_colour = "#224C56", 
line_colour =  "#B3CED9", 
background_colour = "#224C56", 
goal_colour = "#15393D")

Night Example

create_Pitch(grass_colour = "#202020", 
line_colour =  "#797876", 
background_colour = "#202020", 
goal_colour = "#131313")

Green Example

create_Pitch(grass_colour = "#538032", 
line_colour =  "#ffffff", 
background_colour = "#538032", 
goal_colour = "#000000")

You can’t perform that action at this time.