Data Product for English Premier League Players

A project submitted for Module 9

Han Yunxi

Introduction

How to use (1/2)

The data app contains 3 'R' files and 1 'data' folder. Below are the selected important r codes.

  • ui.R
# This code snippet calls the server.R 'renderUI' functions to get the team & player
uiOutput("teamControl"); uiOutput("playerControl")
dataTableOutput(outputId="dTable")  #outputs the datatable        
  • data_prepare.R
# This code takes in the team & player inputs from ui.R
groupByPlayer <- function(data, teamSelected, playerSelected){
  result <- groupByTeam(data, teamSelected)
  result <- result %>% filter(player_surname == playerSelected)
  return(result)}

How to use (2/2)

The data app contains 3 'R' files and 1 'data' folder. Below are the selected important r codes.

  • server.R
# Prepare Dataset with reactive function
  dataTable <- reactive({groupByPlayer(data, input$teams, input$players)})  

# Render data table
  output$dTable <- renderDataTable({dataTable()})

To start the app: https://espeno.shinyapps.io/EPLGoals/

Future improvements

Should time permit, propose to improve on the data app to provide more analysis in the following areas:

  1. Summary of the player's aggregate performances

  2. Drilldown of defender, mid-field, and attacking players

  3. Prediction of a player's probability to score goals in which time interval during 90 mins, areas most contributed, passing, heading, crossing abilities etc.

** end **