Python Automation · Data Engineering

Sports Roster Intelligence & Athlete Data Pipeline

Developed a custom Python data-extraction system that traversed sports leagues, teams and individual roster pages to identify athletes matching geographic and demographic criteria.

The Problem

Identifying athletes from a specific region across hundreds of teams and leagues requires traversing large numbers of roster pages — a task that is impractical to do manually at scale.

The Approach

Built a Python pipeline that discovered leagues, traversed team pages, extracted player records and applied geographic and demographic filters — with retry logic, configurable delays and structured CSV output preserving source URLs for traceability.

Demonstrated Workflow

  • Discovery of 115 teams within a hockey league
  • Sequential processing of individual team pages
  • Player-name extraction
  • Position extraction
  • Birth-year extraction
  • Birthplace parsing
  • City and state normalization
  • Geographic filtering for California athletes
  • Skip logic for excluded teams
  • Zero-result handling
  • Retry logic for failed requests
  • Configurable delays between requests
  • Source-URL preservation
  • Structured CSV output

Project Evidence

Real extraction output — hockey roster pipeline.

Screenshots show the running extraction process, league and team traversal, filtering logic, skip/retry behavior and Python source. The focus is system behavior — not individual athletes.

Some records may involve minors. Individual names and full birth information are obscured where applicable. Screenshots are presented to demonstrate system capability only.

League traversal — team discovery

League traversal — team discovery

Discovery phase: 115 hockey teams identified and queued for roster extraction. Shows team-by-team traversal logic and source URL tracking.

Athlete identification — geographic filter

Athlete identification — geographic filter

Live extraction showing athlete records filtered by birthplace — geographic filtering, position and birth-year extraction in progress.

Skip logic and zero-result handling

Skip logic and zero-result handling

System behavior when no matching athletes are found — zero-result handling, skip logic and retry logic demonstrated across multiple teams.

City and state parsing — source URLs

City and state parsing — source URLs

City and state parsing with source URL logging — confirming geographic data extraction and traceability back to original roster pages.

CSV-writing logic — structured output

CSV-writing logic — structured output

CSV-writing logic in action — structured output with position, birth year and geographic fields confirmed written to disk.

Python source — extraction script

Python source — extraction script

Python source code for the roster extraction script — showing traversal, field mapping, filtering conditions and output logic.

Capabilities

  • League discovery
  • Team-page traversal
  • Roster extraction
  • Athlete filtering
  • Geographic targeting
  • Birth-year and position parsing
  • Retry handling
  • Rate limiting
  • CSV generation
  • Source traceability
  • Configurable scraping rules
  • Large-scale roster processing

Responsible Use

Sports-data tools are built for authorized research using lawfully accessible information. Collection logic respects source terms, rate limits, privacy obligations and special protections involving minors. Individual athlete data is not published or distributed through this portfolio.

Technologies

PythonrequestsBeautifulSoupCSVRetry logicRate limitingGeographic filteringData normalization

Related Projects