3. Exploratory Analysis: Messi economic impact on MLS
The table below lists a sample of MLS matches with the core fields we scraped and cleaned: week/day/date/time, home and away teams, each side’s xG, the final score, attendance, and venue. We also derived Home Goals, Away Goals, Total Match Goals, and a Goal Bucket label. This gives quick context for each game and shows the raw inputs we’ll use to build the KPI in the next section.
Wk | Day | Date | Time | Home | xG | Score | xG (Away) | Away | Attendance | Venue | Match Report | Home Goals | Away Goals | Total Match Goals | Goal Bucket | 0 Goals | 1 Goal | 2 Goals | 3 Goals | 4+ Goals |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | Wed | 2024-02-21 | 20:00 | Inter Miami | 1.4 | 2–0 | 0.8 | Real Salt Lake | 21 137 | Chase Stadium | Match Report | 2 | 0 | 2 | 2 | 0 | 0 | 1 | 0 | 0 |
1 | Sat | 2024-02-24 | 13:45 | LAFC | 1.5 | 2–1 | 1.8 | Seattle Sounders | 22 214 | BMO Stadium | Match Report | 2 | 1 | 3 | 3 | 0 | 0 | 0 | 1 | 0 |
1 | Sat | 2024-02-24 | 14:00 | Columbus Crew | 1.8 | 1–0 | 0.5 | Atlanta Utd | 20 406 | Lower.com Field | Match Report | 1 | 0 | 1 | 1 | 0 | 1 | 0 | 0 | 0 |
1 | Sun | 2024-02-25 | 14:30 | FC Cincinnati | 0.9 | 0–0 | 0.5 | Toronto FC | 25 513 | TQL Stadium | Match Report | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
1 | Sun | 2024-02-25 | 16:00 | Nashville SC | 0.1 | 0–0 | 1.4 | NY Red Bulls | 30 109 | Geodis Park | Match Report | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 |
To compute this KPI, we classify each match by total goals, clean bad records, and aggregate by outcome to see how scoring intensity distributes across results.
- Bucket: Turn the raw
Score
into a Goal Bucket (0, 1, 2, 3, or 4+) for every match. - Clean: Filter out rows where parsing failed (wrong dash, missing, or non-numeric values).
- Group: Aggregate by Outcome (Home / Draw / Away), summing each goal bucket and counting Total Matches.
- Read: Quickly see scoring distribution by result and convert to percentages to support pricing, marketing, and scheduling decisions.
Outcome | 0 Goals | 1 Goal | 2 Goals | 3 Goals | 4+ Goals | Total Matches |
---|---|---|---|---|---|---|
Away | 0 | 29 | 16 | 54 | 59 | 158 |
Draw | 30 | 0 | 46 | 0 | 44 | 120 |
Home | 0 | 33 | 40 | 68 | 94 | 235 |
Total | 30 | 62 | 102 | 122 | 197 | 513 |
We filtered all matches where Inter Miami played (home or away). For each game, we calculated the team’s goals scored, then grouped by Outcome (Home / Draw / Away) and by Goal Bucket (0, 1, 2, 3, 4+). The bar chart below counts how many club matches fall into each combination, so you can quickly see whether wins cluster in 2–3 or 4+ goal games, whether draws tend to be low-scoring, and how the pattern shifts home vs. away. This view helps quantify a possible “Messi effect”: more high-scoring matches and more favorable results.
