Git Product home page Git Product logo

vizbref's Introduction

VizBREF

Preview


Data Source

     

About

A website to automatically generate visualizations of comparisons between 2 football players with data scraped from fbref website. Scraping, data cleaning, data aggregation, and visualizations are done automatically at the backend. Players covered are players listed from fbref data from 5 leagues: Premier League, La Liga, Bundesliga, Serie A, and Ligue 1, in season 2021/2022 (May of 2022).

The seasons for comparison are based upon the last few seasons 2 players shared together (e.g. if player A data have been tracked since 2014/2015 and player B data have been tracked from 2017/2018 then the earliest season the comparison can be plotted is from season 2017/2018 onwards). If there is a season in the plot where 1 player have a plot for that season while the other don't (or both don't) then either the value for that season is really 0 or the metric/data (probably) haven't been computed yet at that time for that player(s), which is the most cases.

Categories

There are four categories available for comparisons, each with their own metrics:

  • Standard Statistic
    • Minutes Played
    • Starts
    • Matches Played
    • 90s
    • Starts Stack (stacked bar chart for Starter and non-Starter Matches Played)
    • Expected Goals (xG)
    • Expected non-Penalty Goals (npxG)
    • Expected Assists (xA)
    • Expected non-Penalty Goals + Expected Assists (npxG+xA)
  • Shooting
    • Goals
    • Shots
    • Shots on Target
    • Shots on Target rate
    • Shots per 90
    • Shots on Target per 90
    • Goals per Shots
    • Goals per Shots on Target
    • Average Distance of Shots Taken from Goal
    • Goals Stack (stacked bar chart for Goals + non-Penalty Goals)
    • Expected Goals
    • Expected non-Penalty Goals
    • Goals - Expected Goals
    • Goals - Expected Goals (non-Penalty)
  • Passing
    • Total/Short/Medium/Long Passes Completed
    • Total/Short/Medium/Long Passes Attempted
    • Total/Short/Medium/Long Pass Completion rate
    • Total Passes Distance
    • Total Progressive Passes Distance
    • Assists
    • Expected Assists
    • Assists - Expected Assists
    • Final Third Passes
    • Passes into Penalty Area
    • Cross into Penalty Area
    • Progressive Passes
  • Defensive Actions
    • Tackles Made
    • Tackles Won
    • Tackles in Defensive/Middle/Attacking Third
    • Tackles Area Stack (stacked bar chart for tackles made in each 3rd)
    • Dribblers Tackled
    • Tackle Attempt Against Dribblers
    • Tackles Against Dribblers Success rate
    • Dribbled Past
    • Tackle Attempts Against Dribblers Stack
    • Pressure Attempts
    • Press Success
    • Press Success rate
    • Pressure Stack (stacked bar chart for succeed and failed pressures)
    • Pressures in Defensive/Middle/Attacking 3rd
    • Pressure Area Stack (stacked bar chart for pressures made in each 3rd)
    • Blocks Made
    • Shots Blocked
    • Shots on Target Blocked
    • Passes Blocked
    • Interceptions Made
    • Tackles + Interceptions Made
    • Clearences
    • Errors Leading to Opponent's Shots

How it works

  1. User will choose 2 players to compare
  2. The backend will find fbref's id for each player from internal reference
  3. Once retrieved, the backend will scrap their data from fbref's player page
  4. The scraped data will be cleaned, aggregated, and then plotted automatically
  5. Each plot will be sent as encoded data (with io and base64 modules)
  6. The plots will be displayed as images in the HTML page

Tools and libraries used

  • Django
  • Pandas
  • Numpy
  • Matplotlib
  • Beautifulsoup4
  • Request
  • Git
  • Gunicorn
  • Heroku

vizbref's People

Contributors

rinogrego avatar

Watchers

 avatar

Forkers

p-dhruva-teja

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.