How I Made World Cup Goals Per Match by Year Infographic using AI

TL;DR: I used AI to speed up the boring parts: finding the source table, checking the math, shaping the data into a clean CSV, and then turning it into an interactive HTML chart. The main rule was to keep it honest and simple.

The starting point was the World Cup goals table in Wikipedia’s FIFA World Cup records and statistics page. From there, I only needed a few fields: year, matches, goals, and goals per match. Once that was extracted, I had a clean year-by-year dataset to work with.

Next step was validation. I didn’t want to just trust the table blindly, so I checked that goals per match = goals / matches and rounded it to two decimals. That gave me a quick sanity check that the numbers being plotted were actually consistent with the raw tournament totals.

One important cleanup decision was excluding 2026. The validation notes made that pretty clear: 2026 showed up in the extracted material, but it is not a completed tournament. Including it would mix historical finished events with incomplete or forward-looking data, which makes the trend less trustworthy. So the final chart only covers completed World Cups from 1930 through 2022.

After that, I used AI to turn the cleaned CSV into a simple interactive HTML chart. Plotly was a good fit because it made hover details easy, so the chart could stay visually clean while still showing exact values for goals, matches, and goals per match when you move over a point.

The first pass was a little too dressed up. I had added extra chart callouts and a color-scale treatment to emphasize scoring intensity, which looked nice but also made the graphic busier than it needed to be. Based on edits, I stripped those extras out and kept the chart more straightforward. That ended up feeling closer to the point of the piece: just show the historical trend clearly.

  • Find the source table.
  • Validate the per-match math.
  • Drop 2026 because it is not complete.
  • Build the interactive chart.
  • Remove extra callouts/colors after feedback.

So yeah, the AI part was less “push one magic button” and more “use it as a fast research, cleanup, and layout assistant.” The actual win was getting from raw source table to a polished infographic without losing the logic behind the numbers.