Giter Club home page Giter Club logo

sbpitch's Introduction

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")

sbpitch's People

Contributors

fcrstats avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar Dylan Redmond avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.