Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{
"cells": [
{
"cell_type": "code",
"execution_count": 344,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Text(0.5,1,'Correlation between tweet features')"
]
},
"execution_count": 344,
"metadata": {},
"output_type": "execute_result"
},
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAUcAAAELCAYAAABK00R8AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDIuMi4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvIxREBQAAIABJREFUeJzt3XdYk+f+P/B3CEtAREVRsKLHPcAK7lWpC1tRxKq1HrFDba2A1oqioOAEFbUoek49tTJctaJWfgXtceAoPQrYFlGoo1oLyjSCgDKS/P7gS1pMiA+REMD367pyXebJeD53Et/cz7pvkVwul4OIiKrQ03UBRET1EcORiEgFhiMRkQoMRyIiFRiOREQqNJhwlMlkui6BqE7wt14/iBrSqTwJCQmIjY1FfHw8ZDIZysvL4eDggHfeeQcGBgZaWeeNGzcQFhaGTZs2qX3e0aNH0b59e/Tr1w/ffvstrKysMGLEiJde//nz53HlyhV4e3vX6HV/r0fXsrOzsX//fnz22WdaXY+6Nu/ZswfJyckYMmQIpk+fXuP3rqs2AICjo6PW10Evpq/rAmpiz549KCoqgq+vL0xMTPDs2TPs3LkT//nPf/Dpp5/qtLbr16/DxsYGADB16lSd1gJUrUfXcnNz8fDhQ62vR12bz549i+3bt6Nly5YavXddtYHqjwYTjunp6YiPj8fOnTthYmICADA2NsZHH32EmzdvAgCKi4uxd+9e/PHHHxCJROjTpw+mT58OsVgMd3d3ODo64v79+1iwYAECAgKq3DcyMkJERASePHkCuVyOcePGYeTIkVVqePjwIfbu3Ytnz57h8ePHsLW1haenJ+Li4vD777/jwIED0NPTQ1JSEtq1a4cJEyYgLS0NBw4cQElJCfT19TFt2jT06dMH58+fR2Ji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yF7O2DRo0CN999x2KiopQXl5eZXNCFQcHB1y7dg3Z2dmQy+WIiYlR/GjEYjGkUqnWatWETCbDjh070KdPH7Rv317X5VTRo0cP+Pv7IzQ0FFlZWdV+F/v27cOOHTswfvx4+Pv749GjR1r9TTxPX18fS5cuxa5du5CTk1Pt89zc3FBSUoL3338f7u7uVfabv8imTZtw4sQJTJ48GatWrUJaWppiSwWomD5kyZIlat9DLBajvLxc8DorNW3aFB06dFCE448//vjCy3U1XRepJqjnaGxsjMzMTEXgJCYmVvmr97IqN4srubi4YOzYsZg2bRqkUimGDx+OyZMnV7m+++9atGgBPz8/fPjhhzA0NES7du1gbm4OoGJTx9/fHxs3bqy1ejVRub8MqAjHHj16KA4U1KXnP2srKyu0atWqynM6dOiAmTNnYs2aNdi5cyfS0tKUvovKAzIuLi4Qi8Xw9vZWfOZ1ZcSIEejbty9CQkKwbt06lc9ZvHgxlixZAgMDA5iammL9+vWC33/WrFn4/PPPcfToUYjFYmzevBnNmjXD+vXrUVJSAjMzsxf+rvr3749ly5ZpdMrW5s2bERAQgK+++goGBgbYtm2b2p6ivb09QkNDERwc/MLQphcTdBL4tWvX4Ofnh/v376N9+/bIz89HSEgI+vTpUxc1vpBEIkFkZCQ8PDygp6eHdevWwdbWFrNmzdJ1aUTUQAnarJbL5XBxccHhw4fRrFkzFBcXIz8/X9u1CWZhYYGCggJMmDABLi4uKCwsxLRp03RdFhE1YIJ6jtOmTYOXlxckEgliY2OxcuVKeHh4ICoqqi5qJCKqc4J6jjKZDMOGDUNcXBzGjh2Ltm3b1ruDHEREtUlQODZp0gRff/01Ll++DCcnJ0RERKi9KoGIqKETFI7BwcEoLi7G9u3b0axZM2RlZWHLli3aro2ISGc4NSsRkQrav5yBiKgBYjgSEanAcCQiUoHhSESkwv8H99319iOvg58AAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 864x288 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import seaborn as sns\n",
"\n",
"sns.set(style=\"white\")\n",
"# Compute the correlation matrix\n",
"corr = data.corr()\n",
"\n",
"# Generate a mask for the upper triangle\n",
"mask = np.zeros_like(corr, dtype=np.bool)\n",
"mask[np.triu_indices_from(mask)] = True\n",
"\n",
"# Set up the matplotlib figure\n",
"f, ax = plt.subplots(figsize=(12, 4))\n",
"\n",
"# Generate a custom diverging colormap\n",
"cmap = sns.diverging_palette(920, 10, as_cmap=True)\n",
"\n",
"# Draw the heatmap with the mask and correct aspect ratio\n",
"sns.heatmap(corr, mask=mask, cmap=cmap, vmax=.1,\n",
" square=True, xticklabels=True, yticklabels=True,\n",
" linewidths=.5, cbar_kws={\"shrink\": .5}, ax=ax)\n",
"plt.title('Correlation between tweet features', bbox={'facecolor':'0.8', 'pad':0})"
]
}
],
"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.7.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.