🏟️ Sports World: The Algorithm Arena

Exploring how APIs bring sports statistics and stadium data to life through performance, logic, and visualization.


🗺️ Our Route

San Diego → Los Angeles → San Francisco → Seattle


⚾ Stop 1: San Diego — “Connecting to the Data Field”

Focus: Petco Park (Baseball – Padres) & Snapdragon Stadium (Soccer – SDFC)
Coding Concept: FIRST part of making APIs

Activity:

  • Define the Purpose / Endpoints
  • Decide what the API does and what data it provides.
  • Example: /getStadiumInfo returns stadium name, capacity, team.
  • Endpoints are like “doors” to access different types of data.

💡 Key Learning: APIs are like scouts — they know exactly where to find stats and bring back only the data you ask for through specific “doors” called endpoints.


🏀 Stop 2: Los Angeles — “Filtering the Playbook”

Focus: Intuit Dome (Basketball – Clippers) & SoFi Stadium (Football – Chargers)
Coding Concept: SECOND part of making APIs

Activity:

  • Set Up the Data Source / Backend
  • Decide where the API will get its data (database, CSV/JSON file, or live sports stats).
  • Organize the data so it’s easy for the API to access.
  • This is like preparing a well-stocked library for the API to fetch info.

💡 Key Learning: Just as coaches organize playbooks so players can run the right plays, coders organize and structure data so APIs can deliver the right information quickly.


🏈 Stop 3: San Francisco — “Analyzing Performance Data”

Focus: Chase Center (Basketball – Warriors) & Levi’s Stadium (Football – 49ers)
Coding Concept: THIRD part of making APIs

Activity:

  • Create / Call the API
  • Making the API: Write code to handle requests, pull data, and return it (usually in JSON).
  • Calling the API: Use another program or code to request data from the API.

💡 Key Learning: Just as players execute plays and deliver results on the field, APIs respond to requests by sending the right data — turning preparation into performance.


⚽ Stop 4: Seattle — “Updating the Leaderboard”

Focus: Lumen Field (Football – Seahawks) & T-Mobile Park (Baseball – Mariners)
Coding Concept: FOURTH part of making APIs

Activity:

  • Make sure the API works correctly when called.
  • Document endpoints, required inputs, and returned outputs.
  • Refine your API to fix bugs or add features.
  • Good documentation is like instructions for anyone using your API.

💡 Key Learning: Just as scorekeepers update the leaderboard in real time, developers maintain and document APIs so they always deliver accurate, up-to-date information.


🧭 Key Takeaways

Stop City Stadiums Coding Concept
1 San Diego Petco Park / Snapdragon API GET / POST
2 Los Angeles Intuit Dome / SoFi Filtering / Sorting
3 San Francisco Chase / Levi’s Comparing Data
4 Seattle Lumen / T-Mobile Updating APIs

🏆 Sports and Cities Reference

City Sport Team Stadium
San Diego Baseball Padres Petco Park
San Diego Soccer SDFC Snapdragon Stadium
Los Angeles Basketball Clippers Intuit Dome
Los Angeles Football Chargers SoFi Stadium
San Francisco Basketball Warriors Chase Center
San Francisco Football 49ers Levi’s Stadium
Seattle Football Seahawks Lumen Field
Seattle Baseball Mariners T-Mobile Park

💡 APIs Explained

An API is like a football team:

  • The playbook is the API — it tells you what plays you can run.
  • You can request a play (order).
  • The quarterback (server) confirms the play.
  • The coach (API) delivers the play.

Your program can request, filter, compare, and update real-time sports data to create dynamic dashboards—just like professional analytics teams.