Code Monkey home page Code Monkey logo

sofascoreplayercardanalysis's Introduction

Football Match Analyzer for Player Card Betting

Welcome to my first personal Python project that I'm excited to share. As someone who's been diving into Python, particularly web scraping and data analysis with libraries like pandas, I've created a tool that caters to my interest in systematic player card betting in football (soccer) matches. This project is made just for fun and for learning purposes.

Project Overview

This project serves as a Web Scraper and Analyzer tailored for football matches sourced from SofaScore. During my free time, I've developed a penchant for making calculated bets on player cards. While I initially followed betting tips on platforms like Twitter, I found the idea of creating my own model both intriguing and empowering. And thus, this project came into being.

What the Model Does

Data Collection: The getgames.py script scrapes SofaScore for matches scheduled on the current day. It focuses on fetching games from notable leagues such as the Premier League, Champions League, La Liga, and Serie A (my preference of leagues). The script requires a valid date format specified in check_game_date.txt, which the model uses to determine the last accessed date. The output is a comprehensive CSV file containing game data and referee Card per Game (CPG) statistics. Game Analysis: The model subsequently traverses through the collected games and verifies if the lineups have been confirmed. Confirmation typically occurs an hour before kickoff. Once lineup confirmation is obtained, the model generates individual XLSX files for each match. These files contain essential player statistics pertinent to card betting, including fouls per game, tackles per game, and cards per game. In-depth Analysis: The GameAnalysis.py script steps in to analyze the match-specific XLSX files. Leveraging fundamental statistics, it identifies significant mean outliers within the match and presents the top 9 players accordingly. Betting Strategy: Armed with insights, I wager 2% of my account balance on each match. My betting strategy usually involves crafting mixed player bets and engaging in some ambitious double-double longshots. These decisions are guided by the analysis from the XLSX files and the lineup data. Automation and Frequency

To ensure that my model is as up-to-date as possible, I've scheduled it to run on a 15-minute interval using crontab. This ensures that I have access to the latest game information and statistics for informed betting decisions.

Feel free to explore the scripts and provide feedback. I would love to get some ideas on how to better analyse the data, as I think it could be done much better!

While my model has served my personal interests, remember that betting entails risks, and responsible gambling is essential.

Developed by Roho11

sofascoreplayercardanalysis's People

Watchers

 avatar  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.