{
  "id": 359638,
  "title": "A Visual Follow Up to the Ball Position During a Game",
  "url": "/competitions/tabular-playground-series-oct-2022/discussion/359638",
  "author_name": "",
  "post_date": "2022-10-12T21:27:06.537317200Z",
  "votes": 4,
  "comment_count": 5,
  "views": 0,
  "content": "<p>The following plot shows the average ball position for individual events at different moments during the game. Each point in the heatmap represents the average position of the ball for a specific event in a ten-second period (not necessarily before scoring).</p>\n<p>My idea: Analyze how the ball's position change at different moments during an event.</p>\n<p>How did I make this plot? <a href=\"https://www.kaggle.com/code/iancastillo/a-visual-follow-up-to-ball-position-before-scoring\" target=\"_blank\">Here</a> you can find the notebook with all the details.</p>\n<p>TL;DR -</p>\n<ol>\n<li>Using the <code>event_time</code>, I split the event into chunks of 10 seconds</li>\n<li>Average some features such as ball position, ball velocity, and distance from the center</li>\n<li>I removed the initial ball position centered in (0, 0) when the event started</li>\n<li>Plot a heatmap to see the evolution of the ball's position over time.</li>\n</ol>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8523156%2F53e19f8ac67e8df5fde4133e5265b5ee%2Fheatmap.png?generation=1665608893211304&amp;alt=media\" alt=\"visual-follow-up\"></p>",
  "messages": [
    {
      "id": "1984795",
      "postDate": "10/12/2022 21:27:06",
      "content": "<p>The following plot shows the average ball position for individual events at different moments during the game. Each point in the heatmap represents the average position of the ball for a specific event in a ten-second period (not necessarily before scoring).</p>\n<p>My idea: Analyze how the ball's position change at different moments during an event.</p>\n<p>How did I make this plot? <a href=\"https://www.kaggle.com/code/iancastillo/a-visual-follow-up-to-ball-position-before-scoring\" target=\"_blank\">Here</a> you can find the notebook with all the details.</p>\n<p>TL;DR -</p>\n<ol>\n<li>Using the <code>event_time</code>, I split the event into chunks of 10 seconds</li>\n<li>Average some features such as ball position, ball velocity, and distance from the center</li>\n<li>I removed the initial ball position centered in (0, 0) when the event started</li>\n<li>Plot a heatmap to see the evolution of the ball's position over time.</li>\n</ol>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8523156%2F53e19f8ac67e8df5fde4133e5265b5ee%2Fheatmap.png?generation=1665608893211304&amp;alt=media\" alt=\"visual-follow-up\"></p>",
      "rawMarkdown": "The following plot shows the average ball position for individual events at different moments during the game. Each point in the heatmap represents the average position of the ball for a specific event in a ten-second period (not necessarily before scoring).\n\nMy idea: Analyze how the ball's position change at different moments during an event.\n\nHow did I make this plot? [Here](https://www.kaggle.com/code/iancastillo/a-visual-follow-up-to-ball-position-before-scoring) you can find the notebook with all the details.\n\nTL;DR -\n1. Using the `event_time`, I split the event into chunks of 10 seconds\n2. Average some features such as ball position, ball velocity, and distance from the center\n3. I removed the initial ball position centered in (0, 0) when the event started\n4. Plot a heatmap to see the evolution of the ball's position over time.\n\n![visual-follow-up](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8523156%2F53e19f8ac67e8df5fde4133e5265b5ee%2Fheatmap.png?generation=1665608893211304&alt=media)",
      "votes": null
    },
    {
      "id": "1984800",
      "postDate": "10/12/2022 21:36:45",
      "content": "<p>I forgot to mention X and Y are inverted, so the scoring zone is at left and right (not up/bottom).</p>",
      "rawMarkdown": "I forgot to mention X and Y are inverted, so the scoring zone is at left and right (not up/bottom).",
      "votes": null
    },
    {
      "id": "1985341",
      "postDate": "10/13/2022 08:59:41",
      "content": "<p>Beautiful work. Would it be easy to animate this heatmap for team A or B only? (for the 10s leading to a goal)</p>\n<p>I'd be interested to see if there is any obvious \"handedness\" bias to plays. (I've removed it and I suspect that I shouldn't have! :) ).</p>\n<p>I looked at <a href=\"https://www.kaggle.com/code/paddykb/tps-2022-10-r-gam-probability-surface\" target=\"_blank\">the probability surfaces </a> - I'd be interested to see that kind of plot animated too :)</p>",
      "rawMarkdown": "Beautiful work. Would it be easy to animate this heatmap for team A or B only? (for the 10s leading to a goal)\n\nI'd be interested to see if there is any obvious \"handedness\" bias to plays. (I've removed it and I suspect that I shouldn't have! :) ).\n\nI looked at [the probability surfaces ](https://www.kaggle.com/code/paddykb/tps-2022-10-r-gam-probability-surface) - I'd be interested to see that kind of plot animated too :)",
      "votes": null
    },
    {
      "id": "1987821",
      "postDate": "10/14/2022 20:51:59",
      "content": "<p>Hi Patrick, that is a good question. I was using distances in my model but it seems to be more useful define sections.</p>\n<p>Maybe this contour plot can help you. Using data (team scoring ==1) only, ignoring kick-off ( ball pos (x,y,x)=(0,0,0) )</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F10600930%2Fde5ed906f0b9c474fb8bb33ee7dadd1f%2FA_B_score.jpg?generation=1665780530578867&amp;alt=media\"></p>",
      "rawMarkdown": "Hi Patrick, that is a good question. I was using distances in my model but it seems to be more useful define sections.\n\nMaybe this contour plot can help you. Using data (team scoring ==1) only, ignoring kick-off ( ball pos (x,y,x)=(0,0,0) )\n\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F10600930%2Fde5ed906f0b9c474fb8bb33ee7dadd1f%2FA_B_score.jpg?generation=1665780530578867&alt=media\" width=\"700\"/>",
      "votes": null
    },
    {
      "id": "1987894",
      "postDate": "10/14/2022 22:00:25",
      "content": "<p>Amazing work <a href=\"https://www.kaggle.com/bryandarquea\" target=\"_blank\">@bryandarquea</a>! When I saw my plots, I thought about using field zones too. I learned the Rocket League field has special sections where players can increase their booster and ultimately help them to make a power shot to score a goal.</p>",
      "rawMarkdown": "Amazing work @bryandarquea! When I saw my plots, I thought about using field zones too. I learned the Rocket League field has special sections where players can increase their booster and ultimately help them to make a power shot to score a goal.",
      "votes": null
    },
    {
      "id": "1987909",
      "postDate": "10/14/2022 22:17:24",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/iancastillo\" target=\"_blank\">@iancastillo</a>, yes this is a good idea as players seem to follow the 'boost path' even when there is no scoring, but affecting their boost that seems to be a representative feature.</p>\n<p>This 2dHistogram of players position can help you, using events when Team A is scoring.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F10600930%2F4050273f03e63eb15f707e9f34bd7b12%2Fplayers.jpg?generation=1665785770647771&amp;alt=media\" alt=\"\"> </p>",
      "rawMarkdown": "Hi @iancastillo, yes this is a good idea as players seem to follow the 'boost path' even when there is no scoring, but affecting their boost that seems to be a representative feature.\n\nThis 2dHistogram of players position can help you, using events when Team A is scoring.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F10600930%2F4050273f03e63eb15f707e9f34bd7b12%2Fplayers.jpg?generation=1665785770647771&alt=media)",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1984800,
      "author_name": "iancastillo",
      "author_url": "",
      "post_date": "10/12/2022 21:36:45",
      "content": "<p>I forgot to mention X and Y are inverted, so the scoring zone is at left and right (not up/bottom).</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1985341,
      "author_name": "paddykb",
      "author_url": "",
      "post_date": "10/13/2022 08:59:41",
      "content": "<p>Beautiful work. Would it be easy to animate this heatmap for team A or B only? (for the 10s leading to a goal)</p>\n<p>I'd be interested to see if there is any obvious \"handedness\" bias to plays. (I've removed it and I suspect that I shouldn't have! :) ).</p>\n<p>I looked at <a href=\"https://www.kaggle.com/code/paddykb/tps-2022-10-r-gam-probability-surface\" target=\"_blank\">the probability surfaces </a> - I'd be interested to see that kind of plot animated too :)</p>",
      "votes": null,
      "replies": [
        {
          "id": 1987821,
          "author_name": "bryandarquea",
          "author_url": "",
          "post_date": "10/14/2022 20:51:59",
          "content": "<p>Hi Patrick, that is a good question. I was using distances in my model but it seems to be more useful define sections.</p>\n<p>Maybe this contour plot can help you. Using data (team scoring ==1) only, ignoring kick-off ( ball pos (x,y,x)=(0,0,0) )</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F10600930%2Fde5ed906f0b9c474fb8bb33ee7dadd1f%2FA_B_score.jpg?generation=1665780530578867&amp;alt=media\"></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1987894,
          "author_name": "iancastillo",
          "author_url": "",
          "post_date": "10/14/2022 22:00:25",
          "content": "<p>Amazing work <a href=\"https://www.kaggle.com/bryandarquea\" target=\"_blank\">@bryandarquea</a>! When I saw my plots, I thought about using field zones too. I learned the Rocket League field has special sections where players can increase their booster and ultimately help them to make a power shot to score a goal.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1987909,
          "author_name": "bryandarquea",
          "author_url": "",
          "post_date": "10/14/2022 22:17:24",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/iancastillo\" target=\"_blank\">@iancastillo</a>, yes this is a good idea as players seem to follow the 'boost path' even when there is no scoring, but affecting their boost that seems to be a representative feature.</p>\n<p>This 2dHistogram of players position can help you, using events when Team A is scoring.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F10600930%2F4050273f03e63eb15f707e9f34bd7b12%2Fplayers.jpg?generation=1665785770647771&amp;alt=media\" alt=\"\"> </p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1984795": "The following plot shows the average ball position for individual events at different moments during the game. Each point in the heatmap represents the average position of the ball for a specific event in a ten-second period (not necessarily before scoring).\n\nMy idea: Analyze how the ball's position change at different moments during an event.\n\nHow did I make this plot? [Here](https://www.kaggle.com/code/iancastillo/a-visual-follow-up-to-ball-position-before-scoring) you can find the notebook with all the details.\n\nTL;DR -\n1. Using the `event_time`, I split the event into chunks of 10 seconds\n2. Average some features such as ball position, ball velocity, and distance from the center\n3. I removed the initial ball position centered in (0, 0) when the event started\n4. Plot a heatmap to see the evolution of the ball's position over time.\n\n![visual-follow-up](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8523156%2F53e19f8ac67e8df5fde4133e5265b5ee%2Fheatmap.png?generation=1665608893211304&alt=media)",
    "1984800": "I forgot to mention X and Y are inverted, so the scoring zone is at left and right (not up/bottom).",
    "1985341": "Beautiful work. Would it be easy to animate this heatmap for team A or B only? (for the 10s leading to a goal)\n\nI'd be interested to see if there is any obvious \"handedness\" bias to plays. (I've removed it and I suspect that I shouldn't have! :) ).\n\nI looked at [the probability surfaces ](https://www.kaggle.com/code/paddykb/tps-2022-10-r-gam-probability-surface) - I'd be interested to see that kind of plot animated too :)",
    "1987821": "Hi Patrick, that is a good question. I was using distances in my model but it seems to be more useful define sections.\n\nMaybe this contour plot can help you. Using data (team scoring ==1) only, ignoring kick-off ( ball pos (x,y,x)=(0,0,0) )\n\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F10600930%2Fde5ed906f0b9c474fb8bb33ee7dadd1f%2FA_B_score.jpg?generation=1665780530578867&alt=media\" width=\"700\"/>",
    "1987894": "Amazing work @bryandarquea! When I saw my plots, I thought about using field zones too. I learned the Rocket League field has special sections where players can increase their booster and ultimately help them to make a power shot to score a goal.",
    "1987909": "Hi @iancastillo, yes this is a good idea as players seem to follow the 'boost path' even when there is no scoring, but affecting their boost that seems to be a representative feature.\n\nThis 2dHistogram of players position can help you, using events when Team A is scoring.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F10600930%2F4050273f03e63eb15f707e9f34bd7b12%2Fplayers.jpg?generation=1665785770647771&alt=media)"
  },
  "source": "meta"
}