"If a worker wants to do his job well, he must first sharpen his tools." - Confucius, "The Analects of Confucius. Lu Linggong"
Front page > Programming > Heat Map – Brazil vs Italy World Cup Final)

Heat Map – Brazil vs Italy World Cup Final)

Published on 2024-11-03
Browse:656

In this post, I started an attempt to create a heat map of Brazil's movement in the 1970 World Cup final, using Python with Seaborn and Matplotlib . The idea was to represent the occupation of spaces by the Brazilian team on the field, based on the style of play characteristic of that match.

1. Drawing the Field

The field was designed with proportional coordinates (130x90), including the side lines, goal areas and central circle, representing a realistic football field. The draw_green_field() function was used to build this layout.

2. Generating the Heat Map

The 90x130 matrix represents the field, where each point corresponds to an area of ​​the field. The generate_heatmap() function smoothes the data using the Gaussian filter, creating "hotter" zones (busier areas).

3. Fictitious Data: Movement in Brazil

Fictitious data based on Brazil's style of play:

  • Laterals: Increase in density in the left and right lanes, reflecting the intensive use of these areas by Rivellino, Jairzinho and Carlos Alberto.
  • Center of the field: Represents the construction of plays in the middle with intermediate values.
  • Final third: High density close to the Italian area, indicating a strong offensive presence.
  • Defensive area: Less intensity, as Brazil focused on ball possession and pressure in attack.

The generate_1970_final_data() function generates this data, reflecting Brazilian dominance on the flanks and attack, while maintaining less defensive activity.

Result

Mapa de Calor - Final da Copa do Mundo de Brasil vs Itália)

Check out the code on Google Colab: Brazil vs Italy, 1970 - heatmap

The final map highlights how Brazil occupied the field, with greater offensive activity, but I need to better understand how to be more accurate in filling the sides of the field, a space in which Brazil also sought to create a lot of plays. This post will have edits with the aim of concluding as soon as the map is more reliable in relation to the match.

Release Statement This article is reproduced at: https://dev.to/evertontenorio/mapa-de-calor-final-da-copa-do-mundo-de-1970-brasil-vs-italia-15d?1 If there is any infringement, please contact study_golang @163.comdelete
Latest tutorial More>

Disclaimer: All resources provided are partly from the Internet. If there is any infringement of your copyright or other rights and interests, please explain the detailed reasons and provide proof of copyright or rights and interests and then send it to the email: [email protected] We will handle it for you as soon as possible.

Copyright© 2022 湘ICP备2022001581号-3