Skip to main content

points-table-simulator🔢

During the later part of the league stages in many multi-team tournaments 🏆 such as 🏏 Indian Premier League(IPL), Australian Big Bash League (BBL), ets., the fans will look for possible match outcomes for the remaining league matches, which could lead their favourite team to get qualified for further stage in the tournament (Playoffs). Here, the fans calculate their points table📊 to see their favourite team being placed in the position needed to qualify for Playoffs🏃🏻.

This tool🛠️ come as handy for those Sports enthusiasts which would help them to forsee the necessary remaining match outcomes to see their favourite team qualifying for playoffs✅ with the necessary match outcomes along with the respective points table📊.


This python package📦 will simulate the points table📊 based on different possible results in a sports tournament.

The PointsTableSimulator package provides a powerful tool for simulating and analyzing points tables for sports tournaments. Whether you're organizing or following a tournament, this package offers the flexibility to input tournament schedules, define points systems, and explore various match outcome scenarios to understand team standings and qualification possibilities.

Installation

Install this package with pip

pip install points-table-simulator

Usage/Examples

Please find the example usage from the below python code

from points_table_simulator import PointsTableSimulator
import pandas as pd

# Load the tournament schedule DataFrame
tournament_schedule = pd.read_csv("tournament_schedule.csv")

# Note: 
# The tournament schedule DataFrame should have the following columns:
#   - "match_number" column containing the match number
#   - "home" column containing the home team names
#   - "away" column containing the away team names
#   - "winner" column containing the match result (winning_team_name, draw, or no result)

# If the tournament schedule DataFrame contains different names than this, you can use arguments in PointsTableSimulator class to
# specify the column names. 

# Instantiate the PointsTableSimulator object
simulator = PointsTableSimulator(
    tournament_schedule=tournament_schedule,
    points_for_a_win=3,
    points_for_a_no_result=1,
    points_for_a_draw=1
)

# Get the current points table
current_table = simulator.current_points_table      # current_points_table is an attribute of PointsTableSimulator class

# Simulate qualification scenarios for a specific team
points_tables, qualification_match_results = simulator.simulate_the_qualification_scenarios(
    team_name="Team A",
    top_x_position_in_the_table=4,
    desired_number_of_scenarios=5
)

# points_tables - will return the list of points_tables (pd.Dataframe) for different qualification scenarios
# qualification_match_results - will return the list of table containing remaining match outcomes which could favour their team to get qualified for the given position

This package can also be used in Football tournaments such as English Premier League (EPL), Laliga, etc., when you want to generate the scenarios in which your favourite team can be placed in your expected position in the pointstable.

License

MIT

Metadata

Release files for points-table-simulator 2.0.1

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

Source distribution (sdist)

Source distribution for points-table-simulator 2.0.1
File Size Uploaded
points_table_simulator-2.0.1.tar.gz 14.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for points-table-simulator 2.0.1
File Interpreter ABI Platform
points_table_simulator-2.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 24.8 kB

Release files / points_table_simulator-2.0.1.tar.gz

Download URL points_table_simulator-2.0.1.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3e7eb419bbe9b0e9dfa9e66b3e8af984de46934b03670e4431d7c965e151f120
BLAKE2b-256 checksum
How to use checksums
4c9df6fb1c03170c8a8e68800a8dcfbbbaa05b18349f7f72c49ba190dcaee924
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / points_table_simulator-2.0.1-py3-none-any.whl

Download URL points_table_simulator-2.0.1-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
53ebb98978fe77fde47ebec80348e8cd17d1352faba6369f3d3f218216adb01f
BLAKE2b-256 checksum
How to use checksums
e246d6e2a59a85929f8671424c9388b11b9358fa77ed216e7a69be5fd95a4428
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

2.0.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

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