Skip to content

Repository files navigation

awbw_stats_aggregator

Collects game stats from AWBW (Advance Wars By Web): https://awbw.amarriner.com/

Installation (uv)

The project uses uv for dependency management.

# Install runtime dependencies
uv sync

# (Optional) install notebook/tooling extras
uv sync --group dev

To work inside a shell with the project environment activated:

uv run -- jupyter notebook  # or any other command

Usage

from awbw_stats_aggregator import (
    get_completed_games,
    player_stats,
    team_win_rates,
    win_rate_matrix,
)

games = get_completed_games("ExampleUser", max_pages=1)

# Overall record for a player
overall = player_stats(games, "ExampleUser")

# Head-to-head against specific rivals
head_to_head = player_stats(
    games,
    "ExampleUser",
    opponents=["Rival123", "AnotherOpponent"],
)

# Symmetric win-rate matrix for multiple players
players = ["ExampleUser", "Rival123", "AnotherOpponent"]
matrix = win_rate_matrix(games, players)

# Team-vs-team win rates (e.g., 2v2 matchups)
team_pairs = team_win_rates(games, players, team_size=2)

print(overall)
print(head_to_head)
print(matrix)
print(team_pairs)

About

Collects game stats from AWBW (Advance Wars By Web): https://awbw.amarriner.com/

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages