550 lines
79 KiB
Plaintext
550 lines
79 KiB
Plaintext
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 1,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"import pandas as pd\n",
|
||
|
"df = pd.read_csv('fcb_xg.csv')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 2,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<div>\n",
|
||
|
"<style scoped>\n",
|
||
|
" .dataframe tbody tr th:only-of-type {\n",
|
||
|
" vertical-align: middle;\n",
|
||
|
" }\n",
|
||
|
"\n",
|
||
|
" .dataframe tbody tr th {\n",
|
||
|
" vertical-align: top;\n",
|
||
|
" }\n",
|
||
|
"\n",
|
||
|
" .dataframe thead th {\n",
|
||
|
" text-align: right;\n",
|
||
|
" }\n",
|
||
|
"</style>\n",
|
||
|
"<table border=\"1\" class=\"dataframe\">\n",
|
||
|
" <thead>\n",
|
||
|
" <tr style=\"text-align: right;\">\n",
|
||
|
" <th></th>\n",
|
||
|
" <th>Date</th>\n",
|
||
|
" <th>Time</th>\n",
|
||
|
" <th>GF</th>\n",
|
||
|
" <th>GA</th>\n",
|
||
|
" <th>xG</th>\n",
|
||
|
" <th>xGA</th>\n",
|
||
|
" </tr>\n",
|
||
|
" </thead>\n",
|
||
|
" <tbody>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>0</th>\n",
|
||
|
" <td>2019-08-16</td>\n",
|
||
|
" <td>21:00 (00:30)</td>\n",
|
||
|
" <td>0</td>\n",
|
||
|
" <td>1</td>\n",
|
||
|
" <td>1.1</td>\n",
|
||
|
" <td>0.5</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>1</th>\n",
|
||
|
" <td>2019-08-25</td>\n",
|
||
|
" <td>21:00 (00:30)</td>\n",
|
||
|
" <td>5</td>\n",
|
||
|
" <td>2</td>\n",
|
||
|
" <td>2.0</td>\n",
|
||
|
" <td>0.2</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>2</th>\n",
|
||
|
" <td>2019-08-31</td>\n",
|
||
|
" <td>17:00 (20:30)</td>\n",
|
||
|
" <td>2</td>\n",
|
||
|
" <td>2</td>\n",
|
||
|
" <td>0.5</td>\n",
|
||
|
" <td>1.6</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>3</th>\n",
|
||
|
" <td>2019-09-14</td>\n",
|
||
|
" <td>21:00 (00:30)</td>\n",
|
||
|
" <td>5</td>\n",
|
||
|
" <td>2</td>\n",
|
||
|
" <td>2.0</td>\n",
|
||
|
" <td>1.3</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>4</th>\n",
|
||
|
" <td>2019-09-17</td>\n",
|
||
|
" <td>21:00 (00:30)</td>\n",
|
||
|
" <td>0</td>\n",
|
||
|
" <td>0</td>\n",
|
||
|
" <td>0.6</td>\n",
|
||
|
" <td>2.6</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>5</th>\n",
|
||
|
" <td>2019-09-21</td>\n",
|
||
|
" <td>21:00 (00:30)</td>\n",
|
||
|
" <td>0</td>\n",
|
||
|
" <td>2</td>\n",
|
||
|
" <td>0.5</td>\n",
|
||
|
" <td>1.7</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>6</th>\n",
|
||
|
" <td>2019-09-24</td>\n",
|
||
|
" <td>21:00 (00:30)</td>\n",
|
||
|
" <td>2</td>\n",
|
||
|
" <td>1</td>\n",
|
||
|
" <td>0.7</td>\n",
|
||
|
" <td>0.7</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>7</th>\n",
|
||
|
" <td>2019-09-28</td>\n",
|
||
|
" <td>16:00 (19:30)</td>\n",
|
||
|
" <td>2</td>\n",
|
||
|
" <td>0</td>\n",
|
||
|
" <td>1.4</td>\n",
|
||
|
" <td>0.7</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>8</th>\n",
|
||
|
" <td>2019-10-02</td>\n",
|
||
|
" <td>21:00 (00:30)</td>\n",
|
||
|
" <td>2</td>\n",
|
||
|
" <td>1</td>\n",
|
||
|
" <td>1.2</td>\n",
|
||
|
" <td>1.1</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>9</th>\n",
|
||
|
" <td>2019-10-06</td>\n",
|
||
|
" <td>21:00 (00:30)</td>\n",
|
||
|
" <td>4</td>\n",
|
||
|
" <td>0</td>\n",
|
||
|
" <td>2.4</td>\n",
|
||
|
" <td>1.8</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>10</th>\n",
|
||
|
" <td>2019-10-19</td>\n",
|
||
|
" <td>13:00 (16:30)</td>\n",
|
||
|
" <td>3</td>\n",
|
||
|
" <td>0</td>\n",
|
||
|
" <td>2.2</td>\n",
|
||
|
" <td>0.4</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>11</th>\n",
|
||
|
" <td>2019-10-23</td>\n",
|
||
|
" <td>21:00 (00:30)</td>\n",
|
||
|
" <td>2</td>\n",
|
||
|
" <td>1</td>\n",
|
||
|
" <td>2.3</td>\n",
|
||
|
" <td>1.4</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>12</th>\n",
|
||
|
" <td>2019-10-29</td>\n",
|
||
|
" <td>21:15 (01:45)</td>\n",
|
||
|
" <td>5</td>\n",
|
||
|
" <td>1</td>\n",
|
||
|
" <td>3.4</td>\n",
|
||
|
" <td>0.7</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>13</th>\n",
|
||
|
" <td>2019-11-02</td>\n",
|
||
|
" <td>16:00 (20:30)</td>\n",
|
||
|
" <td>1</td>\n",
|
||
|
" <td>3</td>\n",
|
||
|
" <td>2.2</td>\n",
|
||
|
" <td>0.9</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>14</th>\n",
|
||
|
" <td>2019-11-05</td>\n",
|
||
|
" <td>18:55 (23:25)</td>\n",
|
||
|
" <td>0</td>\n",
|
||
|
" <td>0</td>\n",
|
||
|
" <td>2.2</td>\n",
|
||
|
" <td>0.2</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>15</th>\n",
|
||
|
" <td>2019-11-09</td>\n",
|
||
|
" <td>21:00 (01:30)</td>\n",
|
||
|
" <td>4</td>\n",
|
||
|
" <td>1</td>\n",
|
||
|
" <td>1.9</td>\n",
|
||
|
" <td>0.4</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>16</th>\n",
|
||
|
" <td>2019-11-23</td>\n",
|
||
|
" <td>13:00 (17:30)</td>\n",
|
||
|
" <td>2</td>\n",
|
||
|
" <td>1</td>\n",
|
||
|
" <td>1.8</td>\n",
|
||
|
" <td>0.4</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>17</th>\n",
|
||
|
" <td>2019-11-27</td>\n",
|
||
|
" <td>21:00 (01:30)</td>\n",
|
||
|
" <td>3</td>\n",
|
||
|
" <td>1</td>\n",
|
||
|
" <td>2.6</td>\n",
|
||
|
" <td>1.2</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>18</th>\n",
|
||
|
" <td>2019-12-01</td>\n",
|
||
|
" <td>21:00 (01:30)</td>\n",
|
||
|
" <td>1</td>\n",
|
||
|
" <td>0</td>\n",
|
||
|
" <td>1.2</td>\n",
|
||
|
" <td>1.5</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>19</th>\n",
|
||
|
" <td>2019-12-07</td>\n",
|
||
|
" <td>21:00 (01:30)</td>\n",
|
||
|
" <td>5</td>\n",
|
||
|
" <td>2</td>\n",
|
||
|
" <td>3.6</td>\n",
|
||
|
" <td>1.3</td>\n",
|
||
|
" </tr>\n",
|
||
|
" </tbody>\n",
|
||
|
"</table>\n",
|
||
|
"</div>"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
" Date Time GF GA xG xGA\n",
|
||
|
"0 2019-08-16 21:00 (00:30) 0 1 1.1 0.5\n",
|
||
|
"1 2019-08-25 21:00 (00:30) 5 2 2.0 0.2\n",
|
||
|
"2 2019-08-31 17:00 (20:30) 2 2 0.5 1.6\n",
|
||
|
"3 2019-09-14 21:00 (00:30) 5 2 2.0 1.3\n",
|
||
|
"4 2019-09-17 21:00 (00:30) 0 0 0.6 2.6\n",
|
||
|
"5 2019-09-21 21:00 (00:30) 0 2 0.5 1.7\n",
|
||
|
"6 2019-09-24 21:00 (00:30) 2 1 0.7 0.7\n",
|
||
|
"7 2019-09-28 16:00 (19:30) 2 0 1.4 0.7\n",
|
||
|
"8 2019-10-02 21:00 (00:30) 2 1 1.2 1.1\n",
|
||
|
"9 2019-10-06 21:00 (00:30) 4 0 2.4 1.8\n",
|
||
|
"10 2019-10-19 13:00 (16:30) 3 0 2.2 0.4\n",
|
||
|
"11 2019-10-23 21:00 (00:30) 2 1 2.3 1.4\n",
|
||
|
"12 2019-10-29 21:15 (01:45) 5 1 3.4 0.7\n",
|
||
|
"13 2019-11-02 16:00 (20:30) 1 3 2.2 0.9\n",
|
||
|
"14 2019-11-05 18:55 (23:25) 0 0 2.2 0.2\n",
|
||
|
"15 2019-11-09 21:00 (01:30) 4 1 1.9 0.4\n",
|
||
|
"16 2019-11-23 13:00 (17:30) 2 1 1.8 0.4\n",
|
||
|
"17 2019-11-27 21:00 (01:30) 3 1 2.6 1.2\n",
|
||
|
"18 2019-12-01 21:00 (01:30) 1 0 1.2 1.5\n",
|
||
|
"19 2019-12-07 21:00 (01:30) 5 2 3.6 1.3"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 2,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 3,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"#change this cell to drive the whole IPYNB\n",
|
||
|
"graph_var1= 'GA'\n",
|
||
|
"graph_var2= 'xGA'\n",
|
||
|
"pand_out1 = 'RollingGA'\n",
|
||
|
"pand_out2 = 'RollingxGA'\n",
|
||
|
"hue_disp1 = 'GA vs xGA'\n",
|
||
|
"hue_disp2 = 'GA and xGA'"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 4,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"def movavg(pandas_df,col1,col2,out1,out2): \n",
|
||
|
" pandas_df['X_axis'] = df.index\n",
|
||
|
" for i in range(0,pandas_df.shape[0] - 4):\n",
|
||
|
" pandas_df.loc[pandas_df.index[i+4],out1] = (pandas_df.iloc[i][col1] + pandas_df.iloc[i+1][col1] + pandas_df.iloc[i+2][col1] + pandas_df.iloc[i + 3][col1] + pandas_df.iloc[i+4][col1])/5\n",
|
||
|
" pandas_df.loc[pandas_df.index[i+4],out2] = (pandas_df.iloc[i][col2] + pandas_df.iloc[i+1][col2] + pandas_df.iloc[i+2][col2] + pandas_df.iloc[i + 3][col2] + pandas_df.iloc[i+4][col2])/5\n",
|
||
|
" \n",
|
||
|
" return pandas_df[['X_axis',out1,out2]]"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 5,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"main_df = movavg(df,graph_var1,graph_var2,pand_out1,pand_out2)"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 6,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<div>\n",
|
||
|
"<style scoped>\n",
|
||
|
" .dataframe tbody tr th:only-of-type {\n",
|
||
|
" vertical-align: middle;\n",
|
||
|
" }\n",
|
||
|
"\n",
|
||
|
" .dataframe tbody tr th {\n",
|
||
|
" vertical-align: top;\n",
|
||
|
" }\n",
|
||
|
"\n",
|
||
|
" .dataframe thead th {\n",
|
||
|
" text-align: right;\n",
|
||
|
" }\n",
|
||
|
"</style>\n",
|
||
|
"<table border=\"1\" class=\"dataframe\">\n",
|
||
|
" <thead>\n",
|
||
|
" <tr style=\"text-align: right;\">\n",
|
||
|
" <th></th>\n",
|
||
|
" <th>X_axis</th>\n",
|
||
|
" <th>RollingGA</th>\n",
|
||
|
" <th>RollingxGA</th>\n",
|
||
|
" </tr>\n",
|
||
|
" </thead>\n",
|
||
|
" <tbody>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>0</th>\n",
|
||
|
" <td>0</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>1</th>\n",
|
||
|
" <td>1</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>2</th>\n",
|
||
|
" <td>2</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>3</th>\n",
|
||
|
" <td>3</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>4</th>\n",
|
||
|
" <td>4</td>\n",
|
||
|
" <td>1.4</td>\n",
|
||
|
" <td>1.24</td>\n",
|
||
|
" </tr>\n",
|
||
|
" </tbody>\n",
|
||
|
"</table>\n",
|
||
|
"</div>"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
" X_axis RollingGA RollingxGA\n",
|
||
|
"0 0 NaN NaN\n",
|
||
|
"1 1 NaN NaN\n",
|
||
|
"2 2 NaN NaN\n",
|
||
|
"3 3 NaN NaN\n",
|
||
|
"4 4 1.4 1.24"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 6,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"main_df.head()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 7,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"def melt(pandas_df,x_axis):\n",
|
||
|
" pandas_df = pandas_df.melt(x_axis,var_name=hue_disp1, value_name=hue_disp2)\n",
|
||
|
" return pandas_df"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 8,
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"df_for_disp = melt(main_df,'X_axis')"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 9,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"text/html": [
|
||
|
"<div>\n",
|
||
|
"<style scoped>\n",
|
||
|
" .dataframe tbody tr th:only-of-type {\n",
|
||
|
" vertical-align: middle;\n",
|
||
|
" }\n",
|
||
|
"\n",
|
||
|
" .dataframe tbody tr th {\n",
|
||
|
" vertical-align: top;\n",
|
||
|
" }\n",
|
||
|
"\n",
|
||
|
" .dataframe thead th {\n",
|
||
|
" text-align: right;\n",
|
||
|
" }\n",
|
||
|
"</style>\n",
|
||
|
"<table border=\"1\" class=\"dataframe\">\n",
|
||
|
" <thead>\n",
|
||
|
" <tr style=\"text-align: right;\">\n",
|
||
|
" <th></th>\n",
|
||
|
" <th>X_axis</th>\n",
|
||
|
" <th>GA vs xGA</th>\n",
|
||
|
" <th>GA and xGA</th>\n",
|
||
|
" </tr>\n",
|
||
|
" </thead>\n",
|
||
|
" <tbody>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>0</th>\n",
|
||
|
" <td>0</td>\n",
|
||
|
" <td>RollingGA</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>1</th>\n",
|
||
|
" <td>1</td>\n",
|
||
|
" <td>RollingGA</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>2</th>\n",
|
||
|
" <td>2</td>\n",
|
||
|
" <td>RollingGA</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>3</th>\n",
|
||
|
" <td>3</td>\n",
|
||
|
" <td>RollingGA</td>\n",
|
||
|
" <td>NaN</td>\n",
|
||
|
" </tr>\n",
|
||
|
" <tr>\n",
|
||
|
" <th>4</th>\n",
|
||
|
" <td>4</td>\n",
|
||
|
" <td>RollingGA</td>\n",
|
||
|
" <td>1.4</td>\n",
|
||
|
" </tr>\n",
|
||
|
" </tbody>\n",
|
||
|
"</table>\n",
|
||
|
"</div>"
|
||
|
],
|
||
|
"text/plain": [
|
||
|
" X_axis GA vs xGA GA and xGA\n",
|
||
|
"0 0 RollingGA NaN\n",
|
||
|
"1 1 RollingGA NaN\n",
|
||
|
"2 2 RollingGA NaN\n",
|
||
|
"3 3 RollingGA NaN\n",
|
||
|
"4 4 RollingGA 1.4"
|
||
|
]
|
||
|
},
|
||
|
"execution_count": 9,
|
||
|
"metadata": {},
|
||
|
"output_type": "execute_result"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"df_for_disp.head()"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 13,
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"data": {
|
||
|
"image/png": "iVBORw0KGgoAAAANSUhEUgAAA00AAAKwCAYAAABEeJRfAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4yLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvOIA7rQAAIABJREFUeJzs3Xd8lGW6//HPzDyTHggkAgGkSm8qRZEqECCIBQxt1yMHQfS4WMGz+xPFVVx3bYCrHleRtbG7AlIUIZgAAYKAoQkBIjWhBgRCgPRpvz/ijARCT2Yy4ft+vXy9QvLMfV8z8yQ+11z3fT2mWrVquRAREREREZFSmX0dgIiIiIiISEWmpElEREREROQSlDSJiIiIiIhcgpImERERERGRS1DSJCIiIiIicglKmkRERERERC5BSZOXjB8/nszMTKZNm+brUMQLhg4dSmZmJnPnzgWgc+fOZGZmkpKSAkDdunXJzMwkMzPTl2He8KZNm+Z5j67V5d7rG4H7XK5bt+5Fj7kRXxcREak8Kl3SlJKS4vkf+KFDh9iyZQv//Oc/qVevnq9DqzAeeOAB5s+fz86dO0lPT2f9+vV8+OGHtGzZssRxXbp08byWixcv9lG0F9ezZ0/+/e9/s337djIyMti4cSOfffYZnTt3LnFcvXr1PM9j8+bNmM2XPu3nzp3rOf7w4cOkpqby2Wef0ahRozKLPScnh+nTpzN9+vQyG7M07gv68/9r165duc5b2Tz//POe1+7FF18skzE7duzI559/zvbt20lPT2ft2rW89tprWK3WMhm/PFzswx/3uZyTkwP89js0dOhQzzGZmZlMnz6d//znP16NWUREpCwYvg6gvCQkJHDgwAF69uxJbGws4eHhDBky5JrGMplMALhc/n8f4MmTJzNmzBgA1q1bx549e6hRowa9evUiJSWFHTt2eI598MEHPV/fdtttNGrUiH379nk95tI89thj/PnPfwZg69atpKamUr16dTp06EBMTAxr1671HHvu86hVqxbdunVj5cqVl51j7dq1pKWl0bNnT/r160dkZCT33ntvmcSfnZ3NpEmTymSsK7Fy5Up27drl+ffx48e9NvflGIaB3W73dRiXNHjwYM/XDzzwAH/5y1+u6+/B/fffz/vvv49hGGzbto0tW7ZQt25dHn74Yd58801sNltZhO01V3IuZ2RkePWcFxERKUuVrtLk9p///IeXXnqJV199FYBbbrnF87OXX36ZlJQU0tPT2bdvH999912J6oT7U9KJEyeyaNEiDhw4QJ06dQgODmbChAkkJyezb98+Nm7cyO9//3sALBYLTzzxBKtWrWLv3r2sXLmShx566JIxxsbGEh8fz+7du1m/fj2vv/46VapUAUou3xo+fDgbNmwgLS2NV155xfP47t27k5CQwM6dOzlw4ADr169nwoQJF53vtttu8yRM/+///T8GDRrE888/z8iRI7n99ttJTEz0HBsYGMg999wDQGpqKlAy+Tjfu+++S2ZmJo899pjne1OnTiUzM5PHH38cq9XK22+/zZYtW8jIyGDDhg18/vnnpY515513cujQITZv3kyVKlWIiIhgy5YtHDx4kA4dOlC7dm1eeOEFAD744AP69evHhAkTeOSRR+jQoQMzZ84sMZ77gvdKnse54uPjmThxouc1bdWqlednhmHw5JNPkpyczN69e1m1ahVjx471JNiXU9ryPPe/R40axerVq9m9ezfvv/9+icrD888/T2pqKps2bSIuLs7zmHNjK828efOYNGmS578jR46UelyNGjWYP38+27dv58CBA2zbto3333/fc17OmzePzMxMz7kB8PXXX5f4XqdOnZg7dy5paWls3ryZKVOmUK1atQue98MPP8zmzZv56quvMAyDr776ii1btrB//35+/vlnPvvsM2rXru2Zp1OnTixfvpy9e/fy3nvv8eGHH5KZmen5HQfo27cvixcvZteuXaxfv56XX36Z4ODgK3pPLqZDhw40aNCAEydOcOTIEerUqcNdd911zeMFBwfz+uuvYxgGX3/9NX379mXChAkMHz6cbt26kZ+fD0CLFi08ldRt27bx+eef07hxY8847qr6hAkTWLFiBXv27OHVV1+ladOmfP/99+zevZv/+7//IyAgAPit6rhgwQImT57Mrl27WLduXYmEMDg4mBdeeIE1a9awd+9eEhIS6N+/P1BcZXL/LgwbNqzEksRzl+fNnTvX8/q4/y6MHz++1OV5V/ocx40bR0JCAnv37mXmzJlUrVoVgKpVq/Lxxx97qnU//vgjb7755jW/NyIiIhdTaZOmESNGMHnyZF566SUAFi1a5PlZvXr12LRpE//5z3/44YcfaN++PdOnTyc0NLTEGE888QQnTpxgwYIFFBUV8fbbbzN+/HgiIyNZsGABqampniVbf/zjH3nppZcwmUzMnz+fwMBA3nrrrYtWt3r16sU///lPWrRoweLFi8nJyWHUqFH84x//uODYCRMmsG7dOsLDwxk7dixdu3YFiqsmWVlZfPPNN3z99deEhoYyfvx47r///lLn7NevHwDHjh3js88+K/Gz3NxcDh065Pl33759qVKlCunp6bz77rvApZONOXPmAHDfffcBxUlF//79sdvtzJs3jyFDhvD73/+erKws/vOf/5CamkqHDh1KHWvdunX84x//oFatWkyaNInJkydTo0YNPvjgAzZs2MDdd99NQEAADoeDd955p8Rji4qKSlTDbr31Vm655RZyc3M9y6piY2Ov+ELaYrF4lrKdW4X705/+xAsvvEBYWBgLFiygevXqvPLKK4wbN+6Kxr2UCRMmsGHDBiwWCw8++CBxcXFA8YXqc889R1hYGKtWrWL8+PFXPObkyZPZt28fycnJnsS5NGFhYQQFBZGQkMC//vUvsrOzefDBB5k4cSLw2/vsrrhFRUVx5513curUKRITE2nWrBmzZ8+mbdu2JCUlkZaWxogRI/j4448vmOuPf/wjy5cvZ8OGDZjNZmrWrMmKFSv417/+xYEDB+jXrx9vv/02AFWqVOHzzz+nRYsWbN68maioqAuqfj179uTzzz+nXr16xMfHc+TIER5//HFef/31K36dSuM+77///nuWLFkC4HlPrkXHjh2pXr06ULyn6tyK1f79+7HZbNSoUYN58+Zx9913s3HjRrZt20bfvn2ZO3euJ2Fwe+yxx9iyZQtWq5VHH32UBQsWsGfPHoqKihg0aNAFsXbs2JFbb72VlStXUr9+fd577z1atGgBwDvvvMOTTz7J2bNnmT9/PrVq1WLGjBl07tyZTZs2sXHjRgB27drF9OnT+e677y54ft99950nKV+5ciXTp09n06ZNFxx3Nc/xueeeIy0tjYKCAnr37u35cObxxx/n3nvvZd++fcyaNYvdu3df9O+KiIjI9ai0SVPfvn0ZM2YMTZo0oaCggK1bt3p+Nn78eFavXs3Zs2dJT08nLy+PyMhIz4WD29y5cxk5ciRPPvkkdrvd84ns0KFDee655/jv//5v/vrXvwIwatQoANavX09eXh4///wzACNHjiw1vkceeQSAv//97zz99NM8+OCD2Gw27r777gv2zowePZpx48Z5PqFt3bo1UHwB+/HHH3PkyBHOnj3L/v37ATxJ1fmioqIASiRH3333nedT4nM3xLsvFJcsWcLy5cvJz8+nfv36dOzYsdSxf/jhBw4fPsztt9/OzTffTI8ePYiIiCA5OZlffvkFwyheCZqWlsa8efN45plnaNOmTaljAbzxxhts376d3//+98TFxZGamuq5gHY/j5MnT3o+lXdXHc7/JNv9PJKSkkhJSeHQoUOEhYURGxt70bndXn31VQ4dOsTLL79MWloaTzzxhOdn//3f/w0UJ9bjx4/3JDDu9/V6/PGPf+SZZ55h4cKFwG/vt/v8e++993jmmWd49NFHLzuWy+Vi8+bNLFy4kKSkJBo0aMDkyZMvWgXdt28fzz//PLt37yY/P9+zpK9Lly4ALFy4kPz8fGJiYggODmbgwIFYLBYWLlxIUVERI0eOJDAwkJ07d3L
|
||
|
"text/plain": [
|
||
|
"<Figure size 1008x864 with 1 Axes>"
|
||
|
]
|
||
|
},
|
||
|
"metadata": {},
|
||
|
"output_type": "display_data"
|
||
|
}
|
||
|
],
|
||
|
"source": [
|
||
|
"import seaborn as sns\n",
|
||
|
"import matplotlib.pyplot as plt\n",
|
||
|
"\n",
|
||
|
"a4_dims = (14 ,12)\n",
|
||
|
"bg = \"#181818\"\n",
|
||
|
"\n",
|
||
|
"flatui = flatui = [\"firebrick\", \"seagreen\"]\n",
|
||
|
"palette = sns.color_palette(flatui)\n",
|
||
|
"sns.set(rc={ 'grid.color': '#5c5b5b','grid.linestyle': ' ','axes.edgecolor': '#000000','axes.facecolor':bg, 'figure.facecolor':bg,'ytick.color':'white','xtick.color':'white' ,'axes.labelcolor': 'white','text.color': 'white'})\n",
|
||
|
"fig, ax = plt.subplots(figsize=a4_dims)\n",
|
||
|
"#with plt.xkcd():\n",
|
||
|
"cur_axes = plt.gca()\n",
|
||
|
"cur_axes.axes.get_xaxis().set_ticks([])\n",
|
||
|
"plt.title('Barcelona ' + hue_disp1 + ' Rolling 5 average | All Competitions',loc = 'left',color='white',weight = 'semibold')\n",
|
||
|
"\n",
|
||
|
"ax = sns.lineplot(x='X_axis', y=hue_disp2,hue=hue_disp1, data=df_for_disp,palette = palette)"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"metadata": {
|
||
|
"kernelspec": {
|
||
|
"display_name": "Python 3",
|
||
|
"language": "python",
|
||
|
"name": "python3"
|
||
|
},
|
||
|
"language_info": {
|
||
|
"codemirror_mode": {
|
||
|
"name": "ipython",
|
||
|
"version": 3
|
||
|
},
|
||
|
"file_extension": ".py",
|
||
|
"mimetype": "text/x-python",
|
||
|
"name": "python",
|
||
|
"nbconvert_exporter": "python",
|
||
|
"pygments_lexer": "ipython3",
|
||
|
"version": "3.6.9"
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 2
|
||
|
}
|