Git Product home page Git Product logo

football-bfs's Introduction

Football BFS

Shows the shortest connection between Messi and a Goalkeeper

foo

This project is my attempt at a football version of - Oracle of bacon

Website also shows number of goals Messi has scored on a goal keeper across various competitions

football_stats

Shows the shortest connection between Messi and a Goalkeeper

Development setup

Tested on Python 3.10.8

Create virtual environment

python3 -m venv messi
source messi/bin/activate

Install dependencies

pip install --upgrade pip
pip install -r requirements.txt

Run web app

python app.py

# For football tree go to - 
`http://127.0.0.1:5050`

# For stats go to - 
`http://127.0.0.1:5050/stats`

create_player_data.py - Parses urls to extract information of clubs that a football player has belonged to Breadth first search code borrowed from - https://github.com/a8hay/kevin-bacon-bfs

API dashboard - https://dashboard.api-football.com/

TODOs -

  • Make website faster -
    • Use Parquet file format instead of csv for faster loading [ done ]
    • Donot load dataframe multiple times
    • Do not over use fuzzy matching
  • Expand across other players than Messi. That is make the reference player dynamic
  • Embed youtube video of latest goal vs goal keeper
  • Better error handling
  • Testing sripts
  • Create an ETL pipeline to update data dynamically
  • Move player vs detailed stats to another branch
  • Get pictures of players from "data/FIFA22_official_data.csv"

Known bugs -

  • Might require multiple refreshes to show connections for some players.
  • Need to update dataset to have more correct info on what clubs / national teams a player played for

Dataset credits w/t links

  1. Messi goals
  2. Which player played for what club / national team
  3. Player photo and national team crests

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.