R Masterclass
Harsh Krishna introduces you to R & RStudio and shows how they can be used with football event data.
In this will be an interactive, follow-along session, Harsh covers:
- Introduction to R and RStudio: What are R and RStudio? What are they used for? How can they be useful in a football context?
- Writing R code in RStudio: Starting from the basics of writing R code (defining variables, different data types, creating functions, if:else statements) all the way through to using functions for data manipulation and plotting.
- Creating event data visualisations: Creating visualisations using football event data. Creating a dashboard consisting of a pass map, shot map, heat map and convex hull.
- Automating visualisations: Creating a custom function to automate the dashboard.
- Understanding web apps with RShiny: RShiny is an R package that allows you to build interactive web apps through R. Harsh will explain what an RShiny app is, how it works and how it can be used to effectively present your work to colleagues who don’t have a data background.
This Google Drive has the resources you will need for the session:
You have:
- Installation instructions for R & R Studio (PDF): To follow-along, you will need to have installed R and R Studio on your computer. This document tells you how and also has instructions on how to install the packages that you will need during the session.
- Code: The raw code used during the session (event data and plot function). There is also additional code for building an RShiny app (more below).
- Data: Cleaned data used in the session (CSV file of Wyscout Event Data for the first 19 games played by each Premier League team in 2023/24).
- R Seminar Notes (PDF): Full follow-along notes for the Masterclass, including the code. There is also some supplementary information to take your knowledge even further.
- Shiny App Notes (PDF): Notes to help you build the RShiny app.
- Masterclass slides (PPT): Harsh’s slides from the session.
Read more
Set Pieces are a fundamental part of the modern game. In our Masterclass, former Newcastle United Analyst Billy Coulston will help improve your understanding, preparation & delivery of Set Pieces.
ChatGPT and other Large Language models are changing how we write and read texts. In this Masterclass, Professor David Sumpter will explain what they can and can’t do and show you how to make the most of the new technology in scouting.
Expected Goals (xG) is the most important machine learning model in football. Learn about it with renowned data scientist Professor David Sumpter, who has worked with leading football clubs and federations, including Ajax, Barcelona and England.