Heat Map – Brazil vs Italy World Cup Final)

Linda Hamilton
Release: 2024-10-03 06:36:30
Original
752 people have browsed it

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:

  • Sideways: 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.

The above is the detailed content of Heat Map – Brazil vs Italy World Cup Final). For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!