Skip to main content

Doing soccer stats analysis.

Project description

socceranalysis

socceranalysis is a powerful Python package designed to make it easy to analyze and understand soccer statistics. With its set of functions, you can quickly obtain summary statistics for a particular team, identify outliers based on market value, rank players by goals per game and display different plots. The package is built in a way that allows user to easily customize the functions to their own interests, giving them the flexibility to analyze the data in a way that is most meaningful to them. Whether you're a coach, a sports journalist or an analyst, socceranalysis will help you unlock the insights hidden in your soccer data and make more informed decisions.

Functions

  1. find_team_stat: provides a quick and easy way to understand the descriptive statistics of a team. (https://github.com/UBC-MDS/socceranalysis_python/blob/main/src/socceranalysis/find_team_stat.py)

  2. rankingplayers: Ranks players based on specific attributes (https://github.com/UBC-MDS/socceranalysis_python/blob/main/src/socceranalysis/playerranking.py)

  3. get_outliers: Identifes outliers using statistical methods (interquartile range or standard deviations) (https://github.com/UBC-MDS/socceranalysis_python/blob/main/src/socceranalysis/outlier_identification.py)

  4. soc_viz_stats : Generates meaningful visualizations to help users understand and interpret the data (https://github.com/UBC-MDS/socceranalysis_python/blob/main/src/socceranalysis/viz_stats.py)

  • soc_viz_stats_scatter : Generate a scatter plot for two given numeric columns with a slider to control age
  • soc_viz_stats_hist : Generate a histogram for one given numeric columns

Python ecosystem

socceranalysis can be used in conjunction with other popular Python packages such as pandas and scikit-learn to perform more advanced data analysis and machine learning tasks. For example, users can use pandas to manipulate and clean their soccer data, and then use this package to perform specific soccer-related analysis on the cleaned data. Additionally, socceranalysis can be used in conjunction with scikit-learn for machine learning tasks on soccer data. They are designed to be a higher-level, more user-friendly and declarative interface based on Altair for performing specific soccer-related analysis and visualization tasks. Users can perform similar visualization using matplotlib. Overall, socceranalysis is a valuable addition to the Python ecosystem as it provides a specialized tool for analyzing and understanding soccer data without the need for writing complex code, this can be especially useful for users who may not have extensive experience with data analysis or visualization.

Installation

$ pip install socceranalysis

Usage

find_team_stat

from socceranalysis.find_team_stat import *
data = pd.read_excel('soccer_data.xlsx')
find_team_stat(data , "Manchester United", "Market_Value_Euros")

get_outliers

data = pd.read_excel('soccer_data.xlsx')
from  socceranalysis.outlier_identification import get_outliers
get_outliers(data,"Wages_Euros","SD",3)

soc_viz_stats

Note: Keep the data file in the same working direcotry before import this function

from socceranalysis.viz_stats import *

# scatter plots of two given columns
soc_viz_stats_scatter('age','Goals_total', data)
# histogram of one given column
soc_viz_stats_hist('age', data)

playerranking

from socceranalysis.rankingplayers import *
data = pd.read_excel('soccer_data.xlsx')
rankingplayers(data, "Goals_total", "Assists_Total")

Contributors

Core contributor Github.com username
Flora Ouedraogo @florawendy19
Gaoxiang Wang @louiewang820
Manvir Kohli @manvirsingh96
Vincent Ho @vincentho32

Contributing

Authors: Vincent Ho, Manvir Singh Kohli, Gaoxiang Wang, Flora Ouedraogo.

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

socceranalysis was created by Gaoxiang Wang, Manvir Kohli, Vincent Ho and Flora Ouedraogo. It is licensed under the terms of the MIT license.

Credits

socceranalysis was created with cookiecutter and the py-pkgs-cookiecutter template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

socceranalysis-0.1.2.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

socceranalysis-0.1.2-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file socceranalysis-0.1.2.tar.gz.

File metadata

  • Download URL: socceranalysis-0.1.2.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for socceranalysis-0.1.2.tar.gz
Algorithm Hash digest
SHA256 de4daf3a8f160cca4a17d4e9b3cbbb6d2c02b3b94806d3874087eb3390cc4d53
MD5 7c94973482a05ab519271e8f2c5ca0fd
BLAKE2b-256 7c2a2e4ea5c00bd7bbe49bc84b563ee514090cea10733588c0e450c088f9e471

See more details on using hashes here.

File details

Details for the file socceranalysis-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: socceranalysis-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.1

File hashes

Hashes for socceranalysis-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c3e5380be7f6f966659d61cb2aecf1e53c576da8ec1a4c67181446cafa527dc0
MD5 dadc27b3b709ec25ce73c00de73e9df7
BLAKE2b-256 aec15c1df960716f9698e401742ade3980574978176c2c20f9fce4f7bd2b606b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page