{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import pandas as pd\n", "import numpy as np\n", "import seaborn as sns\n", "\n", "from mplsoccer import Pitch, VerticalPitch\n", "\n", "import matplotlib.pyplot as plt\n", "import matplotlib.gridspec as gridspec\n", "\n", "from functions import plot_heatmap" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "x = np.random.randint(1,101,500)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", " | minute | \n", "second | \n", "teamId | \n", "x | \n", "y | \n", "period | \n", "type | \n", "outcome | \n", "playerId | \n", "endX | \n", "endY | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "0 | \n", "0.0 | \n", "Manchester United | \n", "0.0 | \n", "0.0 | \n", "FirstHalf | \n", "Start | \n", "Successful | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
1 | \n", "0 | \n", "0.0 | \n", "Villarreal | \n", "0.0 | \n", "0.0 | \n", "FirstHalf | \n", "Start | \n", "Successful | \n", "NaN | \n", "NaN | \n", "NaN | \n", "
2 | \n", "0 | \n", "0.0 | \n", "Manchester United | \n", "49.9 | \n", "50.0 | \n", "FirstHalf | \n", "Pass | \n", "Successful | \n", "18.0 | \n", "31.5 | \n", "59.6 | \n", "
3 | \n", "0 | \n", "3.0 | \n", "Manchester United | \n", "32.2 | \n", "58.1 | \n", "FirstHalf | \n", "Pass | \n", "Unsuccessful | \n", "2.0 | \n", "69.6 | \n", "100.0 | \n", "
4 | \n", "0 | \n", "32.0 | \n", "Villarreal | \n", "34.4 | \n", "0.0 | \n", "FirstHalf | \n", "Pass | \n", "Successful | \n", "8.0 | \n", "36.5 | \n", "9.5 | \n", "