Skip to main content

docs

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

# directly from test pypi
$ pip install -i https://test.pypi.org/simple/ socceranalysis

Installation may take some time, please be patient

Usage

Use this link to download the dataset: https://github.com/UBC-MDS/socceranalysis_python/blob/main/soccer_data.xlsx

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

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.playerranking import *
data = pd.read_excel('soccer_data.xlsx')
rankingplayers(data, "Goals_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.

Metadata

Release files for socceranalysis 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for socceranalysis 0.1.6
File Size Uploaded Provenance Actions
socceranalysis-0.1.6.tar.gz 7.3 kB Without provenance Details for socceranalysis-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for socceranalysis 0.1.6
File Interpreter ABI Platform Actions
socceranalysis-0.1.6-py3-none-any.whl Python 3 none any Details for socceranalysis-0.1.6-py3-none-any.whl

Total release size: 15.2 kB

Release files / socceranalysis-0.1.6.tar.gz

Download URL socceranalysis-0.1.6.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4745509d6ae47bcbcb5015f1f03df662afdb34dbdb0af7decfe4a772dbbfb270
BLAKE2b-256 checksum
How to use checksums
e6372db0dd027466f7e75e5a41b64809bd26b07dbf7c10382aa3152bc3534504
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.1

Release files / socceranalysis-0.1.6-py3-none-any.whl

Download URL socceranalysis-0.1.6-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c458e1535bf6fe3f2c155600587e212968c03c3e9642061217aa22d3c55dacb
BLAKE2b-256 checksum
How to use checksums
dc57a913d12797aa2ba24339404addf124ef0d721126688c086437e3b0e34751
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.1

Security for socceranalysis 0.1.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page