Skip to main content

Head-to-head team and player matchup analysis for NBA, MLB, and Soccer

Project description

Matchup Analyzer

Data-driven matchup breakdowns. Head-to-head team and player comparisons with stats, trends, and key factors for NBA, MLB, and Soccer.


The Problem

You want to break down tonight's Lakers vs Celtics game, but the stats are scattered across five different sites. You need offensive vs defensive ratings, key player matchups, recent form, and head-to-head history -- all in one clean view.

The Solution

Matchup Analyzer pulls from multiple data sources to produce a single, structured matchup card. It compares teams across every meaningful stat category, flags the key advantage areas, and highlights players to watch.

+------------------------------------------------------+
|              MATCHUP CARD -- NBA                     |
|         Lakers (32-20) vs Celtics (38-14)            |
|         Feb 18, 2026  |  TD Garden  |  7:30 PM ET   |
+------------------------------------------------------+
|                                                      |
|  TEAM COMPARISON                                     |
|  ┌────────────────────────────────────────────┐      |
|  │ Category        LAL         BOS    Edge    │      |
|  │ ──────────────────────────────────────────  │      |
|  │ PPG             112.4      118.7   BOS>>   │      |
|  │ Opp PPG         108.1      104.2   BOS>    │      |
|  │ FG%             .478       .491    BOS>    │      |
|  │ 3PT%            .364       .389    BOS>>   │      |
|  │ REB/G           44.2       45.8    BOS>    │      |
|  │ AST/G           27.1       26.8    LAL>    │      |
|  │ TOV/G           13.8       12.1    BOS>    │      |
|  │ Last 10         7-3        8-2     BOS>    │      |
|  └────────────────────────────────────────────┘      |
|                                                      |
|  KEY MATCHUP                                         |
|  LeBron James vs Jayson Tatum                        |
|  LBJ: 25.8/7.4/7.1  |  JT: 27.2/8.3/4.8           |
|  Edge: Tatum scoring, LeBron playmaking              |
|                                                      |
|  EDGE FACTORS                                        |
|  + BOS: Home court, top-5 defense, 3PT shooting     |
|  + LAL: LeBron playoff mode, strong recent form     |
|  ~ Both teams healthy, no major injuries             |
+------------------------------------------------------+

Features

  • Multi-sport — NBA, MLB, and Soccer matchup analysis
  • Team vs team — Full statistical comparison with edge indicators
  • Player vs player — Direct stat-line comparisons
  • Game previews — Auto-generates cards for today's scheduled games
  • Trend detection — Recent form analysis (last 5/10 games)
  • Markdown output — Clean, structured reports ready to share
  • Live context — Integrates current game state for in-progress matchups

Quick Start

1. Install dependencies

pip install requests

2. Set your API keys

Requires a Shipp.ai API key for schedule and live game data -- get 5,000 free credits/day at platform.shipp.ai.

export SHIPP_API_KEY="your-api-key-here"

# Optional: for soccer matchups (free at football-data.org)
export FOOTBALL_DATA_API_KEY="your-key-here"

3. Run matchup analysis

# NBA team matchup
python scripts/analyzer.py --sport nba --teams "Lakers,Celtics"

# MLB pitcher matchup
python scripts/analyzer.py --sport mlb --teams "Yankees,Red Sox"

# Soccer match preview
python scripts/analyzer.py --sport soccer --teams "Arsenal,Bayern Munich"

# Player vs player comparison
python scripts/analyzer.py --sport nba --players "LeBron James,Jayson Tatum"

# Auto-preview all of today's games
python scripts/analyzer.py --sport nba --today

Analysis Types

Team vs Team

Compares two teams across offensive and defensive categories. Identifies which team has the statistical edge in each area and calls out the most significant advantages.

Player vs Player

Direct comparison of two players' season stats. Useful for fantasy decisions, debate settling, and understanding individual matchups within a game.

Game Preview (--today)

Automatically generates matchup cards for every game on today's schedule. Ideal for morning prep or pre-game analysis.

Data Sources

Source Data Auth Required
Live game feed (via Shipp.ai) Today's schedule, live scores API key (free tier)
balldontlie.io NBA team/player stats None
statsapi.mlb.com MLB team stats, pitcher/batter splits None
football-data.org Soccer standings, head-to-head records API key (free tier)

Configuration

Environment Variable Required Description
SHIPP_API_KEY Yes API key for schedule and live data
FOOTBALL_DATA_API_KEY No football-data.org key for soccer data

License

MIT


Powered by Shipp.ai real-time sports data

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

matchup_analyzer-0.1.0.tar.gz (35.6 kB view details)

Uploaded Source

Built Distribution

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

matchup_analyzer-0.1.0-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file matchup_analyzer-0.1.0.tar.gz.

File metadata

  • Download URL: matchup_analyzer-0.1.0.tar.gz
  • Upload date:
  • Size: 35.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for matchup_analyzer-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b6d0b4d400703b35ec9c0872dbc18698c9aae764d258f89bb3d382b4f6951497
MD5 9dfb700c39b14eb4410418e0cf59f8e2
BLAKE2b-256 74db0335af3e490538c5139a4b8e23c2e70c5474c04afbb6a6becdfd212bbf67

See more details on using hashes here.

File details

Details for the file matchup_analyzer-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for matchup_analyzer-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 93b68c35271a9d59d94afa1286a70c6e785555cafb2eebf1a347ea55c4afe2dd
MD5 f29bdee625dc74ab7af36b4e9c09e0d2
BLAKE2b-256 222ea681a80f174b37c12ab9a814eeb46892f81c0164e1f8475d535de389c8d6

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