diff --git a/notebooks/3.1 Exploratory data analysis I.ipynb b/notebooks/3.1 Exploratory data analysis I.ipynb deleted file mode 100644 index a2d9f86..0000000 --- a/notebooks/3.1 Exploratory data analysis I.ipynb +++ /dev/null @@ -1,1653 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# 3.1 Basic of exploratory data analysis with šŸ¼\n", - "\n", - "In this notebook, we will focus on another essential skill in data analysis, namely the ability to get insights about a dataset by means of plotting and summary statistics." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### `describe()`" - ] - }, - { - "cell_type": "code", - "execution_count": 383, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
week_dayday_hourn_mentionsyear
count2819.0000002819.0000002819.0000002819.000000
mean3.19616912.7825470.8077332014.777226
std1.9466377.6111980.8590911.687017
min0.0000000.0000000.0000002010.000000
25%2.0000005.0000000.0000002013.000000
50%3.00000015.0000001.0000002015.000000
75%5.00000019.0000001.0000002016.000000
max6.00000023.0000006.0000002017.000000
\n", - "
" - ], - "text/plain": [ - " week_day day_hour n_mentions year\n", - "count 2819.000000 2819.000000 2819.000000 2819.000000\n", - "mean 3.196169 12.782547 0.807733 2014.777226\n", - "std 1.946637 7.611198 0.859091 1.687017\n", - "min 0.000000 0.000000 0.000000 2010.000000\n", - "25% 2.000000 5.000000 0.000000 2013.000000\n", - "50% 3.000000 15.000000 1.000000 2015.000000\n", - "75% 5.000000 19.000000 1.000000 2016.000000\n", - "max 6.000000 23.000000 6.000000 2017.000000" - ] - }, - "execution_count": 383, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# the default behavior is to include only\n", - "# column with numerical values\n", - "\n", - "\n", - "df.describe()" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# in this case fails as pandas does not know\n", - "# how to handle a column with values of type list (fair enough)\n", - "\n", - "df.describe(include='all')" - ] - }, - { - "cell_type": "code", - "execution_count": 386, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
created_atweek_dayday_hourn_mentionsyear
count28192819.0000002819.0000002819.0000002819.000000
unique2819NaNNaNNaNNaN
top2013-02-21 06:48:55NaNNaNNaNNaN
freq1NaNNaNNaNNaN
first2010-06-04 18:31:57NaNNaNNaNNaN
last2017-04-05 14:56:29NaNNaNNaNNaN
meanNaN3.19616912.7825470.8077332014.777226
stdNaN1.9466377.6111980.8590911.687017
minNaN0.0000000.0000000.0000002010.000000
25%NaN2.0000005.0000000.0000002013.000000
50%NaN3.00000015.0000001.0000002015.000000
75%NaN5.00000019.0000001.0000002016.000000
maxNaN6.00000023.0000006.0000002017.000000
\n", - "
" - ], - "text/plain": [ - " created_at week_day day_hour n_mentions \\\n", - "count 2819 2819.000000 2819.000000 2819.000000 \n", - "unique 2819 NaN NaN NaN \n", - "top 2013-02-21 06:48:55 NaN NaN NaN \n", - "freq 1 NaN NaN NaN \n", - "first 2010-06-04 18:31:57 NaN NaN NaN \n", - "last 2017-04-05 14:56:29 NaN NaN NaN \n", - "mean NaN 3.196169 12.782547 0.807733 \n", - "std NaN 1.946637 7.611198 0.859091 \n", - "min NaN 0.000000 0.000000 0.000000 \n", - "25% NaN 2.000000 5.000000 0.000000 \n", - "50% NaN 3.000000 15.000000 1.000000 \n", - "75% NaN 5.000000 19.000000 1.000000 \n", - "max NaN 6.000000 23.000000 6.000000 \n", - "\n", - " year \n", - "count 2819.000000 \n", - "unique NaN \n", - "top NaN \n", - "freq NaN \n", - "first NaN \n", - "last NaN \n", - "mean 2014.777226 \n", - "std 1.687017 \n", - "min 2010.000000 \n", - "25% 2013.000000 \n", - "50% 2015.000000 \n", - "75% 2016.000000 \n", - "max 2017.000000 " - ] - }, - "execution_count": 386, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# that's a workaround to include all other columns\n", - "\n", - "df.describe(exclude=[list])" - ] - }, - { - "cell_type": "code", - "execution_count": 320, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "count 2819\n", - "unique 2819\n", - "top 2013-02-21 06:48:55\n", - "freq 1\n", - "first 2010-06-04 18:31:57\n", - "last 2017-04-05 14:56:29\n", - "Name: created_at, dtype: object" - ] - }, - "execution_count": 320, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df.created_at.describe()" - ] - }, - { - "cell_type": "code", - "execution_count": 387, - "metadata": {}, - "outputs": [], - "source": [ - "df['week_day_name'] = df['week_day_name'].astype('category')" - ] - }, - { - "cell_type": "code", - "execution_count": 389, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
created_atweek_dayday_hourn_mentionsyearweek_day_name
count28192819.0000002819.0000002819.0000002819.0000002819
unique2819NaNNaNNaNNaN7
top2013-02-21 06:48:55NaNNaNNaNNaNFriday
freq1NaNNaNNaNNaN530
first2010-06-04 18:31:57NaNNaNNaNNaNNaN
last2017-04-05 14:56:29NaNNaNNaNNaNNaN
meanNaN3.19616912.7825470.8077332014.777226NaN
stdNaN1.9466377.6111980.8590911.687017NaN
minNaN0.0000000.0000000.0000002010.000000NaN
25%NaN2.0000005.0000000.0000002013.000000NaN
50%NaN3.00000015.0000001.0000002015.000000NaN
75%NaN5.00000019.0000001.0000002016.000000NaN
maxNaN6.00000023.0000006.0000002017.000000NaN
\n", - "
" - ], - "text/plain": [ - " created_at week_day day_hour n_mentions \\\n", - "count 2819 2819.000000 2819.000000 2819.000000 \n", - "unique 2819 NaN NaN NaN \n", - "top 2013-02-21 06:48:55 NaN NaN NaN \n", - "freq 1 NaN NaN NaN \n", - "first 2010-06-04 18:31:57 NaN NaN NaN \n", - "last 2017-04-05 14:56:29 NaN NaN NaN \n", - "mean NaN 3.196169 12.782547 0.807733 \n", - "std NaN 1.946637 7.611198 0.859091 \n", - "min NaN 0.000000 0.000000 0.000000 \n", - "25% NaN 2.000000 5.000000 0.000000 \n", - "50% NaN 3.000000 15.000000 1.000000 \n", - "75% NaN 5.000000 19.000000 1.000000 \n", - "max NaN 6.000000 23.000000 6.000000 \n", - "\n", - " year week_day_name \n", - "count 2819.000000 2819 \n", - "unique NaN 7 \n", - "top NaN Friday \n", - "freq NaN 530 \n", - "first NaN NaN \n", - "last NaN NaN \n", - "mean 2014.777226 NaN \n", - "std 1.687017 NaN \n", - "min 2010.000000 NaN \n", - "25% 2013.000000 NaN \n", - "50% 2015.000000 NaN \n", - "75% 2016.000000 NaN \n", - "max 2017.000000 NaN " - ] - }, - "execution_count": 389, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df.describe(exclude=['object'])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Plotting" - ] - }, - { - "cell_type": "code", - "execution_count": 334, - "metadata": {}, - "outputs": [], - "source": [ - "%matplotlib inline\n", - "\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Histograms\n", - "\n", - "They are useful to see the distribution of a certain variable in your dataset." - ] - }, - { - "cell_type": "code", - "execution_count": 184, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
text
n_mentions
01145
11231
2329
378
428
56
62
\n", - "
" - ], - "text/plain": [ - " text\n", - "n_mentions \n", - "0 1145\n", - "1 1231\n", - "2 329\n", - "3 78\n", - "4 28\n", - "5 6\n", - "6 2" - ] - }, - "execution_count": 184, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df.groupby(['n_mentions'])[['text']].count()" - ] - }, - { - "cell_type": "code", - "execution_count": 185, - "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAmoAAAGDCAYAAACbcTyoAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3deZxlZX3n8c/XbhBwAZWWYW+iqEHi2qIGNUSMAXGCM0HFMQaVhJhxi2gUoxl3JWPGJTMuIYKgISBBHVGJSlwAF5aGIKtLD6J0g3Qji6Ag22/+OE/Ltajuqu6uqvt09ef9et1XnXuW5/zOqXvrfuuc59yTqkKSJEn9ude4C5AkSdLkDGqSJEmdMqhJkiR1yqAmSZLUKYOaJElSpwxqkiRJnTKoSUCSjyb52xlqa5ckNydZ0J5/I8mfzUTbrb1/S3LITLW3Dut9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gROa+MXAFevZT0rGU6HnjeNmiSNkUFN0lw5Bfh7hvu6PmhkfIA/rqrvj86c5IkMYWW1O9mwv1n3aKvdu3cvhpstHwS8Anj6hOVuYQhdoybee68YtuOVVfXl0QlJ9mHopzelqro9yY8Y+pV9G7iQ4SjjQ4HLgIcAp1XVCyas43eAS6rqydNZD0MYvmWa80oaI099SporxwBvq6qLJoz/MvDKkT5jj51GW7e3030TnclwinRBkkXA04Bz1tRI69+1dbth/WuY/HTgZQxBadRzk9wryUMYTqN+v23HX66uK8nDRk7hrsu2nAm8DjijDb8M+I8absx8FsMp24e2ddyn9aH7PrAoyZPb+M2SPLK1dxNwvwnrfBhw8TRqkzRmBjVJc6KqllfVP0wy6R3AZsCFSS5pz6dyVJv/+AnjP8twFOq7wNeA11fVT9fSzv2ALyS5EPgmcPgk85wBPHZ1kGx+whAA/w14WVXdCnyM4WKB85NcDPwj0zsCOHFbzmQ43fqdqrqG4dTsmQBVtYrhaNsJrebvAI+oqtsYjgj+XZLvAhcAq6+EPZahH90FSbZMsh1Dv7i17RdJncjwT5okaU2SfBD4fFX9e5JjgS+0jvobnSSvAX5eVUePuxZJU/OImiRN7d3AVuMuYobcABw37iIkTY9H1CRJkjrlETVJkqROGdQkSZI6ZVCTJEnqlEFNkiSpUwY1SZKkThnUJEmSOvX/Ab31rhvd0pIcAAAAAElFTkSuQmCC", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "%matplotlib inline\n", - "plt.figure(figsize=(10, 6))\n", - "plt.hist(df.n_mentions, bins='auto', rwidth=1.0)\n", - "plt.title('Distribution of the number of mentions per tweet')\n", - "plt.ylabel(\"Tweets\")\n", - "plt.xlabel(\"Mentions (per tweet)\")\n", - "plt.show()" - ] - }, - { - "cell_type": "code", - "execution_count": 187, - "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAmQAAAGDCAYAAACFuAwbAAAABHNCSV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L8o7W9tfA44GjkvzdhFUOB34rydlJXtXadkzy+STfT/K3I30/Nck3kpyV5N/aNQEnPv6jknwnyXeAQyds51faumcleWxrPzbJ/iPLfSTJfjN8GiVtJgxkknraqgWes5OcDbx5ZN4/AsdU1W8AHwHeM43+Hgm8oqoeNNqYZEfgHcATGc4g/+gk+1fVm4EVwPOr6rUT+loOfKWqllbVEa1tKfBc4NeB5ybZJcl2wBuAJ7eL3K8AXj1JbR8CXl5VD5/QvhZ4Slv3uSPbeRTwolb/1sBjgROn8RxI2gzNZLe+JG1qP6+qpevvJHkRsKzdfQzwf9r0h4G/ZWpnVNUPJml/NPDlqlrXHucjwG8zXKppJk6pqmtaHxcAuwHbAHsAXxsuCchdgW+MrpRkG2Cbqjp9ZHue0aa3BP4pyVLgZuBBAFV1WpL3JVkM/D7wqaq6aYb1StpMGMgkbW5uou3dT3IXhgC03k/H/Ng3jEzfzPBvaICTq+p5d7DPVzFcA/LhDNt1/ci8Y4E/BA4ADrqD/UvaDHjIUtJc9XWGIALwfIaLH8NwsepHtenfZdjDNJUzgN9Jsl2SRcDzgNOmWOda4N7T6PubwOOSPBAgyT2T/NIh06q6Gri6XcQZhu1Zb2tgTVXdArwAWDQy72jgla2P242LkzR/GMgkzVUvBw5Kcg5DUHlFa/8AQ7j6DsNhzSn3ilXVGoYxYacC3wHOrKrjp1jtHODmNhD/VRtaqB0GfRHwsVbrN4AHT7LoQcB721i5jLS/Dziwbc+DR7enqi4HLmQYfyZpHktV9a5BkjSJJPcAzgUeuX7smqT5yT1kkjQHJXkyw96xfzSMSfOfe8gkSZI6cw+ZJElSZwYySZKkzgxkkiRJnRnIJEmSOjOQSZIkdWYgkyRJ6uz/Ax8RhNHWt6jvAAAAAElFTkSuQmCC", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "%matplotlib inline\n", - "plt.figure(figsize=(10, 6))\n", - "plt.hist(df.day_hour, bins='auto', rwidth=0.6)\n", - "plt.title('Distribution of the number of mentions per tweet')\n", - "plt.ylabel(\"Tweets\")\n", - "plt.xlabel(\"Hour of the day\")\n", - "plt.show()" - ] - }, - { - "cell_type": "code", - "execution_count": 188, - "metadata": {}, - "outputs": [], - "source": [ - "df_2017 = df[df.created_at.dt.year == 2017]" - ] - }, - { - "cell_type": "code", - "execution_count": 189, - "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAl4AAAGDCAYAAAD6aR7qAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAYAUlEQVR4nO3de9RldX3f8c9XRqOgAspoETSjFWNojaij9X4BzVLJElqt15jRaGlatHhp4mhrTVxLg2mrSYymRRHQoNZbAgkJ1uAltDHqQFEUakXFCHIZLyhovCDf/nH2xCfjDPMMcH7nmcPrtdaznnP25ezfM2cdeK+999m7ujsAAMzfLRY9AACAmwvhBQAwiPACABhEeAEADCK8AAAGEV4AAIMILwCAQYQXsFBV9UdVddJ20x5VVd+oqgMHbP8NVXVRVV1dVRdW1bO2m3//qjq3qr5XVZ+qql9YMe+IqvpoVX2nqi7abr17VNU12/10VR03778JWLuEF7BoxyV5QlU9Lkmq6tZJ3pLkpd192U25oaraaweTr0lyZJJ9k/xqkjdV1YOm5X8myWlJTkqyf5J3JfmTqrrltO53k7w1ycu2f9Hu/lJ333bbT5L7Jbkuyftvyr8J2LMIL2ChuvsbSV6Y5ISq2ifJq5J8sbtPTpKqukVVvaKqvlhVX6+qd1fV/ivmva+qLq+qq6a9Tz+/7bWnvWlvqqozq+q7SR6xg+2/srs/393XdffHk/x1kodMs49Icl13v7G7f5DkDUl+JsmjpnX/prv/KMmXV/Gn/kqSD3f3JTfk3wlYDsILWLjufm+SczPbo3TM9LPNizPbI/XIJAdntofq91fM/7M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/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "%matplotlib inline\n", - "plt.figure(figsize=(10, 6))\n", - "plt.hist(df_2017.day_hour, bins='auto', rwidth=0.6)\n", - "plt.title('Year 2017')\n", - "plt.ylabel(\"Tweets\")\n", - "plt.xlabel(\"Hour of the day\")\n", - "plt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "So far we have used directly `matplotlib` to generate our plots.\n", - "\n", - "`pandas`'s dataframes provide some methods that directly call `matplotlib`'s API behind the scenes:\n", - "- `hist()` for histograms\n", - "- `boxplot()` for boxplots\n", - "- `plot()` for other types of plots (specified with e.g. `any='scatter'`)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "By passing the `by` parameter to e.g. `hist()` it is possible to produce one histogram plot of a given variable for each value in another column." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Let's see how we can plot the number of mentions by year:" - ] - }, - { - "cell_type": "code", - "execution_count": 335, - "metadata": {}, - "outputs": [], - "source": [ - "df['year'] = df.created_at.dt.year" - ] - }, - { - "cell_type": "code", - "execution_count": 356, - "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAmgAAAJOCAYAAAADGvtiAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nOzde5hlZXnn/e+Pk0ZRjp0eQtMWb0QNGgGnhmhIIhFMUBwho2FwPIBD0pk3oibmndjmoDEzydXMJFHmGiXpiNoah0OIDj3AiA7COBkj2o2IctIWG2nCoeUUMRpF7/ePvQo3ZfWhah/Wqr2/n+vaV+/1rLX2vld13bXv/axnPStVhSRJkrpjj7YDkCRJ0mNZoEmSJHWMBZokSVLHWKBJ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khwBr+9ybnh6vq9faqGo9p/pJNcg/wKwa/XHc265YDlwCfrKpPtFjexLB/7B/7R+qHzj3FWVVvAA+2XUdLnk1yJfN/yT63rw/2wOeBDcBvmmMuYCeDOSgvaLOwSWL/2D/2j9QPnTuDNs2SvIvBl+x5DG70hTe/ZGeq6uW2ahuHZoiIFcCDVfXanPXn9P3ynIZn/9g/Up8Y0CZEki9X1Y/brmNUknwFuAzYBpwKXFFVm5ttj1bVh9usT5PN/rF/pEljQJsQEWXaxQAAANVJREFUSf5SVSvbrmNUkjwBfLSqXkuyCrgV+GlVXZvksao6rdUCNdHsH/tHmjSduwdtmiX5w0KbgOXjrKUFh+y9LFNVs0nOAG5NciKD45f2yf6xf6Q+MaB1y3LgUwzGLporwO/GX85Y7UxyalU9DtCcCTgXuAH4YLulaULYP/aP1BsGtG65HTh875fsXEkeGH85Y3UxsGfuiqraA1yc5Lp2StKEsX/msH+kyeY9aJIkSR3TtameJEmSpp4BTZIkqWMMaJIkSR1jQJMkSeoYA5okSVLH/Adq2J2Y2TdD4QAAAABJRU5ErkJggg==", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "axes = df.hist(column='day_hour', by='year', figsize=(10,10))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Scatter plots\n", - "\n", - "They are useful to plot the relation between two variables in your dataset." - ] - }, - { - "cell_type": "code", - "execution_count": 176, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
created_attexttweet_linkweek_dayday_hourtweet_mentionsn_mentions
id
8496368680522752002017-04-05 14:56:29b'And so the robots spared humanity ... https://t.co/v7JUJQWfCv'https://twitter.com/i/web/status/849636868052275200Wednesday14[]0
8489887305850961922017-04-03 20:01:01b\"@ForIn2020 @waltmossberg @mims @defcon_5 Exactly. Tesla is absurdly overvalued if based on the past, but that's irr\\xe2\\x80\\xa6 https://t.co/qQcTqkzgMl\"https://twitter.com/i/web/status/848988730585096192Monday20[@ForIn2020, @waltmossberg, @mims, @defcon_5]4
8489430724234977282017-04-03 16:59:35b'@waltmossberg @mims @defcon_5 Et tu, Walt?'https://twitter.com/i/web/status/848943072423497728Monday16[@waltmossberg, @mims, @defcon_5]3
\n", - "
" - ], - "text/plain": [ - " created_at \\\n", - "id \n", - "849636868052275200 2017-04-05 14:56:29 \n", - "848988730585096192 2017-04-03 20:01:01 \n", - "848943072423497728 2017-04-03 16:59:35 \n", - "\n", - " text \\\n", - "id \n", - "849636868052275200 b'And so the robots spared humanity ... https://t.co/v7JUJQWfCv' \n", - "848988730585096192 b\"@ForIn2020 @waltmossberg @mims @defcon_5 Exactly. Tesla is absurdly overvalued if based on the past, but that's irr\\xe2\\x80\\xa6 https://t.co/qQcTqkzgMl\" \n", - "848943072423497728 b'@waltmossberg @mims @defcon_5 Et tu, Walt?' \n", - "\n", - " tweet_link \\\n", - "id \n", - "849636868052275200 https://twitter.com/i/web/status/849636868052275200 \n", - "848988730585096192 https://twitter.com/i/web/status/848988730585096192 \n", - "848943072423497728 https://twitter.com/i/web/status/848943072423497728 \n", - "\n", - " week_day day_hour \\\n", - "id \n", - "849636868052275200 Wednesday 14 \n", - "848988730585096192 Monday 20 \n", - "848943072423497728 Monday 16 \n", - "\n", - " tweet_mentions n_mentions \n", - "id \n", - "849636868052275200 [] 0 \n", - "848988730585096192 [@ForIn2020, @waltmossberg, @mims, @defcon_5] 4 \n", - "848943072423497728 [@waltmossberg, @mims, @defcon_5] 3 " - ] - }, - "execution_count": 176, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df.head(3)" - ] - }, - { - "cell_type": "code", - "execution_count": 357, - "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAl4AAAGDCAYAAAD6aR7qAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3dfZzVdZ338ffbEXUylSXRhECMDNcV00KBC6/WtgzTtlh3t5YLKtvC2u3+hlaTR+peuLZR1j62m2sly1qI8iqb3GwlM+mGC0iMckwlxRtwKKGIUJu8GT/XH78feDjMnJlz+M7vd86c1/PxmIdzvufucz4zOm9/dx9HhAAAADD8Dii7AAAAgHZB8AIAACgIwQsAAKAgBC8AAICCELwAAAAKQvACAAAoCMELaEK2r7G9uKT3tu0v2v6d7Z+UUUMttn9h+8yy66iX7bD9grLr6I/txbZ/Y/vXQ3z8pbaXDVMt59v+8XC8NtAMCF7AENh+wPY224dWrL3V9qoSyxouZ0g6S9LzIuL0MgvpL4BGxJ9FxKqSShpxbE+U9AFJJ0bEc/u5/0zbDxVfGTAyEbyAoeuQ9J6yi6iX7Y46n3KspAci4rHhqAfDy/aBdT5loqTfRsS24agHwN4IXsDQLZH0Qdujq++wPSnflXRgxdoq22/Nvz/f9mrbn7S90/Z9tv9Hvr4l35r2pqqXPdL2TbYfsf0D28dWvPYJ+X07bG+0/bqK+66x/Tnb37H9mKSX9VPvONvX58+/1/aCfP0tkj4vaabtR21f1s9z6/ostg+2/XHbm20/bPv/2O7M7zvT9kO2P5A/71e235zfd4GkeZI+lNfyX/n6A7ZfUfHan7K9Nf/6lO2DB3vt/P5zbN+Z97fH9gf7+awH55/xpIq1sbZ7bR9l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JJ2Yj3WRpMNtPzv//oaIeFzS47a3KRsBU8sZkv5dkiLibtsPStodvG6OiN/ntdwp6VhJv5D0/DyE3VBRH4AmR/ACsD8+Jemnkr5YsfaU8sMYbB8g6aCK+x6v+P7pittPa+//HlXPMgtJlvSuiFhZeYftMyU91lj5AxpKnQdImhERf6yqp/r5fdq//9bu81oR8TvbL5I0W9LbJb1O0t/vx3sAKAjHeAFoWETskHStsgPVd3tA2a49SXqNpFENvPTf2j4gP57q+ZI2KtuV9w+2R0mS7RfaPnSQ1/mJpD+3fWQ+EHuupB80UE9/vqtst6Pyek4Z5PGPKNv12J8fSZqXv84LJU1U9pn7lZ/UcEBEfEPSImW7WgG0AIIXgP31CUmVZzcuVRZ2fi5pphrbGrVZWWj6b0lvz7cqfV7ZwfM/zQ9K/w8NsiUp3114oaRbJP1c0m0R8a0G6unPuyVNyw/0v1PZlqdatfxW2XFpd1Qf0C/ps5IOsN0t6WuSzs93VQ5kvKRVtn8maZmkixr+FAAK5YjqLfoAAAAYDmzxAgAAKAjBCwAAoCAELwAAgIIQvAAAAApC8AIAACgIwQsAAKAgBC8AAICCELwAAAAK8v8BGAnb7ptrn1kAAAAASUVORK5CYII=", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "%matplotlib inline\n", - "plt.figure(figsize=(10, 6))\n", - "\n", - "# specify the type of plot and the two\n", - "# variables to be plotted against one another\n", - "plt.scatter(df.n_mentions, df.day_hour)\n", - "\n", - "# give a title to the plot\n", - "plt.title('Number of mentions vs hour of the day')\n", - "\n", - "# give a label to the axes\n", - "plt.ylabel(\"Day hour\")\n", - "plt.xlabel(\"Number of mentions\")\n", - "plt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Bar charts\n", - "\n", - "They are useful to plot categorical data." - ] - }, - { - "cell_type": "code", - "execution_count": 170, - "metadata": {}, - "outputs": [], - "source": [ - "plt.bar?" - ] - }, - { - "cell_type": "code", - "execution_count": 343, - "metadata": {}, - "outputs": [], - "source": [ - "tweets_by_weekday = df.groupby(df.created_at.dt.weekday)[['text']].count()" - ] - }, - { - "cell_type": "code", - "execution_count": 344, - "metadata": {}, - "outputs": [], - "source": [ - "week_days = [\n", - " \"Mon\",\n", - " \"Tue\",\n", - " \"Wed\",\n", - " \"Thur\",\n", - " \"Fri\",\n", - " \"Sat\",\n", - " \"Sun\"\n", - "]" - ] - }, - { - "cell_type": "code", - "execution_count": 360, - "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAfQAAAGDCAYAAADd8eLzAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3deZglZX328e8toKCMso2E1SGRuEYJjoq4oBIXRIVEcFcwRDTRhLwaFRW3l6jkjUpCTAwoJmiMSFAQhUQQBVQUGRRZXOIEIawyKMsAig783j+qWs+03T2nmzm9PP39XFdfXfVUnapf9enr3KeeU6eeVBWSJGlhu8dcFyBJku4+A12SpAYY6JIkNcBAlySpAQa6JEkNMNAlSWqAga5FL8mBSb4613XMRJJK8sC5rmM6klye5A/muo7pSnKvJLcm2Xaua5EmYqBrUehD5Gf9C/LYzwdHvM8n94F70rj2R/btZ414/95kAkjykoHn/GdJ7hr8Pxh2O1V1R1VtWlXX9Ns9Pslh4/Z1XZInrO9jkIZhoGsxeU7/gjz289pZ2Ocq4HFJthxoOwD471nYt4Cq+sTYcw7sBVwz+H8w1/WNSXKPJL4ma8b855HGSbJ7kvOT3Nz/3n1g2VlJDk/ytSSrk5yeZKspNvcL4GTghf3jNwBeAHxiYJvL+jP2Dcft50/66QcmObuv54Ykn5qk7ickuTLJkydYdmCSy/qaf5TkJROss3F/BrtVP//WJGuS3LefPzzJ3/XT90ryviT/m+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bFu4qFoqquAo6aYNE7gY8muQi4ne7dXdOq6udJ3kP3GdrVwODXml4IfKh/J39P4N+A78x6kXfPxXRXt//7uLZNq+oG4PQkDwG+3n+0cCvw0qr6VpJP0R3v9XRjFLTsfcAJ6UZBPHWui9HdtinwD/1HZ2uAlXSjW95E11N1HWv/T/8r8M9JfgY8boF+jj7ZMT8EODbJ4XRn7/Oed4qTJKkBdrlLktQAA12SpAYY6JIkNcBAlySpAQa6JEkNMNClBmU9jhg3wbZvneb6C2bEOWkhM9ClNo3d6Y78esS4hw0s353uBjmSGmGgS20aasQ4gClGjXtpkm/2g5McnWSDwR30o6t9PcnejDPZiHNJXtnv6ztJPp3k3kmWJPnR2AAXSe47OC9pOAa61KBhRoyrql8keToTjxr3EOAFwOP7+/LfSX97Y4AkW9PdGe7tVbXWHeLWMeLcZ/pRux4JfA84qKpW092Ja+yNwQv79X653v4g0iLgrV+ldq1rxDiYfNS4R9Ddx/r8/ta2m9DdyhZgI7oxzl9TVWdPsN8nMvmIcw9P8td098XflO6e+AAfAd4InAy8AnjlTA9aWqwMdKld6xoxDrrR8SYaNe7PgeOq6s0TbHcN3RCqzwAmCvSp/Cuwb1V9J8mBdCMXUlVfS7KsH9xog6q6ZJrblUU6Ig4AAADiSURBVBY9u9yldq1rxDiYfNS4M4H9+mmSbJHkAf1jCvhj4MFJ3jTBfqcacW4J3Wh8GzHQhd/7GN1gOP+CpGkz0KV2jY0Y941xbTf3I8ZRVafThejX+3GgTwSWVNV3gcPoRpW7CDgD2GZsI/340S8CnprkzwZ3WlXfAsZGnPtP1h6d6210n+V/Dfj+uHo/AWwOfPJuHLO0aDnamqR5Icl+wD5V9bK5rkVaiPwMXdKcS/IPwF50V8VLmgHP0CVJaoCfoUuS1AADXZKkBhjokiQ1wECXJKkBBrokSQ0w0CVJasD/B1kBS7YOiQJ8AAAAAElFTkSuQmCC", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "%matplotlib inline\n", - "plt.figure(figsize=(8, 6))\n", - "\n", - "# specify the type of plot and the labels\n", - "# for the y axis (the bars)\n", - "plt.bar(\n", - " tweets_by_weekday.index,\n", - " tweets_by_weekday.text,\n", - " tick_label=week_days,\n", - " width=0.5\n", - ")\n", - "\n", - "# give a title to the plot\n", - "plt.title('Elon Musk\\'s week on Twitter')\n", - "\n", - "# give a label to the axes\n", - "plt.ylabel(\"Number of tweets\")\n", - "plt.xlabel(\"Week day\")\n", - "plt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Box plots\n", - "\n", - "![box plot explained](./figures/eda-boxplot.png)" - ] - }, - { - "cell_type": "code", - "execution_count": 346, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
text
created_at
0315
1385
2380
3361
4530
5426
6422
\n", - "
" - ], - "text/plain": [ - " text\n", - "created_at \n", - "0 315\n", - "1 385\n", - "2 380\n", - "3 361\n", - "4 530\n", - "5 426\n", - "6 422" - ] - }, - "execution_count": 346, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "tweets_by_weekday" - ] - }, - { - "cell_type": "code", - "execution_count": 347, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
text
count7.000000
mean402.714286
std67.551744
min315.000000
25%370.500000
50%385.000000
75%424.000000
max530.000000
\n", - "
" - ], - "text/plain": [ - " text\n", - "count 7.000000\n", - "mean 402.714286\n", - "std 67.551744\n", - "min 315.000000\n", - "25% 370.500000\n", - "50% 385.000000\n", - "75% 424.000000\n", - "max 530.000000" - ] - }, - "execution_count": 347, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "tweets_by_weekday.describe()" - ] - }, - { - "cell_type": "code", - "execution_count": 349, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 349, - "metadata": {}, - "output_type": "execute_result" - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD4CAYAAAAXUaZHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAMw0lEQVR4nO3db4hl9XnA8e+TXa1iNm6rZpBdyZTGFwNbYmVqhGxhdqUS/xB9kZbYBsUObNOKDQ01rixNUTpE2xemQhGXDHGlcdsQkCxqbILOJd22prq4WsMEuiSKu6y1SrJkNBGVpy/mtzCuszv37sydO/PM9wOXued3zpnzu3D3u4cz909kJpKkWj406AlIkpaecZekgoy7JBVk3CWpIOMuSQWtH/QEAM4///wcHh4e9DSkD3jzzTc555xzBj0NaV4HDhx4PTMvmG/dioj78PAwzz777KCnIX1Ap9NhbGxs0NOQ5hURL59snZdlJKkg4y5JBRl3SSrIuEtSQcZdkgoy7tI89u7dy5YtW7jiiivYsmULe/fuHfSUpJ6siJdCSivJ3r172bVrF5OTk7z33nusW7eO8fFxAG644YYBz07qjmfu0gkmJiaYnJxk27ZtrF+/nm3btjE5OcnExMSgpyZ1zbhLJ5ienmbr1q3vG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Kz952kJeSZu9aUzOzpNjU11fM+hl0rgXGXpIKMuyQVZNwlqSDjLkkFGXdJKsi4S1JBxl2SCjLuklRQrIQ3XETE/wEvD3oe0jzOB14f9CSkk/hYZl4w34oVEXdppYqIZzNzdNDzkHrlZRlJKsi4S1JBxl06td2DnoB0OrzmLkkFeeYuSQUZd0kqyLhrzYqIjRHx56e573BE/NFSz0laKsZda9lG4LTiDgwDxl0rlnHXWnY38FsRcTAi/j4ibouIZyLihYi4EyAifrctnxUR50TEjyJiS9v399q+fznQRyHNw1fLaM2KiGHg0czcEhFXAp8F/hQIYB/wd5n5g4j4W+As4GzgcGZ+NSLGgL/KzGsHMnlpAesHPQFphbiy3Z5ryx8GLgZ+ANwFPAP8CviLgcxO6pFxl2YF8NXMfGCedecxG/szmD2Df3M5JyadDq+5ay37BbCh3f9X4E8i4sMAEbEpIj7a1j0A/DXwTeCeefaVVhzP3LVmZeYbEfHvEfEi8F3gYeA/IwJgBvh8RHwaeCczH46IdcB/RMR24N+A9yLieeDBzLx3QA9Dmpd/UJWkgrwsI0kFGXdJKsi4S1JBxl2SCjLuklSQcZekgoy7JBX0/wx1Y9pk3PIIAAAAAElFTkSuQmCC", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "tweets_by_weekday.boxplot()" - ] - }, - { - "cell_type": "code", - "execution_count": 175, - "metadata": {}, - "outputs": [], - "source": [ - "plt.bar?" - ] - }, - { - "cell_type": "code", - "execution_count": 222, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
created_attexttweet_linktweet_mentionsn_mentionsweek_dayday_hour
id
8496368680522752002017-04-05 14:56:29b'And so the robots spared humanity ... https://t.co/v7JUJQWfCv'https://twitter.com/i/web/status/849636868052275200[]0214
8489887305850961922017-04-03 20:01:01b\"@ForIn2020 @waltmossberg @mims @defcon_5 Exactly. Tesla is absurdly overvalued if based on the past, but that's irr\\xe2\\x80\\xa6 https://t.co/qQcTqkzgMl\"https://twitter.com/i/web/status/848988730585096192[@ForIn2020, @waltmossberg, @mims, @defcon_5]4020
8489430724234977282017-04-03 16:59:35b'@waltmossberg @mims @defcon_5 Et tu, Walt?'https://twitter.com/i/web/status/848943072423497728[@waltmossberg, @mims, @defcon_5]3016
\n", - "
" - ], - "text/plain": [ - " created_at \\\n", - "id \n", - "849636868052275200 2017-04-05 14:56:29 \n", - "848988730585096192 2017-04-03 20:01:01 \n", - "848943072423497728 2017-04-03 16:59:35 \n", - "\n", - " text \\\n", - "id \n", - "849636868052275200 b'And so the robots spared humanity ... https://t.co/v7JUJQWfCv' \n", - "848988730585096192 b\"@ForIn2020 @waltmossberg @mims @defcon_5 Exactly. Tesla is absurdly overvalued if based on the past, but that's irr\\xe2\\x80\\xa6 https://t.co/qQcTqkzgMl\" \n", - "848943072423497728 b'@waltmossberg @mims @defcon_5 Et tu, Walt?' \n", - "\n", - " tweet_link \\\n", - "id \n", - "849636868052275200 https://twitter.com/i/web/status/849636868052275200 \n", - "848988730585096192 https://twitter.com/i/web/status/848988730585096192 \n", - "848943072423497728 https://twitter.com/i/web/status/848943072423497728 \n", - "\n", - " tweet_mentions n_mentions \\\n", - "id \n", - "849636868052275200 [] 0 \n", - "848988730585096192 [@ForIn2020, @waltmossberg, @mims, @defcon_5] 4 \n", - "848943072423497728 [@waltmossberg, @mims, @defcon_5] 3 \n", - "\n", - " week_day day_hour \n", - "id \n", - "849636868052275200 2 14 \n", - "848988730585096192 0 20 \n", - "848943072423497728 0 16 " - ] - }, - "execution_count": 222, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df.head(3)" - ] - }, - { - "cell_type": "code", - "execution_count": 351, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
day_hour
count2819.000000
mean12.782547
std7.611198
min0.000000
25%5.000000
50%15.000000
75%19.000000
max23.000000
\n", - "
" - ], - "text/plain": [ - " day_hour\n", - "count 2819.000000\n", - "mean 12.782547\n", - "std 7.611198\n", - "min 0.000000\n", - "25% 5.000000\n", - "50% 15.000000\n", - "75% 19.000000\n", - "max 23.000000" - ] - }, - "execution_count": 351, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df[['day_hour']].describe()" - ] - }, - { - "cell_type": "code", - "execution_count": 354, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "day_hour 5.0\n", - "Name: 0.25, dtype: float64" - ] - }, - "execution_count": 354, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df[['day_hour']].quantile(.25)" - ] - }, - { - "cell_type": "code", - "execution_count": 247, - "metadata": {}, - "outputs": [], - "source": [ - "df.boxplot?" - ] - }, - { - "cell_type": "code", - "execution_count": 251, - "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAe4AAAGTCAYAAADuq/FJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW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D+lHoG/lHp/+DdTn598USnlccMJUh83e9MET6mCej/p7ZNsNMGjeqU1lk3l0irWjqA/CXy0Pc97A+CqdsS7F/WodOQQ4A0ApZQfc1enAC9Isnab707Aj6Yowtgnp01koqctjVeGt1CPxM8Bngz8vpTya2qYb5rkcW0e6yR5eHtq3aVJntf6J8ufUgXwDWqT/fHtaF5SY3BLq8Z6o38HA74NnEh9YhnUc7t7JzkPeBh3fkb0NdSnlE30BKFjgfOpTz76LvC2UsrVU5Tla8Czx1ycdhellBOpTd+npz7r+0uMH/inUJvJT25N9pcD32/z+AP1UZofaOt3LrWJHOp9ml/W+l8E3OnCu1LK0cCngeOSrIckwHuVS/NakntRH134mHYEK2kN5xG3NE8l2YV6tH2goS1pxCNuSZI64hG3JEkdMbglSeqIwS1JUkcMbkmSOmJwS5LUkf8PcpANSdCEqd0AAAAASUVORK5CYII=", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "%matplotlib inline\n", - "\n", - "df[['day_hour', 'week_day_name']].boxplot(\n", - " by='week_day_name',\n", - " grid=False,\n", - " figsize=(8,6),\n", - " fontsize=10\n", - ")\n", - "\n", - "# give a title to the plot\n", - "plt.title('')\n", - "\n", - "# give a label to the axes\n", - "plt.xlabel(\"Day of the week\")\n", - "plt.show()" - ] - }, - { - "cell_type": "code", - "execution_count": 252, - "metadata": {}, - "outputs": [ - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAe4AAAGTCAYAAADuq/FJAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAdxUlEQVR4nO3deZSkdX3v8ffHmRFxQJSAHbbQMSFG1Cs6E4wbmYnoxeUG4xL1Rg4Yk4k5atBodDQmxiQk5HpikusaFWSICi5IJMJB0Ew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vMfQ7ZVOOwV4MUBVzXaVoguBZyZZ0a/3COCzc5RwO7DnTpT6EeB3+r1jkhzQn1g3Ww0vo9sT/xywHvh+VX2HLsz3TfKIfh2rkjywv/7515M8ox+fJA8ZWOe5dIfsz56+YpWkjsEt7Rq7T/87GPBR4Dxg+mSvNwPHJrkc+GXgjumFquom4CrgndtZ75nA54HLgX8DXt5fmnBH/hX4zRknp22jqs6jO/T96SRfoLs28WwheiHdYfIL+kP21wKf6NfxA+DpwN/2j+8yukPkAL8NPK8ffyXwUyfeVdX7gbcDZ/WXHZWEVweTFrUk9wS+ADys34OVtMy5xy0tUkmOpNvbfoOhLWmae9ySJDXEPW5JkhpicEuS1BCDW5KkhhjckiQ1xOCWJKkh/x9ZqOA6Fj/ykAAAAABJRU5ErkJggg==", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "%matplotlib inline\n", - "\n", - "df[['day_hour', 'week_day']].boxplot(\n", - " by='week_day',\n", - " grid=True, # just to show the difference with/without\n", - " figsize=(8,6),\n", - " fontsize=10\n", - ")\n", - "\n", - "# give a title to the plot\n", - "plt.title('')\n", - "\n", - "# give a label to the axes\n", - "plt.xlabel(\"Day of the week\")\n", - "plt.show()" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "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.10.4" - }, - "toc": { - "base_numbering": 1, - "nav_menu": {}, - "number_sections": false, - "sideBar": true, - "skip_h1_title": false, - "title_cell": "Table of Contents", - "title_sidebar": "Contents", - "toc_cell": false, - "toc_position": { - "height": "calc(100% - 180px)", - "left": "10px", - "top": "150px", - "width": "384px" - }, - "toc_section_display": true, - "toc_window_display": true - } - }, - "nbformat": 4, - "nbformat_minor": 2 -} diff --git a/notebooks/3.1 Exploratory data analysis basics.ipynb b/notebooks/3.1 Exploratory data analysis basics.ipynb index 8089ec7..f44c8e7 100644 --- a/notebooks/3.1 Exploratory data analysis basics.ipynb +++ b/notebooks/3.1 Exploratory data analysis basics.ipynb @@ -11,7 +11,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 7, "metadata": {}, "outputs": [], "source": [ @@ -27,13 +27,202 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "df = pd.read_pickle(\"./musk_tweets_enhanced.pkl\")" ] }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "Int64Index: 2819 entries, 849636868052275200 to 15434727182\n", + "Data columns (total 8 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 created_at 2819 non-null datetime64[ns]\n", + " 1 text 2819 non-null object \n", + " 2 tweet_link 2819 non-null object \n", + " 3 tweet_mentions 2819 non-null object \n", + " 4 n_mentions 2819 non-null int64 \n", + " 5 week_day_name 2819 non-null object \n", + " 6 week_day 2819 non-null int64 \n", + " 7 day_hour 2819 non-null int64 \n", + "dtypes: datetime64[ns](1), int64(3), object(4)\n", + "memory usage: 198.2+ KB\n" + ] + } + ], + "source": [ + "df.info()" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
created_attexttweet_linktweet_mentionsn_mentionsweek_day_nameweek_dayday_hour
id
8496368680522752002017-04-05 14:56:29b'And so the robots spared humanity ... https:...https://twitter.com/i/web/status/8496368680522...[]0Wednesday214
8489887305850961922017-04-03 20:01:01b\"@ForIn2020 @waltmossberg @mims @defcon_5 Exa...https://twitter.com/i/web/status/8489887305850...[@ForIn2020, @waltmossberg, @mims, @defcon_5]4Monday020
8489430724234977282017-04-03 16:59:35b'@waltmossberg @mims @defcon_5 Et tu, Walt?'https://twitter.com/i/web/status/8489430724234...[@waltmossberg, @mims, @defcon_5]3Monday016
8489357050572800012017-04-03 16:30:19b'Stormy weather in Shortville ...'https://twitter.com/i/web/status/8489357050572...[]0Monday016
8484160495736586242017-04-02 06:05:23b\"@DaveLeeBBC @verge Coal is dying due to nat ...https://twitter.com/i/web/status/8484160495736...[@DaveLeeBBC, @verge]2Sunday66
\n", + "
" + ], + "text/plain": [ + " created_at \\\n", + "id \n", + "849636868052275200 2017-04-05 14:56:29 \n", + "848988730585096192 2017-04-03 20:01:01 \n", + "848943072423497728 2017-04-03 16:59:35 \n", + "848935705057280001 2017-04-03 16:30:19 \n", + "848416049573658624 2017-04-02 06:05:23 \n", + "\n", + " text \\\n", + "id \n", + "849636868052275200 b'And so the robots spared humanity ... https:... \n", + "848988730585096192 b\"@ForIn2020 @waltmossberg @mims @defcon_5 Exa... \n", + "848943072423497728 b'@waltmossberg @mims @defcon_5 Et tu, Walt?' \n", + "848935705057280001 b'Stormy weather in Shortville ...' \n", + "848416049573658624 b\"@DaveLeeBBC @verge Coal is dying due to nat ... \n", + "\n", + " tweet_link \\\n", + "id \n", + "849636868052275200 https://twitter.com/i/web/status/8496368680522... \n", + "848988730585096192 https://twitter.com/i/web/status/8489887305850... \n", + "848943072423497728 https://twitter.com/i/web/status/8489430724234... \n", + "848935705057280001 https://twitter.com/i/web/status/8489357050572... \n", + "848416049573658624 https://twitter.com/i/web/status/8484160495736... \n", + "\n", + " tweet_mentions n_mentions \\\n", + "id \n", + "849636868052275200 [] 0 \n", + "848988730585096192 [@ForIn2020, @waltmossberg, @mims, @defcon_5] 4 \n", + "848943072423497728 [@waltmossberg, @mims, @defcon_5] 3 \n", + "848935705057280001 [] 0 \n", + "848416049573658624 [@DaveLeeBBC, @verge] 2 \n", + "\n", + " week_day_name week_day day_hour \n", + "id \n", + "849636868052275200 Wednesday 2 14 \n", + "848988730585096192 Monday 0 20 \n", + "848943072423497728 Monday 0 16 \n", + "848935705057280001 Monday 0 16 \n", + "848416049573658624 Sunday 6 6 " + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df.head()" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -43,7 +232,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 11, "metadata": {}, "outputs": [ { @@ -137,7 +326,7 @@ "max 6.000000 6.000000 23.000000" ] }, - "execution_count": 3, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -152,7 +341,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 9, "metadata": {}, "outputs": [ { @@ -366,7 +555,7 @@ "std 0.859091 NaN 1.946637 7.611198 " ] }, - "execution_count": 6, + "execution_count": 9, "metadata": {}, "output_type": "execute_result" } @@ -380,7 +569,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 10, "metadata": {}, "outputs": [ { @@ -483,7 +672,7 @@ "std NaN 0.859091 1.946637 7.611198" ] }, - "execution_count": 8, + "execution_count": 10, "metadata": {}, "output_type": "execute_result" } @@ -496,7 +685,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 11, "metadata": {}, "outputs": [ { @@ -512,7 +701,7 @@ "Name: created_at, dtype: object" ] }, - "execution_count": 10, + "execution_count": 11, "metadata": {}, "output_type": "execute_result" } @@ -523,7 +712,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -702,7 +891,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 12, "metadata": {}, "outputs": [], "source": [ @@ -722,7 +911,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 14, "metadata": {}, "outputs": [ { @@ -798,7 +987,7 @@ "6 2" ] }, - "execution_count": 15, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } @@ -807,6 +996,33 @@ "df.groupby(['n_mentions'])[['text']].count()" ] }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1 1231\n", + "0 1145\n", + "2 329\n", + "3 78\n", + "4 28\n", + "5 6\n", + "6 2\n", + "Name: n_mentions, dtype: int64" + ] + }, + "execution_count": 15, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df['n_mentions'].value_counts()" + ] + }, { "cell_type": "code", "execution_count": 16, @@ -837,7 +1053,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 26, "metadata": {}, "outputs": [ { @@ -865,7 +1081,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 27, "metadata": {}, "outputs": [], "source": [ @@ -874,7 +1090,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 28, "metadata": {}, "outputs": [ { @@ -928,7 +1144,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 29, "metadata": {}, "outputs": [], "source": [ @@ -937,7 +1153,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 30, "metadata": {}, "outputs": [ { @@ -968,7 +1184,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 31, "metadata": {}, "outputs": [ { @@ -1088,7 +1304,7 @@ "848943072423497728 Monday 0 16 2017 " ] }, - "execution_count": 22, + "execution_count": 31, "metadata": {}, "output_type": "execute_result" } @@ -1099,7 +1315,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 19, "metadata": {}, "outputs": [ { @@ -1143,7 +1359,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 33, "metadata": {}, "outputs": [], "source": [ @@ -1152,7 +1368,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 20, "metadata": {}, "outputs": [], "source": [ @@ -1161,7 +1377,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 21, "metadata": {}, "outputs": [], "source": [ @@ -1178,7 +1394,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 22, "metadata": {}, "outputs": [ { @@ -1227,7 +1443,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 24, "metadata": {}, "outputs": [ { @@ -1303,7 +1519,7 @@ "6 422" ] }, - "execution_count": 28, + "execution_count": 24, "metadata": {}, "output_type": "execute_result" } @@ -1314,7 +1530,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 25, "metadata": {}, "outputs": [ { @@ -1390,7 +1606,7 @@ "max 530.000000" ] }, - "execution_count": 29, + "execution_count": 25, "metadata": {}, "output_type": "execute_result" } @@ -1401,7 +1617,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 26, "metadata": {}, "outputs": [ { @@ -1410,7 +1626,7 @@ "" ] }, - "execution_count": 30, + "execution_count": 26, "metadata": {}, "output_type": "execute_result" }, @@ -1433,147 +1649,7 @@ }, { "cell_type": "code", - "execution_count": 31, - "metadata": {}, - "outputs": [], - "source": [ - "plt.bar?" - ] - }, - { - "cell_type": "code", - "execution_count": 32, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
created_attexttweet_linktweet_mentionsn_mentionsweek_day_nameweek_dayday_houryear
id
8496368680522752002017-04-05 14:56:29b'And so the robots spared humanity ... https:...https://twitter.com/i/web/status/8496368680522...[]0Wednesday2142017
8489887305850961922017-04-03 20:01:01b\"@ForIn2020 @waltmossberg @mims @defcon_5 Exa...https://twitter.com/i/web/status/8489887305850...[@ForIn2020, @waltmossberg, @mims, @defcon_5]4Monday0202017
8489430724234977282017-04-03 16:59:35b'@waltmossberg @mims @defcon_5 Et tu, Walt?'https://twitter.com/i/web/status/8489430724234...[@waltmossberg, @mims, @defcon_5]3Monday0162017
\n", - "
" - ], - "text/plain": [ - " created_at \\\n", - "id \n", - "849636868052275200 2017-04-05 14:56:29 \n", - "848988730585096192 2017-04-03 20:01:01 \n", - "848943072423497728 2017-04-03 16:59:35 \n", - "\n", - " text \\\n", - "id \n", - "849636868052275200 b'And so the robots spared humanity ... https:... \n", - "848988730585096192 b\"@ForIn2020 @waltmossberg @mims @defcon_5 Exa... \n", - "848943072423497728 b'@waltmossberg @mims @defcon_5 Et tu, Walt?' \n", - "\n", - " tweet_link \\\n", - "id \n", - "849636868052275200 https://twitter.com/i/web/status/8496368680522... \n", - "848988730585096192 https://twitter.com/i/web/status/8489887305850... \n", - "848943072423497728 https://twitter.com/i/web/status/8489430724234... \n", - "\n", - " tweet_mentions n_mentions \\\n", - "id \n", - "849636868052275200 [] 0 \n", - "848988730585096192 [@ForIn2020, @waltmossberg, @mims, @defcon_5] 4 \n", - "848943072423497728 [@waltmossberg, @mims, @defcon_5] 3 \n", - "\n", - " week_day_name week_day day_hour year \n", - "id \n", - "849636868052275200 Wednesday 2 14 2017 \n", - "848988730585096192 Monday 0 20 2017 \n", - "848943072423497728 Monday 0 16 2017 " - ] - }, - "execution_count": 32, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df.head(3)" - ] - }, - { - "cell_type": "code", - "execution_count": 33, + "execution_count": 40, "metadata": {}, "outputs": [ { @@ -1649,7 +1725,7 @@ "max 23.000000" ] }, - "execution_count": 33, + "execution_count": 40, "metadata": {}, "output_type": "execute_result" } @@ -1660,7 +1736,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 41, "metadata": {}, "outputs": [ { @@ -1670,7 +1746,7 @@ "Name: 0.25, dtype: float64" ] }, - "execution_count": 34, + "execution_count": 41, "metadata": {}, "output_type": "execute_result" } @@ -1681,7 +1757,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 42, "metadata": {}, "outputs": [], "source": [ @@ -1690,7 +1766,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 43, "metadata": {}, "outputs": [ { @@ -1726,7 +1802,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 44, "metadata": {}, "outputs": [ { diff --git a/notebooks/3.2 Exploratory data analysis II and working with texts.ipynb b/notebooks/3.2 Exploratory data analysis II and working with texts.ipynb deleted file mode 100644 index ca8a132..0000000 --- a/notebooks/3.2 Exploratory data analysis II and working with texts.ipynb +++ /dev/null @@ -1,2423 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# 3.2 Exploratory data analysis and working with texts\n", - "\n", - "In this notebook, we learn about:\n", - "1. descriptive statistics to explore data;\n", - "2. working with texts (hints)." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Part 1: descriptive statistics\n", - "\n", - "*The goal of exploratory data analysis is to develop an understanding of your data. EDA is fundamentally a creative process. And like most creative processes, the key to asking quality questions is to generate a large quantity of questions.* \n", - "\n", - "Key questions:\n", - "* Which kind of variation occurs within variables?\n", - "* Which kind of co-variation occurs between variables?\n", - "\n", - "https://r4ds.had.co.nz/exploratory-data-analysis.html" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "metadata": {}, - "outputs": [], - "source": [ - "# imports\n", - "\n", - "import os, codecs\n", - "import pandas as pd\n", - "import numpy as np\n", - "import seaborn as sns\n", - "import matplotlib.pyplot as plt" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Import the dataset\n", - "Let us import the Venetian apprenticeship contracts dataset in memory." - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [], - "source": [ - "root_folder = \"../data/apprenticeship_venice/\"\n", - "df_contracts = pd.read_csv(codecs.open(os.path.join(root_folder,\"professions_data.csv\"), encoding=\"utf8\"), sep=\";\")\n", - "df_professions = pd.read_csv(codecs.open(os.path.join(root_folder,\"professions_classification.csv\"), encoding=\"utf8\"), sep=\",\")" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Let's take another look to the dataset." - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n", - "RangeIndex: 9653 entries, 0 to 9652\n", - "Data columns (total 47 columns):\n", - " # Column Non-Null Count Dtype \n", - "--- ------ -------------- ----- \n", - " 0 page_title 9653 non-null object \n", - " 1 register 9653 non-null object \n", - " 2 annual_salary 7870 non-null float64\n", - " 3 a_profession 9653 non-null object \n", - " 4 profession_code_strict 9618 non-null object \n", - " 5 profession_code_gen 9614 non-null object \n", - " 6 profession_cat 9597 non-null object \n", - " 7 corporation 9350 non-null object \n", - " 8 keep_profession_a 9653 non-null int64 \n", - " 9 complete_profession_a 9653 non-null int64 \n", - " 10 enrolmentY 9628 non-null float64\n", - " 11 enrolmentM 9631 non-null float64\n", - " 12 startY 9533 non-null float64\n", - " 13 startM 9539 non-null float64\n", - " 14 length 9645 non-null float64\n", - " 15 has_fled 9653 non-null int64 \n", - " 16 m_profession 9535 non-null object \n", - " 17 m_profession_code_strict 9508 non-null object \n", - " 18 m_profession_code_gen 9506 non-null object \n", - " 19 m_profession_cat 9489 non-null object \n", - " 20 m_corporation 9276 non-null object \n", - " 21 keep_profession_m 9653 non-null int64 \n", - " 22 complete_profession_m 9653 non-null int64 \n", - " 23 m_gender 9554 non-null float64\n", - " 24 m_name 9623 non-null object \n", - " 25 m_surname 6960 non-null object \n", - " 26 m_patronimic 2620 non-null object \n", - " 27 m_atelier 1434 non-null object \n", - " 28 m_coords 9639 non-null object \n", - " 29 a_name 9653 non-null object \n", - " 30 a_age 9303 non-null float64\n", - " 31 a_gender 9522 non-null float64\n", - " 32 a_geo_origins 7149 non-null object \n", - " 33 a_geo_origins_std 4636 non-null object \n", - " 34 a_coords 9610 non-null object \n", - " 35 a_quondam 7848 non-null float64\n", - " 36 accommodation_master 9653 non-null int64 \n", - " 37 personal_care_master 9653 non-null int64 \n", - " 38 clothes_master 9653 non-null int64 \n", - " 39 generic_expenses_master 9653 non-null int64 \n", - " 40 salary_in_kind_master 9653 non-null int64 \n", - " 41 pledge_goods_master 9653 non-null int64 \n", - " 42 pledge_money_master 9653 non-null int64 \n", - " 43 salary_master 9653 non-null int64 \n", - " 44 female_guarantor 9653 non-null int64 \n", - " 45 period_cat 7891 non-null float64\n", - " 46 incremental_salary 9653 non-null int64 \n", - "dtypes: float64(11), int64(15), object(21)\n", - "memory usage: 3.5+ MB\n" - ] - } - ], - "source": [ - "df_contracts.info()" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
page_titleregisterannual_salarya_professionprofession_code_strictprofession_code_genprofession_catcorporationkeep_profession_acomplete_profession_a...personal_care_masterclothes_mastergeneric_expenses_mastersalary_in_kind_masterpledge_goods_masterpledge_money_mastersalary_masterfemale_guarantorperiod_catincremental_salary
0Carlo Della sosta (Orese) 1592-08-03asv, giustizia vecchia, accordi dei garzoni, 1...NaNoreseoreseoreficeoreficeOresi11...11100000NaN0
1Antonio quondam Andrea (squerariol) 1583-01-09asv, giustizia vecchia, accordi dei garzoni, 1...12.5squerariolsquerariollavori allo squerolavori allo squeroSquerarioli11...001000101.00
2Cristofollo di Zuane (batioro in carta) 1591-0...asv, giustizia vecchia, accordi dei garzoni, 1...NaNbatiorobatiorobattiorofabbricatore di foglie/fili/cordelle d'oro o a...Battioro11...00000000NaN0
\n", - "

3 rows Ɨ 47 columns

\n", - "
" - ], - "text/plain": [ - " page_title \\\n", - "0 Carlo Della sosta (Orese) 1592-08-03 \n", - "1 Antonio quondam Andrea (squerariol) 1583-01-09 \n", - "2 Cristofollo di Zuane (batioro in carta) 1591-0... \n", - "\n", - " register annual_salary \\\n", - "0 asv, giustizia vecchia, accordi dei garzoni, 1... NaN \n", - "1 asv, giustizia vecchia, accordi dei garzoni, 1... 12.5 \n", - "2 asv, giustizia vecchia, accordi dei garzoni, 1... NaN \n", - "\n", - " a_profession profession_code_strict profession_code_gen \\\n", - "0 orese orese orefice \n", - "1 squerariol squerariol lavori allo squero \n", - "2 batioro batioro battioro \n", - "\n", - " profession_cat corporation \\\n", - "0 orefice Oresi \n", - "1 lavori allo squero Squerarioli \n", - "2 fabbricatore di foglie/fili/cordelle d'oro o a... Battioro \n", - "\n", - " keep_profession_a complete_profession_a ... personal_care_master \\\n", - "0 1 1 ... 1 \n", - "1 1 1 ... 0 \n", - "2 1 1 ... 0 \n", - "\n", - " clothes_master generic_expenses_master salary_in_kind_master \\\n", - "0 1 1 0 \n", - "1 0 1 0 \n", - "2 0 0 0 \n", - "\n", - " pledge_goods_master pledge_money_master salary_master female_guarantor \\\n", - "0 0 0 0 0 \n", - "1 0 0 1 0 \n", - "2 0 0 0 0 \n", - "\n", - " period_cat incremental_salary \n", - "0 NaN 0 \n", - "1 1.0 0 \n", - "2 NaN 0 \n", - "\n", - "[3 rows x 47 columns]" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df_contracts.head(3)" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "Index(['page_title', 'register', 'annual_salary', 'a_profession',\n", - " 'profession_code_strict', 'profession_code_gen', 'profession_cat',\n", - " 'corporation', 'keep_profession_a', 'complete_profession_a',\n", - " 'enrolmentY', 'enrolmentM', 'startY', 'startM', 'length', 'has_fled',\n", - " 'm_profession', 'm_profession_code_strict', 'm_profession_code_gen',\n", - " 'm_profession_cat', 'm_corporation', 'keep_profession_m',\n", - " 'complete_profession_m', 'm_gender', 'm_name', 'm_surname',\n", - " 'm_patronimic', 'm_atelier', 'm_coords', 'a_name', 'a_age', 'a_gender',\n", - " 'a_geo_origins', 'a_geo_origins_std', 'a_coords', 'a_quondam',\n", - " 'accommodation_master', 'personal_care_master', 'clothes_master',\n", - " 'generic_expenses_master', 'salary_in_kind_master',\n", - " 'pledge_goods_master', 'pledge_money_master', 'salary_master',\n", - " 'female_guarantor', 'period_cat', 'incremental_salary'],\n", - " dtype='object')" - ] - }, - "execution_count": 5, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df_contracts.columns" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Every row represents an apprenticeship contract. Contracts were registered both at the guild's and at a public office. This is a sample of contracts from a much larger set of records.\n", - "\n", - "Some of the variables we will work with are:\n", - "* `annual_salary`: the annual salary paid to the apprencice, if any (in Venetian ducats).\n", - "* `a_profession` to `corporation`: increasingly generic classifications for the apprentice's stated profession.\n", - "* `startY` and `enrolmentY`: contract start and registration year respectively.\n", - "* `length`: of the contract, in years.\n", - "* `m_gender` and `a_gender`: of master and apprentice respectively.\n", - "* `a_age`: age of the apprentice at entry, in years.\n", - "* `female_guarantor`: if at least one of the contract's guarantors was female, boolean." - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
TrascrizioneStandardGruppo 0Gruppo 1Gruppo 2Gruppo 3Gruppo 4Corporazione
0al negotio del librarolibrerlibraiolibrai - diverse specializzazionistampaaltre lavorazioni manifatturierebenilibreri, stampatori e ligadori
1arte de far arpicordiarte de far arpicordifabbricatore di arpicordifabbricatore di strumenti musicalimusicaaltri serviziserviziNaN
2arte de' coloriarte dei colorifabbricazione/vendita di coloricoloricoloridecorazioni e mestieri dell'artebenispezieri
\n", - "
" - ], - "text/plain": [ - " Trascrizione Standard \\\n", - "0 al negotio del libraro librer \n", - "1 arte de far arpicordi arte de far arpicordi \n", - "2 arte de' colori arte dei colori \n", - "\n", - " Gruppo 0 Gruppo 1 \\\n", - "0 libraio librai - diverse specializzazioni \n", - "1 fabbricatore di arpicordi fabbricatore di strumenti musicali \n", - "2 fabbricazione/vendita di colori colori \n", - "\n", - " Gruppo 2 Gruppo 3 Gruppo 4 \\\n", - "0 stampa altre lavorazioni manifatturiere beni \n", - "1 musica altri servizi servizi \n", - "2 colori decorazioni e mestieri dell'arte beni \n", - "\n", - " Corporazione \n", - "0 libreri, stampatori e ligadori \n", - "1 NaN \n", - "2 spezieri " - ] - }, - "execution_count": 6, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df_professions.head(3)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "The professions data frame contains a classification system for each profession as found in the records (transcription, first column). The last column is the guild (or corporation) which governed the given profession. This work was performed manually by historians. We don't use it here as the classifications we need are already part of the main dataframe." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Questions\n", - "\n", - "* Plot the distribution (histogram) of the apprentices' age, contract length, annual salary and start year.\n", - "* Calculate the proportion of female apprentices and masters, and of contracts with a female guarantor.\n", - "* How likely it is for a female apprentice to have a female master? And for a male apprentice?" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "metadata": {}, - "outputs": [], - "source": [ - "salaries_male_guarantor = df_contracts[\n", - " df_contracts.female_guarantor == 0\n", - "].annual_salary" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [], - "source": [ - "salaries_female_guarantor = df_contracts[\n", - " df_contracts.female_guarantor == 1\n", - "].annual_salary" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "salaries_male_guarantor.hist()\n", - "salaries_female_guarantor.hist()" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD4CAYAAAAAczaOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAATKUlEQVR4nO3df6zd9X3f8edrkKQSzjCMzGKG1WRyK9GgUbgCpKbVtbKCIVudbFMEQsTOD7mTQErUTIvTqAM1jeRuSapFzeicYoWsaW6ZkigWkFHXwkP5gwbMHIwhFJc4G1eurQZq4iTKRvbeH+dr63Bzr+/18bnnnOvP8yEdne/5fH+c1/ne69c553u+9zhVhSSpDX9v3AEkSaNj6UtSQyx9SWqIpS9JDbH0Jakh5487wOlccskltW7duoHW/eEPf8gFF1ww3EDLZKVkNefwrZSs5hy+5cy6b9++v62qt8w7s6om9nLttdfWoB599NGB1x21lZLVnMO3UrKac/iWMyvwZC3Qqx7ekaSGWPqS1BBLX5IaYulLUkMsfUlqiKUvSQ2x9CWpIZa+JDXE0pekhkz01zAM07ptD52aPrz9nWNMIknj4yt9SWqIpS9JDbH0Jakhlr4kNcTSl6SGWPqS1BBLX5IaYulLUkMsfUlqiKUvSQ2x9CWpIZa+JDXE0pekhlj6ktQQS1+SGmLpS1JDLH1JaoilL0kNsfQlqSGLln6Sy5M8muTZJAeTfKgbvyfJbJL93eWWvnU+luRQkueT3NQ3vrEbO5Rk2/I8JEnSQpbyH6O/Bnykqp5K8mZgX5Ld3bw/qKpP9S+c5ErgVuCXgH8E/EWSX+hmfw74deAl4Ikku6rq2WE8EEnS4hYt/ao6Ahzppn+Q5Dlg7WlW2QTMVNVPgO8mOQRc1807VFUvAiSZ6Za19CVpRFJVS184WQc8BrwN+C1gC/Aq8CS9dwOvJPlD4PGq+pNunfuAb3Sb2FhVH+zG7wCur6q75tzHVmArwJo1a66dmZk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mfx3AAc7zsMNBbp/YdH/w74jar6Ud/4W9L7vzFI8lZgPfDieFKe9me9C7g1yZuSXEEv57dGnW+OfwZ8p6peOjkw8v05qk+MR3mhdybEX9F7xvz4uPP05Xo7vbfzTwP7u8stwH8FDnTju4BLJyDrW+md+fBt4ODJ/Qj8A2AP8ALwF8DFE5D1AuD7wIV9Y2Pfp/SehI4A/5fe8eQPLLT/6J2187nud/YAMDUBWQ/ROyZ+8nf1j7pl/1X3O7EfeAr4F2POueDPGvh4t0+fB24eZ85u/AvAv5mz7Ej3p1/DIEkNORcP70iSFmDpS1JDLH1JaoilL0kNsfQlqSGWviQ1xNKXpIb8f1JfOTuBGZthAAAAAElFTkSuQmCC\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "df_contracts.annual_salary.hist(bins=100)" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAD4CAYAAADo30HgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAVq0lEQVR4nO3df5Bd5X3f8fe3yGDCupKAdEslTYUbjTMENQnsAKlTzypKsQCPRTsOg4exJYeMxlNISa1MkOtpyKT1VG5KPHaauqNGjOWG8eIQuyj8iK3IbD3+Q8SIYsQP2yxErrUji9pgOWtIHaXf/nGfde6z7K97z713d+H9mtnZc57znHO+99yz96Pz4x5FZiJJ0rS/s9QFSJKWF4NBklQxGCRJFYNBklQxGCRJlVVLXcB8Lrzwwty4cWNH8/zgBz/gvPPO609BPWB9zVhfM9bXzEqp7+jRo9/JzB/vekGZuWx/Lr/88uzUww8/3PE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vwB8jtYhe7vl8PiSa4DHMvPUzAlLvf2KU9On18rvF2bps6TbMSJ2Au8AbiofHK+yiH2hLzLzVGb+TWb+P+C/zbHepd5+q4B/AdwzV59Bbb85PlP6sg+u1GBYzKM1DgLTV9/fBXxxrj+MXivnJPcDz2Tm787R5+9PX/OIiCtovRcDCa6IOC8i3jQ9TOsi5ZMzuh0E3hstVwGn2w5ZB2XOf6kt5fZr076P7QDum6XP54GrI2JtOVVydWnru2j9p1i/AbwzM1+eo89i9oV+1dd+zeqfz7HepX6Mzi8CX8vME7NNHNT2m+czpT/7YD+vpPfzh9ZdM9+gdcfCh0rbb9P6IwB4I61TEBPAnwNvHmBtP0/rkO4J4PHycy3wfuD9pc+twFO07rI4AvyTAdb35rLer5Yaprdfe31B6z9Veg44BowM+P09j9YH/eq2tiXbfrQC6iTw17TO0d5M65rVYeBZ4M+A80vfEVr/O+H0vL9c9sMJ4H0DrG+C1rnl6X1w+i69fwA8ON++MKD6/nvZt56g9QF30cz6yvir/tYHUV9p/+T0PtfWdym231yfKX3ZB30khiSpslJPJUmS+sRgkCRVDAZJUsVgkCRVDAZJUsVgkCRVDAZJUuX/A7zU+O5qfyxrAAAAAElFTkSuQmCC\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "df_contracts[df_contracts.annual_salary < 20].annual_salary.hist(bins=25)" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 13, - "metadata": {}, - "output_type": "execute_result" - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD4CAYAAAAAczaOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAATlElEQVR4nO3df6zd9X3f8edrEEjK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h/r9nv/E+C503AdfoXZ6xu9jBnmUfBB3IAv0tt/9tf0vn0/BPxHYA+9swS2ARd2fSfonRGxF3gO+Jd907kO+J/0jrD/5rDrmqe+s+htGT0LPAW8u6//b3Y1vEDf2Q/jUB/wr+ntL32673bsrInJrv+3gM/Q/fX5KNxOdh32Pe8u+s5CG4d12PX/p91n8Fngd/vaR3IdnuR7dOQyxsswSFJDmti9I0nqMfQlqSGGviQ1xNCXpIYY+pLUEENfkhpi6EtSQ/4fkkQcB3xhV/gAAAAASUVORK5CYII=\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "df_contracts.startY.hist(bins=10)" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0.026105873821609893" - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# proportion of female apprentices\n", - "1-(df_contracts.a_gender.sum()/df_contracts.shape[0])" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0.023723194861701047" - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# proportion of female masters\n", - "1-(df_contracts.m_gender.sum()/df_contracts.shape[0])" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0.7310924369747899" - ] - }, - "execution_count": 16, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# prop female apprentices with male master\n", - "df_contracts[(df_contracts.a_gender == 0) & (df_contracts.startY < 1800)].m_gender.sum()\\\n", - " /df_contracts[(df_contracts.a_gender == 0) & (df_contracts.startY < 1800)].shape[0]" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0.9810528582193992" - ] - }, - "execution_count": 17, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# prop male apprentices with male master\n", - "df_contracts[(df_contracts.a_gender == 1) & (df_contracts.startY < 1800)].m_gender.sum()\\\n", - " /df_contracts[(df_contracts.a_gender == 1) & (df_contracts.startY < 1800)].shape[0]" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Looking at empirical distributions" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 18, - "metadata": {}, - "output_type": "execute_result" - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD4CAYAAAAAczaOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAT5ElEQVR4nO3df4xd5Z3f8fenJslGsFnIQkdem9REdVJB2HWXEaHa7WrYdBMD0UKqVYpFA07SdaIFKVFdrcx2JdJESLTdbLZRtqycYEG0KQ4Km2AF0qyXZkQqlQScUMyPUAwxwq5jKyELOySiNfn2j3umc2PGM3Pnju+Yed4v6WrOec45z3nuF/yZM+ece26qCklSG/7ecg9AkjQ6hr4kNcTQl6SGGPqS1BBDX5IacspyD2A+Z555Zq1bt27g7V588UVOPfXUpR/Qq4x16LEOM6xFz0quw549e35YVWfNtuykD/1169bx4IMPDrzd5OQkExMTSz+gVxnr0GMdZliLnpVchyTPHG+Zp3ckqSGGviQ1xNCXpIYY+pLUEENfkhpi6EtSQwx9SWqIoS9JDTH0JakhJ/0ncpfLum13z7l8/02XjWgkkrR0PNKXpIYY+pLUEENfkhpi6EtSQwx9SWqIoS9JDZk39JPsSHIkySN9bV9M8lD32p/koa59XZKf9i37i75tLkiyN8m+JJ9OkhPyjiRJx7WQ+/RvBT4DfH66oar+xfR0kk8Cz/et/1RVbZiln5uB3we+BdwDbAS+NvCIJUmLNu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aS/9nV4d917eck+Vb3b+SL3U0VTUiyKsl3k3y1m2+uFisq9Pse83AJcC6wKcm5yzuqkboV2HhM2zbg3qpaD9zbza90R4GtVXUucBFwbff/QWu1eAn47ar6NWADsDHJRcC/Bz5VVf8Q+DHwweUb4sh9BHi8b765Wqyo0KfvMQ9V9X+A6cc8NKGq7gOeO6b5cuC2bvo24IpRjmk5VNWhqvpON/139P6Rr6GxWlTPVDf7mu5VwG8DX+raV3wdpiVZC1wGfK6bDw3WYqWF/hrg2b75A11by8aq6lA3/QNgbDkHM2pJ1gH/GPgWDdaiO53xEHAE2A08BfxtVR3tVmnp38ifAX8I/Kyb/2UarMVKC33NoXr35zZzj26S04A7gY9W1Qv9y1qpRVW9XFUb6H36/ULgHy3viJZHkncDR6pqz3KPZbmdlM/eGYKPeXilw0lWV9WhJKvpHfGteEleQy/wv1BVf9U1N1kLgKr62yTfAP4JcHqSU7oj3Fb+jfwG8LtJLgV+AXgDve/1aK4WK+1I38c8vNIu4Jpu+hrgrmUcy0h052pvAR6vqj/tW9RULZKcleT0bvr19L7H4nHgG8Dvdaut+DoAVNX1VbW2qtbRy4X/VlVX0WAtVtwncrvf5H/GzGMeblzeEY1OktuBCXqPjD0M3AB8BbgDeBPwDPDeqjr2Yu+KkuQ3gW8Ce5k5f/tH9M7rN1OLJL9K7+LkKnoHeHdU1ceTvJneTQ5vBL4L/Muqemn5RjpaSSaAf1NV726xFisu9CVJx7fSTu9IkuZg6EtSQwx9SWqIoS9JDTH0Jakhhr4kNcTQl6SG/D/CpIrwm9HJbAAAAABJRU5ErkJggg==\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "df_contracts[df_contracts.annual_salary < 50].annual_salary.hist(bins=40)" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 19, - "metadata": {}, - "output_type": "execute_result" - }, - { - "data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tx9wC8AVwBHgI+v6WjOQJINwBeB91fVd6eu6+f9NkNdfb/PqurHVXUFvTskXA380lK20y/hP9C3haiqie7xGPBlejt0UBzt5l9PzcMeW+PxLJuqOtr9Iv4E+DR9ut+6ueMvAp+rqi91zX2/32aqa1D2GUBVvQp8Bfh1YGOSU1/aXVA+9kv4D+xtIZKc052QIsk5wHXAs3O/qq/sAbZ1y9uAh9ZwLMvqVDh23kof7rfuBOL9wAtV9Ykpq/p6v81WV7/vsyRvTLKxW349vYtgXqD3IfC2rtuC9ldfXO0D0F2S9cf8320hPrq2I1oeSX6e3tE+9G638fl+rS3JF4BRereXPQrcA/wd8CDws8BLwC1V1XcnTmepbZTe9EEBh4H3Tpkn7wtJ3gT8E3AQ+EnX/AF68+N9u9/mqOtW+nifJfkVeid0z6J38P5gVX2oy5Ex4Hzgn4Hfqaofzbmtfgl/SdLy6ZdpH0nSMjL8JalBhr8kNcjwl6QGGf6S1CDDX5IaZPhLUoP+BweMU0oHLqrWAAAAAElFTkSuQmCC\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "df_contracts[df_contracts.a_age < 30].a_age.hist(bins=25)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Two very important distributions" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Normal\n", - "\n", - "Also known as Gaussian, is a bell-shaped distribution with mass around the mean and exponentially decaying on the sides. It is fully characterized by the mean (center of mass) and standard deviation (spread).\n", - "\n", - "https://en.wikipedia.org/wiki/Normal_distribution" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 20, - "metadata": {}, - "output_type": "execute_result" - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWAAAAFgCAYAAACFYaNMAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb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6bmddVI4fekpm7CpcFzEwtsJXGw1RTBetYTuN/1/8sM1+NiFuBuzLzK6VqataTZ8CZ+R3gx6XraJaZ2zJzS7X9MvAEsLxwTZmZr1S7x1ev4v9Gjohh4NeB60rX0q0i4u3AB4DrATLz590SvpXVwN+XDN8mC4ETI2Ih8Bbg/xWuZ0ZPBnC3i4jTgHOA7xcuZe+l/sPADuDuzCxeE7AO+F3gzcJ1NEvgmxHxUPU4fGmnAzuBP6u6aq6LiJMO96U5dBlwc+kiMnMr8AXgH4BtwIuZ+c2yVe1jAM+xiHgr8FVgbWa+VLqezHwjM8+m8eTheRFRtMsmIj4E7MjMh0rW0cb7M/Nc4ELgqqqbq6SFwLnAtZl5DvBT4JqyJTVU3SEfBv6qC2pZQmNSr9OBXwROioh/V7aqfQzgOVT1s34VuCkzby9dT7Pq8vU+4IAJQ+bY+4APV32utwDnR8Sfly1p5kyKzNwBfI3G7H0lTQPTTVcst9EI5G5wIbAlM58rXQjwL4FnMnNnZr4O3A68t3BNMwzgOVLd8LoeeCIz/6h0PQARsTQiBqvtE2nMxfxkyZoy87OZOZyZp9G4jL03M4uesUTESdWNU6rL/F8Dio6wycztwLMRcWbVtJpZnrr1GPwmXdD9UPkH4N0R8Zbq/4Oradx/6Qo9GcARcTPwPeDMiJiOiCtK10TjzO5jNM7o9g7TuahwTUPAfRHxCI25OO7OzK4Y9tVllgEPRMQE8HfA32TmNwrXBPAp4Kbqv7+zgT8sW87Mv6A+SONMs7jqCuE2YAvwKI3M65rHkntyGJokzQc9eQYsSfOBASxJhRjAklSIASxJhRjAklSIASxJhRjAklTI/wfCU6p7uQ4EvAAAAABJRU5ErkJggg==\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "s1 = np.random.normal(5, 1, 10000)\n", - "sns.displot(s1)" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 21, - "metadata": {}, - "output_type": "execute_result" - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWAAAAD4CAYAAADSIzzWAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAANqElEQVR4nO3df2jc933H8dfbkubI8tzOihGZFe8qRNKYGdpGdD86irVEiyUXbxACGyQyaGCIh+xmf4wNBLmA2F9jLOiPQUi3WKxkbGn3zyabKl5gLbTrTlk6Z7YxV1V25LWOKmd1ZSmqZL/3h0433elOkrfv3ftOej7A4O/X37vPW7G/T33veydi7i4AQPXtih4AAHYqAgwAQQgwAAQhwAAQhAADQJDGBzn44Ycf9lQqVaFRAGB7mpiY+LG7Hyje/0ABTqVSymQyyU0FADuAmV0vtZ9bEAAQhAADQBACDABBCDAABCHAABCEAANAEAIMAEEIMAAEIcAAEIQAA0AQAgwAQQgwAAQhwAAQhAADQBACDABBCDAABCHAABCEAANAEAIMAEEe6P8JByRhZGRE2Wy2auvdvHlTknTw4MGqrNfZ2anBwcGqrIX6RoBRddlsVu+9f0X39uyvynoN8z+RJP1osfL/3Bvmb1d8DWwfBBgh7u3Zr4VP91VlrearY5JUlfVW1wK2gnvAABCEAANAEAIMAEEIMAAEIcAAEIQAA0AQAgwAQQgwAAQhwAAQhAADQBACDABBCDAABCHAABCEAANAEAIMAEEIMAAEIcAAEIQAA0AQAgwAQQgwAAQhwAAQhAADQBACDABBCDAABCHAABCEAANAEAIMAEEIMAAEIcAAEIQAA0AQAgwAQQgwAAQhwAAQhAADQBACDABBCDAABCHAABCEAANAEAIMAEEIMAAEIcAAEIQAb8HIyIhGRkaixwB2nO1+7jVGD1APstls9AjAjrTdzz2ugAEgCAEGgCAEGACCEGAACEKAASAIAQaAIAQYAIIQYAAIQoABIAgBBoAgBBgAghBgAAhCgAEgCAEGgCAEGACCEGA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vxwU4d0/1a5K+6u5fj55nM7mXou9IOhY8SrEvSDqRu7/6t5J+08z+Jnak0nJXRXL3DyX9g6TPx060zrSk6TWvct7SSpBrVa+kd939VvQgJTwt6QfuPuPuS5K+LunXg2cqa0cFOPfm1lckXXH3P4+epxwzO2Bmn8z9vllSj6SroUMVcfc/cfd2d09p5eXoP7t7zV1pmFlL7g1X5V7W/5akmvqkjrv/SNIHZvZ4btdTkmrqjeEiv6cavP2Qc0PSr5rZntz5/pRW3uupSUl+DO1NSd+W9LiZTZvZ7yf13An6gqQXtHK1tvpRmr7ooUp4RNI7ZvYfkv5NK/eAa/ZjXjWuTdK3zOx7kr4r6Z/c/ULwTKUMSvpq7u/8M5L+NHac0nLfxHq0cmVZc3KvIt6S9K6kS1ppXM3+WDI/igwAQXbULQgAqCUEGACCEGAACEKAASAIAQaAIAQYAIIQYAAI8j84qcWbzlK/eAAAAABJRU5ErkJggg==\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "# for boxplots see https://en.wikipedia.org/wiki/Interquartile_range (or ask!)\n", - "sns.boxplot(x=s1)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Heavy-tailed\n", - "Distributions with a small but non-negligible amount of observations with high values. Several probability distributions follow this pattern: https://en.wikipedia.org/wiki/Heavy-tailed_distribution#Common_heavy-tailed_distributions.\n", - "\n", - "We pick the lognormal here: https://en.wikipedia.org/wiki/Log-normal_distribution" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 22, - "metadata": {}, - "output_type": "execute_result" - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWAAAAFgCAYAAACFYaNMAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACX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Pad5aAAAAAElFTkSuQmCC\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "s2 = np.random.lognormal(5, 1, 10000)\n", - "sns.displot(s2)" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 23, - "metadata": {}, - "output_type": "execute_result" - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWAAAAD4CAYAAADSIzzWAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAAAN4UlEQVR4nO3df2xVZx3H8c+X3rLBphuUpZlloZAukv3lZmNmNIZsbKPViH/sjyUmVI0x0aQgW2K2jIQQ+o/GMIEYl4XFtEbddC7KTIsB3f4ULTrGpAyu7CLcbB3cuV+2dLQ8/nGf3t57uaWl5d7vvb3vV3LTc57znOc5z9PTD+eec5ZZCEEAgMpb5H0AAFCvCGAAcEIAA4ATAhgAnBDAAOAkcS2VV6xYEVpbW8t0KACwMB05cuRCCOG24vJrCuDW1lYNDg5ev6MCgDpgZmdKlXMLAgCcEMAA4IQABgAnBDAAOCGAAcAJAQwATghgAHBCAAOAEwIYAJwQwADghAAGACcEMAA4IYABwAkBDABOCGAAcEIAA4ATAhgAnBDAAOCEAAYAJ9f0/4Sbr7179yqZTEqS0um0JKmlpaWgTltbm7q7uyt5WADgoqIBnEwm9errQ5pYulwNI+9Lkt4emzqEhpF3K3k4AOCqogEsSRNLl2t0baeWnOiXJI2u7cxtmywDgHrAPWAAcEIAA4ATAhgAnBDAAOCEAAYAJwQwADghgAHACQEMAE4IYABwQgADgBMCGACcEMAA4IQABgAnBDAAOCGAAcAJAQwATghgAHBCAAOAEwIYAJwQwADghAAGACcEMAA4IYABwAkBDABOCGAAcEIA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mHJTWHEN6Km96W1ByXp5uXhTBfP5H0A0mX43qTpPdCCONxPX9MufHG7e/H+gthHlZLOi/p5/F2zD4zu0l1dk6EENKSfizpP8oG7/uSjqg+z4kr8BDuOjKzmyX9TtL3Qwgf5G8L2e9RC/qdPzP7iqR3QghHvI+lCiQk3SPpZyGEuyX9T9lbDjl1ck4sU/bqdbWkT0m6SbV3BV825Q7gtKQ78tZXxrIFx8walQ3fX4YQXozFw/FrpOLPd2L5dPNS6/P1BUlfNbOUsreb7pO0W9mv04lYJ39MufHG7bdIyqj250HKXqGdCyEcjusvKBvI9XZOrJf0ZgjhfAjhkqQXlT1P6vGcuEK5A/jvku6MTzwXK3tTfX+Z+6y4eI/qWUlDIYRdeZv2S5p8at0l6Q955Zvik+97Jb0fv5b+SdKDZrYsXjk8GMtqQgjhiRDCyhBCq7K/67+EEL4u6WVJD8dqxfMwOT8Px/ohlj8Sn4ivlnSnpL9VaBjXRQjhbUlnzezTseh+ScdVZ+eEsrce7jWzpfHvZHIe6u6cKKncT/mUfbp7Utmnlk96P3Us0xi/qOxXydckvRo/ncreu/qzpFOSDklaHuubpJ/GOTkmqT2vrW8p+4AhKemb3mObx5ys09RbEGuU/WNJSvqtpBti+Y1xPRm3r8nb/8k4P29I6vAezxzn4DOSBuN58Xtl32Kou3NC0g5JJyS9LukXyr7JUJfnRPGH/xQZAJzwEA4AnBDAAOCEAAYAJwQwADghgAHACQEMAE4IYABw8n/Y4kuV5/nC1AAAAABJRU5ErkJggg==\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "sns.boxplot(x=s2)" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 24, - "metadata": {}, - "output_type": "execute_result" - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWAAAAFgCAYAAACFYaNMAAAAOXRFWHRTb2Z0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xGE/jnEbEwIk4ELuDgSWKzxgAuJCLeBnwP+GJm/qLX98/MVzPz/bRmHJ5Z/dnVMxHxMWBPZj7Yy/sewocy83TgfGBD1VXVS8cBpwNXZ+Ya4JfA5T2uYVrVBfJx4K8L3PsUWotwrQDeCZwUEf+mlzVk5qPAN4Af0Op+2Aa8Wse9DOACqn7X7wHfycybS9ZS/al7D/CGhUJqdjbw8ar/9QbgnIj4Hz2uAZh+10Vm7gFuodX310s7gZ1tf4XcRCuQSzkfeCgzdxe4978A/m9m7s3MV4CbgQ/2uojMvDYzz8jMDwPPA/+njvsYwD1WfQB2LfBoZv55oRoWRcSC6vgEWmsw/7SXNWTmVzNzWWYup/Xn7t2Z2dN3OgARcVL1YSjVn/2/RetP0J7JzKeBJyPivVXTuczyMqxv0qcp0P1Q2QGcFREnVr8r59L6nKSnIuJXqu/votX/+9067tM3U5F7ISKuBz4CvCMidgJ/kpnX9riMs4HPAA9XfbAAf5SZt/WwhqXA5uqT7rcAN2ZmsWFghS0Gbmn9rnMc8N3MvL1AHZcC36n+/N8OfK5ADa+9CH0U+Hcl7p+ZD0TETcBDwH6gQZkpyd+LiIXAK8CGuj4UHalhaJLUT+yCkKRCDGBJKsQAlqRCDGBJKsQAlqRCDGBJKsQAlqRC/j+pJYsbFLnGdwAAAABJRU5ErkJggg==\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "# Why \"lognormal\"?\n", - "\n", - "sns.displot(np.log(s2))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Box plots\n", - "\n", - "" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Outliers, missing values\n", - "\n", - "An *outlier* is an observation far from the center of mass of the distribution. It might be an error or a genuine observation: this distinction requires domain knowledge. Outliers infuence the outcomes of several statistics and machine learning methods: it is important to decide how to deal with them.\n", - "\n", - "A *missing value* is an observation without a value. There can be many reasons for a missing value: the value might not exist (hence its absence is informative and it should be left empty) or might not be known (hence the value is existing but missing in the dataset and it should be marked as NA).\n", - "\n", - "*One way to think about the difference is with this Zen-like koan: An explicit missing value is the presence of an absence; an implicit missing value is the absence of a presence.*" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Summary statistics\n", - "A statistic is a function of a collection of observations, or otherwise stated a measure over a distribution. \n", - "\n", - "A statistic is said to be *robust* if not sensitive to outliers.\n", - "\n", - "* Not robust: min, max, mean, standard deviation.\n", - "* Robust: mode, median, other quartiles.\n", - "\n", - "A closer look at the mean:\n", - "\n", - "$\\bar{x} = \\frac{1}{n} \\sum_{i}x_i$\n", - "\n", - "And variance (the standard deviation is the square root of the variance):\n", - "\n", - "$Var(x) = \\frac{1}{n} \\sum_{i}(x_i - \\bar{x})^2$\n", - "\n", - "The mean, the median, etc. are measures of location (e.g., the typical value); the variance is a measure of dispersion." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "" - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "4.9780085768562925\n", - "251.20393308182292\n" - ] - } - ], - "source": [ - "# Not robust: min, max, mean, mode, standard deviation\n", - "\n", - "print(np.mean(s1)) # should be 5\n", - "print(np.mean(s2))" - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "4.990913153725976\n", - "148.01429155699833\n" - ] - } - ], - "source": [ - "# Robust: median, other quartiles\n", - "\n", - "print(np.quantile(s1, 0.5)) # should coincide with mean and mode\n", - "print(np.quantile(s2, 0.5))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Questions\n", - "\n", - "* Calculate the min, max, mode and sd. *hint: explore the numpy documentation!*\n", - "* Calculate the 90% quantile values.\n", - "* Consider our normally distributed data in s1. Add an outlier (e.g., value 100). What happens to the mean and mode? Write down your answer and then check." - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
annual_salarya_agelength
count7870.0000009303.0000009645.000000
mean5.91692114.2666885.005694
std6.9852142.9027701.462343
min0.1666671.0000000.083333
25%3.00000012.0000004.000000
50%4.00000014.0000005.000000
75%6.00000016.0000006.000000
max180.00000050.00000015.000000
\n", - "
" - ], - "text/plain": [ - " annual_salary a_age length\n", - "count 7870.000000 9303.000000 9645.000000\n", - "mean 5.916921 14.266688 5.005694\n", - "std 6.985214 2.902770 1.462343\n", - "min 0.166667 1.000000 0.083333\n", - "25% 3.000000 12.000000 4.000000\n", - "50% 4.000000 14.000000 5.000000\n", - "75% 6.000000 16.000000 6.000000\n", - "max 180.000000 50.000000 15.000000" - ] - }, - "execution_count": 27, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# Let's explore our dataset\n", - "df_contracts[[\"annual_salary\",\"a_age\",\"length\"]].describe()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Relating two variables\n", - "\n", - "### Covariance\n", - "\n", - "Measure of association, specifically of the joint linear variability of two variables:\n", - "\n", - "\n", - "\n", - "Its normalized version is called the (Pearson's) correlation coefficient:\n", - "\n", - "\n", - "\n", - "Correlation is helpful to spot possible relations, but is of tricky interpretation and is not exhaustive:\n", - "\n", - "\n", - "\n", - "See: https://en.wikipedia.org/wiki/Covariance and https://en.wikipedia.org/wiki/Pearson_correlation_coefficient.\n", - "\n", - "*Note: correlation is not causation!*" - ] - }, - { - "cell_type": "code", - "execution_count": 28, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
annual_salarya_agelength
annual_salary1.0000000.205404-0.361611
a_age0.2054041.000000-0.430062
length-0.361611-0.4300621.000000
\n", - "
" - ], - "text/plain": [ - " annual_salary a_age length\n", - "annual_salary 1.000000 0.205404 -0.361611\n", - "a_age 0.205404 1.000000 -0.430062\n", - "length -0.361611 -0.430062 1.000000" - ] - }, - "execution_count": 28, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df_contracts[[\"annual_salary\",\"a_age\",\"length\"]].corr()" - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "" - ] - }, - "execution_count": 29, - "metadata": {}, - "output_type": "execute_result" - }, - { - "data": { - "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAEGCAYAAABhMDI9AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8qNh9FAAAACXBIWXMAAAsTAAALEwEAmpwYAABAeUlEQVR4nO3deXxcdbn48c8zk0wme9M0TUJLm6ZNF9INCIWrbLaiBUvLJogKsl3kd0G44oKibEW9CghXhCsiOyiComwXuSJwAb0gpNCVAi3daJukadpmn5nMzPf3xyydkzlpM5OZzqR53q9XXklOZr55Ztqc55zv8nzFGINSSikV4ch0AEoppbKLJgallFIWmhiUUkpZaGJQSilloYlBKaWURU6mAxiqMWPGmJqamkyHoZRSw8qyZ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1tBi7IbDhK7Z/eMSillLLQMQallFIWmhiUUkpZaGJQSilloYlBKaWUhSYGpZRSFv8f6MpO5ujW5sgAAAAASUVORK5CYII=\n", - "text/plain": [ - "
" - ] - }, - "metadata": { - "needs_background": "light" - }, - "output_type": "display_data" - } - ], - "source": [ - "sns.scatterplot(x=df_contracts.length,y=df_contracts.annual_salary)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Other ways to measure correlation exist. For example, if you are interested into how one variable will increase (or decrease) as another variable increases (or decreases), the *Spearmanā€™s or Kendallā€™s rank correlation coefficients* might work well." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Questions\n", - "\n", - "* Try to explore the correlation of other variables in the dataset.\n", - "* Can you think of a possible motivation for the trend we see: older apprentices with a shorter contract getting on average a higher annual salary?" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Sampling and uncertainty\n", - "\n", - "Often, we work with samples and we want the sample to be representative of the population it is taken from, in order to draw conclusions that generalise from the sample to the full population.\n", - "\n", - "Sampling is *tricky*. Samples have *variance* (variation between samples from the same population) and *bias* (systematic variation from the population)." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Further reading\n", - "\n", - "* For a complementary introduction to statistics and data analysis, see https://www.humanitiesdataanalysis.org/statistics-essentials/notebook.html.\n", - "* Related to statistics and data analysis is the realm of probability theory, which allows us to formally model and calculate the likelihood of events. For an introduction, see https://www.humanitiesdataanalysis.org/intro-probability/notebook.html." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "---" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "# Part 2: working with texts\n", - "\n", - "Let's get some basics (or a refresher) of working with texts in Python. Texts are sequences of discrete symbols (words or, more generically, tokens).\n", - "\n", - "Key challenge: representing text for further processing. Two mainstream approaches:\n", - "* *Bag of words*: a text is a collection of tokens occurring with a certain frequence and assumed independently from each other within the text. The mapping from texts to features is determinsitic and straighforward, each text is represented as a vector of the size of the vocabulary.\n", - "* *Embeddings*: a method is used (typically, neural networks), to learn a mapping from each token to a (usually small) vector representing it. A text can be represented in turn as an aggregation of these embeddings." - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Import the dataset\n", - "Let us import the Elon Musk's tweets dataset in memory.\n", - "\n", - "" - ] - }, - { - "cell_type": "code", - "execution_count": 30, - "metadata": {}, - "outputs": [], - "source": [ - "root_folder = \"../data/musk_tweets\"\n", - "df_elon = pd.read_csv(codecs.open(os.path.join(root_folder,\"elonmusk_tweets.csv\"), encoding=\"utf8\"), sep=\",\")\n", - "df_elon['text'] = df_elon['text'].str[1:]" - ] - }, - { - "cell_type": "code", - "execution_count": 31, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idcreated_attext
08496368680522752002017-04-05 14:56:29'And so the robots spared humanity ... https:/...
18489887305850961922017-04-03 20:01:01\"@ForIn2020 @waltmossberg @mims @defcon_5 Exac...
28489430724234977282017-04-03 16:59:35'@waltmossberg @mims @defcon_5 Et tu, Walt?'
38489357050572800012017-04-03 16:30:19'Stormy weather in Shortville ...'
48484160495736586242017-04-02 06:05:23\"@DaveLeeBBC @verge Coal is dying due to nat g...
\n", - "
" - ], - "text/plain": [ - " id created_at \\\n", - "0 849636868052275200 2017-04-05 14:56:29 \n", - "1 848988730585096192 2017-04-03 20:01:01 \n", - "2 848943072423497728 2017-04-03 16:59:35 \n", - "3 848935705057280001 2017-04-03 16:30:19 \n", - "4 848416049573658624 2017-04-02 06:05:23 \n", - "\n", - " text \n", - "0 'And so the robots spared humanity ... https:/... \n", - "1 \"@ForIn2020 @waltmossberg @mims @defcon_5 Exac... \n", - "2 '@waltmossberg @mims @defcon_5 Et tu, Walt?' \n", - "3 'Stormy weather in Shortville ...' \n", - "4 \"@DaveLeeBBC @verge Coal is dying due to nat g... " - ] - }, - "execution_count": 31, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df_elon.head(5)" - ] - }, - { - "cell_type": "code", - "execution_count": 32, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(2819, 3)" - ] - }, - "execution_count": 32, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df_elon.shape" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## Natural Language Processing in Python" - ] - }, - { - "cell_type": "code", - "execution_count": 33, - "metadata": {}, - "outputs": [], - "source": [ - "# import some of the most popular libraries for NLP in Python\n", - "import spacy\n", - "import nltk\n", - "import string\n", - "import sklearn" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "[nltk_data] Downloading package punkt to /Users/matteo/nltk_data...\n", - "[nltk_data] Unzipping tokenizers/punkt.zip.\n" - ] - }, - { - "data": { - "text/plain": [ - "True" - ] - }, - "execution_count": 34, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "nltk.download('punkt')" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "A typical NLP pipeline might look like the following:\n", - " \n", - "\n", - "\n", - "### Tokenization: splitting a text into constituent tokens" - ] - }, - { - "cell_type": "code", - "execution_count": 35, - "metadata": {}, - "outputs": [], - "source": [ - "from nltk.tokenize import TweetTokenizer, word_tokenize\n", - "tknzr = TweetTokenizer(preserve_case=True, reduce_len=False, strip_handles=False)" - ] - }, - { - "cell_type": "code", - "execution_count": 36, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\"@ForIn2020 @waltmossberg @mims @defcon_5 Exactly. Tesla is absurdly overvalued if based on the past, but that's irr\\xe2\\x80\\xa6 https://t.co/qQcTqkzgMl\"\n" - ] - } - ], - "source": [ - "example_tweet = df_elon.text[1]\n", - "print(example_tweet)" - ] - }, - { - "cell_type": "code", - "execution_count": 37, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['\"', '@ForIn2020', '@waltmossberg', '@mims', '@defcon_5', 'Exactly', '.', 'Tesla', 'is', 'absurdly', 'overvalued', 'if', 'based', 'on', 'the', 'past', ',', 'but', \"that's\", 'irr', '\\\\', 'xe2', '\\\\', 'x80', '\\\\', 'xa6', 'https://t.co/qQcTqkzgMl', '\"']\n", - "['``', '@', 'ForIn2020', '@', 'waltmossberg', '@', 'mims', '@', 'defcon_5', 'Exactly', '.', 'Tesla', 'is', 'absurdly', 'overvalued', 'if', 'based', 'on', 'the', 'past', ',', 'but', 'that', \"'s\", 'irr\\\\xe2\\\\x80\\\\xa6', 'https', ':', '//t.co/qQcTqkzgMl', \"''\"]\n" - ] - } - ], - "source": [ - "tkz1 = tknzr.tokenize(example_tweet)\n", - "print(tkz1)\n", - "tkz2 = word_tokenize(example_tweet)\n", - "print(tkz2)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Question: can you spot what the Twitter tokenizer is doing instead of a standard one?" - ] - }, - { - "cell_type": "code", - "execution_count": 38, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "'!\"#$%&\\'()*+,-./:;<=>?@[\\\\]^_`{|}~'" - ] - }, - "execution_count": 38, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "string.punctuation" - ] - }, - { - "cell_type": "code", - "execution_count": 39, - "metadata": {}, - "outputs": [], - "source": [ - "# some more pre-processing\n", - "\n", - "def filter(tweet):\n", - " \n", - " # remove punctuation and short words and urls\n", - " tweet = [t for t in tweet if t not in string.punctuation and len(t) > 3 and not t.startswith(\"http\")]\n", - " return tweet\n", - "\n", - "def tokenize_and_string(tweet):\n", - " \n", - " tkz = tknzr.tokenize(tweet)\n", - " \n", - " tkz = filter(tkz)\n", - " \n", - " return \" \".join(tkz)" - ] - }, - { - "cell_type": "code", - "execution_count": 40, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "['\"', '@ForIn2020', '@waltmossberg', '@mims', '@defcon_5', 'Exactly', '.', 'Tesla', 'is', 'absurdly', 'overvalued', 'if', 'based', 'on', 'the', 'past', ',', 'but', \"that's\", 'irr', '\\\\', 'xe2', '\\\\', 'x80', '\\\\', 'xa6', 'https://t.co/qQcTqkzgMl', '\"']\n", - "['@ForIn2020', '@waltmossberg', '@mims', '@defcon_5', 'Exactly', 'Tesla', 'absurdly', 'overvalued', 'based', 'past', \"that's\"]\n" - ] - } - ], - "source": [ - "print(tkz1)\n", - "print(filter(tkz1))" - ] - }, - { - "cell_type": "code", - "execution_count": 41, - "metadata": {}, - "outputs": [], - "source": [ - "df_elon[\"clean_text\"] = df_elon[\"text\"].apply(tokenize_and_string)" - ] - }, - { - "cell_type": "code", - "execution_count": 42, - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - "\n", - "\n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - " \n", - "
idcreated_attextclean_text
08496368680522752002017-04-05 14:56:29'And so the robots spared humanity ... https:/...robots spared humanity
18489887305850961922017-04-03 20:01:01\"@ForIn2020 @waltmossberg @mims @defcon_5 Exac...@ForIn2020 @waltmossberg @mims @defcon_5 Exact...
28489430724234977282017-04-03 16:59:35'@waltmossberg @mims @defcon_5 Et tu, Walt?'@waltmossberg @mims @defcon_5 Walt
38489357050572800012017-04-03 16:30:19'Stormy weather in Shortville ...'Stormy weather Shortville
48484160495736586242017-04-02 06:05:23\"@DaveLeeBBC @verge Coal is dying due to nat g...@DaveLeeBBC @verge Coal dying fracking It's ba...
\n", - "
" - ], - "text/plain": [ - " id created_at \\\n", - "0 849636868052275200 2017-04-05 14:56:29 \n", - "1 848988730585096192 2017-04-03 20:01:01 \n", - "2 848943072423497728 2017-04-03 16:59:35 \n", - "3 848935705057280001 2017-04-03 16:30:19 \n", - "4 848416049573658624 2017-04-02 06:05:23 \n", - "\n", - " text \\\n", - "0 'And so the robots spared humanity ... https:/... \n", - "1 \"@ForIn2020 @waltmossberg @mims @defcon_5 Exac... \n", - "2 '@waltmossberg @mims @defcon_5 Et tu, Walt?' \n", - "3 'Stormy weather in Shortville ...' \n", - "4 \"@DaveLeeBBC @verge Coal is dying due to nat g... \n", - "\n", - " clean_text \n", - "0 robots spared humanity \n", - "1 @ForIn2020 @waltmossberg @mims @defcon_5 Exact... \n", - "2 @waltmossberg @mims @defcon_5 Walt \n", - "3 Stormy weather Shortville \n", - "4 @DaveLeeBBC @verge Coal dying fracking It's ba... " - ] - }, - "execution_count": 42, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df_elon.head(5)" - ] - }, - { - "cell_type": "code", - "execution_count": 43, - "metadata": {}, - "outputs": [], - "source": [ - "# save cleaned up version\n", - "\n", - "df_elon.to_csv(os.path.join(root_folder,\"df_elon.csv\"), index=False)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Building a dictionary" - ] - }, - { - "cell_type": "code", - "execution_count": 44, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(2819, 7864)" - ] - }, - "execution_count": 44, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "from sklearn.feature_extraction.text import CountVectorizer\n", - "count_vect = CountVectorizer(lowercase=False, tokenizer=tknzr.tokenize)\n", - "X_count = count_vect.fit_transform(df_elon.clean_text)\n", - "X_count.shape" - ] - }, - { - "cell_type": "code", - "execution_count": 45, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "6617" - ] - }, - "execution_count": 45, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "word_list = count_vect.get_feature_names_out() \n", - "count_list = X_count.toarray().sum(axis=0)\n", - "dictionary = dict(zip(word_list,count_list))\n", - "count_vect.vocabulary_.get(\"robots\")" - ] - }, - { - "cell_type": "code", - "execution_count": 46, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "3" - ] - }, - "execution_count": 46, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "X_count[:,count_vect.vocabulary_.get(\"robots\")].toarray().sum()" - ] - }, - { - "cell_type": "code", - "execution_count": 47, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "3" - ] - }, - "execution_count": 47, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "dictionary[\"robots\"]" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Questions\n", - "\n", - "* Find the tokens most used by Elon.\n", - "* Find the twitter users most referred to by Elon (hint: use the @ handler to spot them)." - ] - }, - { - "cell_type": "code", - "execution_count": 48, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[('Tesla', 322),\n", - " ('Model', 236),\n", - " ('that', 223),\n", - " ('will', 218),\n", - " ('with', 177),\n", - " ('@SpaceX', 169),\n", - " ('from', 163),\n", - " ('this', 159),\n", - " ('@TeslaMotors', 149),\n", - " ('launch', 124)]" - ] - }, - "execution_count": 48, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "dictionary_list = sorted(dictionary.items(), key=lambda x:x[1], reverse=True)\n", - "[d for d in dictionary_list][:10]" - ] - }, - { - "cell_type": "code", - "execution_count": 49, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "[('@SpaceX', 169),\n", - " ('@TeslaMotors', 149),\n", - " ('@elonmusk', 85),\n", - " ('@NASA', 48),\n", - " ('@Space_Station', 19),\n", - " ('@FredericLambert', 17),\n", - " ('@ID_AA_Carmack', 15),\n", - " ('@WIRED', 14),\n", - " ('@vicentes', 14),\n", - " ('@BadAstronomer', 11)]" - ] - }, - "execution_count": 49, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "dictionary_list_users = sorted(dictionary.items(), key=lambda x:x[1], reverse=True)\n", - "[d for d in dictionary_list if d[0].startswith('@')][:10]" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Representing tweets as vectors\n", - "\n", - "Texts are of variable length and need to be represented numerically in some way. Most typically, we represent them as *equally-sized vectors*.\n", - "\n", - "Actually, this is what we have already done! Let's take a closer look at `X_count` above.." - ] - }, - { - "cell_type": "code", - "execution_count": 50, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "id 849636868052275200\n", - "created_at 2017-04-05 14:56:29\n", - "text 'And so the robots spared humanity ... https:/...\n", - "clean_text robots spared humanity\n", - "Name: 0, dtype: object" - ] - }, - "execution_count": 50, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# This is the first Tweet of the data frame\n", - "\n", - "df_elon.loc[0]" - ] - }, - { - "cell_type": "code", - "execution_count": 51, - "metadata": {}, - "outputs": [], - "source": [ - "# let's get the vector representation for this Tweet\n", - "\n", - "vector_representation = X_count[0,:]" - ] - }, - { - "cell_type": "code", - "execution_count": 52, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "3" - ] - }, - "execution_count": 52, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# there are 3 positions not to zero, as we would expect: the vector contains 1 in the columns related to the 3 words that make up the Tweet. \n", - "# It would contain a number higher than 1 if a given word were occurring multiple times.\n", - "\n", - "np.sum(vector_representation)" - ] - }, - { - "cell_type": "code", - "execution_count": 53, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "1\n", - "1\n", - "1\n" - ] - } - ], - "source": [ - "# Let's check that indeed the vector contains 1s for the right words\n", - "# Remember, the vector has shape (1 x size of the vocabulary)\n", - "\n", - "print(vector_representation[0,count_vect.vocabulary_.get(\"robots\")])\n", - "print(vector_representation[0,count_vect.vocabulary_.get(\"spared\")])\n", - "print(vector_representation[0,count_vect.vocabulary_.get(\"humanity\")])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Term Frequency - Inverse Document Frequency\n", - "We can use boolean counts (1/0) and raw counts (as we did before) to represent a Tweet over the space of the vocabulary, but there exist improvements on this basic idea. For example, the TF-IDF weighting scheme:\n", - "\n", - "$tfidf(t, d, D) = tf(t, d) \\cdot idf(t, D)$\n", - "\n", - "$tf(t, d) = f_{t,d}$\n", - "\n", - "$idf(t, D) = log \\Big( \\frac{|D|}{|{d \\in D: t \\in d}|} \\Big)$" - ] - }, - { - "cell_type": "code", - "execution_count": 54, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "(2819, 7864)" - ] - }, - "execution_count": 54, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "from sklearn.feature_extraction.text import TfidfVectorizer\n", - "count_vect = TfidfVectorizer(lowercase=False, tokenizer=tknzr.tokenize)\n", - "X_count_tfidf = count_vect.fit_transform(df_elon.clean_text)\n", - "X_count_tfidf.shape" - ] - }, - { - "cell_type": "code", - "execution_count": 55, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "1.7226760995112569" - ] - }, - "execution_count": 55, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "X_count_tfidf[0,:].sum()" - ] - }, - { - "cell_type": "code", - "execution_count": 56, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "3" - ] - }, - "execution_count": 56, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "X_count[0,:].sum()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Sparse vectors (mention)\n", - "How is Python representing these vectors in memory? Most of their cells are set to zero. \n", - "\n", - "We call any vector or matrix whose cells are mostly to zero *sparse*.\n", - "There are efficient ways to store them in memory." - ] - }, - { - "cell_type": "code", - "execution_count": 57, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "<1x7864 sparse matrix of type ''\n", - "\twith 3 stored elements in Compressed Sparse Row format>" - ] - }, - "execution_count": 57, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "X_count_tfidf[0,:]" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Spacy pipelines\n", - "\n", - "Useful to construct sequences of pre-processing steps: https://spacy.io/usage/processing-pipelines." - ] - }, - { - "cell_type": "code", - "execution_count": 58, - "metadata": {}, - "outputs": [ - { - "ename": "OSError", - "evalue": "[E050] Can't find model 'en_core_web_sm'. It doesn't seem to be a Python package or a valid path to a data directory.", - "output_type": "error", - "traceback": [ - "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", - "\u001b[0;31mOSError\u001b[0m Traceback (most recent call last)", - "Input \u001b[0;32mIn [58]\u001b[0m, in \u001b[0;36m\u001b[0;34m()\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;66;03m# Load a pre-trained pipeline (Web Small): https://spacy.io/usage/models\u001b[39;00m\n\u001b[1;32m 2\u001b[0m \n\u001b[1;32m 3\u001b[0m \u001b[38;5;66;03m#!python -m spacy download en_core_web_sm\u001b[39;00m\n\u001b[0;32m----> 4\u001b[0m nlp \u001b[38;5;241m=\u001b[39m \u001b[43mspacy\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43men_core_web_sm\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/.pyenv/versions/3.10.0/envs/ada-dhoxss-2022/lib/python3.10/site-packages/spacy/__init__.py:51\u001b[0m, in \u001b[0;36mload\u001b[0;34m(name, vocab, disable, exclude, config)\u001b[0m\n\u001b[1;32m 30\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mload\u001b[39m(\n\u001b[1;32m 31\u001b[0m name: Union[\u001b[38;5;28mstr\u001b[39m, Path],\n\u001b[1;32m 32\u001b[0m \u001b[38;5;241m*\u001b[39m,\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 36\u001b[0m config: Union[Dict[\u001b[38;5;28mstr\u001b[39m, Any], Config] \u001b[38;5;241m=\u001b[39m util\u001b[38;5;241m.\u001b[39mSimpleFrozenDict(),\n\u001b[1;32m 37\u001b[0m ) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m Language:\n\u001b[1;32m 38\u001b[0m \u001b[38;5;124;03m\"\"\"Load a spaCy model from an installed package or a local path.\u001b[39;00m\n\u001b[1;32m 39\u001b[0m \n\u001b[1;32m 40\u001b[0m \u001b[38;5;124;03m name (str): Package name or model path.\u001b[39;00m\n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 49\u001b[0m \u001b[38;5;124;03m RETURNS (Language): The loaded nlp object.\u001b[39;00m\n\u001b[1;32m 50\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m---> 51\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mutil\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload_model\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 52\u001b[0m \u001b[43m \u001b[49m\u001b[43mname\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mvocab\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mvocab\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mdisable\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mdisable\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mexclude\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mexclude\u001b[49m\u001b[43m,\u001b[49m\u001b[43m \u001b[49m\u001b[43mconfig\u001b[49m\u001b[38;5;241;43m=\u001b[39;49m\u001b[43mconfig\u001b[49m\n\u001b[1;32m 53\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m\n", - "File \u001b[0;32m~/.pyenv/versions/3.10.0/envs/ada-dhoxss-2022/lib/python3.10/site-packages/spacy/util.py:427\u001b[0m, in \u001b[0;36mload_model\u001b[0;34m(name, vocab, disable, exclude, config)\u001b[0m\n\u001b[1;32m 425\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m name \u001b[38;5;129;01min\u001b[39;00m OLD_MODEL_SHORTCUTS:\n\u001b[1;32m 426\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mIOError\u001b[39;00m(Errors\u001b[38;5;241m.\u001b[39mE941\u001b[38;5;241m.\u001b[39mformat(name\u001b[38;5;241m=\u001b[39mname, full\u001b[38;5;241m=\u001b[39mOLD_MODEL_SHORTCUTS[name])) \u001b[38;5;66;03m# type: ignore[index]\u001b[39;00m\n\u001b[0;32m--> 427\u001b[0m \u001b[38;5;28;01mraise\u001b[39;00m \u001b[38;5;167;01mIOError\u001b[39;00m(Errors\u001b[38;5;241m.\u001b[39mE050\u001b[38;5;241m.\u001b[39mformat(name\u001b[38;5;241m=\u001b[39mname))\n", - "\u001b[0;31mOSError\u001b[0m: [E050] Can't find model 'en_core_web_sm'. It doesn't seem to be a Python package or a valid path to a data directory." - ] - } - ], - "source": [ - "# Load a pre-trained pipeline (Web Small): https://spacy.io/usage/models\n", - "\n", - "#!python -m spacy download en_core_web_sm\n", - "nlp = spacy.load('en_core_web_sm')" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "*.. the modelā€™s meta.json tells spaCy to use the language \"en\" and the pipeline [\"tagger\", \"parser\", \"ner\"]. spaCy will then initialize spacy.lang.en.English, and create each pipeline component and add it to the processing pipeline. Itā€™ll then load in the modelā€™s data from its data directory and return the modified Language class for you to use as the nlp object.*\n", - "\n", - "Let's create a simple pipeline that does **lemmatization**, **part of speech tagging** and **named entity recognition** using spaCy models.\n", - "\n", - "*If you don't know what these NLP tasks are, please ask!*" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "tweet_pos = list()\n", - "tweet_ner = list()\n", - "tweet_lemmas = list()\n", - "\n", - "for tweet in df_elon.text.values:\n", - " spacy_tweet = nlp(tweet)\n", - " \n", - " local_tweet_pos = list()\n", - " local_tweet_ner = list()\n", - " local_tweet_lemmas = list()\n", - " \n", - " for sentence in list(spacy_tweet.sents):\n", - " # --- lemmatization, remove punctuation and stop wors\n", - " local_tweet_lemmas.extend([token.lemma_ for token in sentence if not token.is_punct | token.is_stop])\n", - " local_tweet_pos.extend([token.pos_ for token in sentence if not token.is_punct | token.is_stop])\n", - " for ent in spacy_tweet.ents:\n", - " local_tweet_ner.append(ent)\n", - "\n", - " tweet_pos.append(local_tweet_pos)\n", - " tweet_ner.append(local_tweet_ner)\n", - " tweet_lemmas.append(local_tweet_lemmas)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "tweet_lemmas[0]" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "tweet_pos[0]" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "tweet_ner[0]" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# but it actually works!\n", - "\n", - "tweet_ner[3]" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "*Note: we are really just scratching the surface of spaCy, but it is worth knowing it's there.*" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "### Searching tweets\n", - "\n", - "Once we have represented Tweets as vectors, we can easily find similar ones using basic operations such as filtering." - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "target = 0\n", - "print(df_elon.clean_text[target])" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "condition = X_count_tfidf[target,:] > 0" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(condition)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "X_filtered = X_count_tfidf[:,np.ravel(condition.toarray())]" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "X_filtered" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(X_filtered)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "from scipy import sparse\n", - "\n", - "sparse.find(X_filtered)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "tweet_indices = list(sparse.find(X_filtered)[0])" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "print(\"TARGET: \" + df_elon.clean_text[target])\n", - "\n", - "for n, tweet_index in enumerate(list(set(tweet_indices))):\n", - " if tweet_index != target:\n", - " print(str(n) +\")\"+ df_elon.clean_text[tweet_index])" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "#### Questions\n", - "\n", - "* Can you rank the matched tweets using their tf-idf weights, so to put higher weighted tweets first?\n", - "* Which limitations do you think a bag of words representation has?\n", - "* Can you spot any limitations of this approach based on similarity measures over bag of words representations?" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "---" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3 (ipykernel)", - "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.10.0" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -} diff --git a/notebooks/3.2 Exploratory data analysis and working with texts.ipynb b/notebooks/3.2 Exploratory data analysis and working with texts.ipynb new file mode 100644 index 0000000..34d44c9 --- /dev/null +++ b/notebooks/3.2 Exploratory data analysis and working with texts.ipynb @@ -0,0 +1,2788 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# 3.2 Exploratory data analysis and working with texts\n", + "\n", + "In this notebook, we learn about:\n", + "1. descriptive statistics to explore data;\n", + "2. working with texts (hints)." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Part 1: descriptive statistics\n", + "\n", + "*The goal of exploratory data analysis is to develop an understanding of your data. EDA is fundamentally a creative process. And like most creative processes, the key to asking quality questions is to generate a large quantity of questions.* \n", + "\n", + "Key questions:\n", + "* Which kind of variation occurs within variables?\n", + "* Which kind of co-variation occurs between variables?\n", + "\n", + "https://r4ds.had.co.nz/exploratory-data-analysis.html" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "# imports\n", + "\n", + "import os, codecs\n", + "import pandas as pd\n", + "import numpy as np\n", + "import seaborn as sns\n", + "import matplotlib.pyplot as plt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Import the dataset\n", + "Let us import the Venetian apprenticeship contracts dataset in memory." + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "root_folder = \"../data/apprenticeship_venice/\"\n", + "df_contracts = pd.read_csv(codecs.open(os.path.join(root_folder,\"professions_data.csv\"), encoding=\"utf8\"), sep=\";\")\n", + "df_professions = pd.read_csv(codecs.open(os.path.join(root_folder,\"professions_classification.csv\"), encoding=\"utf8\"), sep=\",\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Let's take another look to the dataset." + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "RangeIndex: 9653 entries, 0 to 9652\n", + "Data columns (total 47 columns):\n", + " # Column Non-Null Count Dtype \n", + "--- ------ -------------- ----- \n", + " 0 page_title 9653 non-null object \n", + " 1 register 9653 non-null object \n", + " 2 annual_salary 7870 non-null float64\n", + " 3 a_profession 9653 non-null object \n", + " 4 profession_code_strict 9618 non-null object \n", + " 5 profession_code_gen 9614 non-null object \n", + " 6 profession_cat 9597 non-null object \n", + " 7 corporation 9350 non-null object \n", + " 8 keep_profession_a 9653 non-null int64 \n", + " 9 complete_profession_a 9653 non-null int64 \n", + " 10 enrolmentY 9628 non-null float64\n", + " 11 enrolmentM 9631 non-null float64\n", + " 12 startY 9533 non-null float64\n", + " 13 startM 9539 non-null float64\n", + " 14 length 9645 non-null float64\n", + " 15 has_fled 9653 non-null int64 \n", + " 16 m_profession 9535 non-null object \n", + " 17 m_profession_code_strict 9508 non-null object \n", + " 18 m_profession_code_gen 9506 non-null object \n", + " 19 m_profession_cat 9489 non-null object \n", + " 20 m_corporation 9276 non-null object \n", + " 21 keep_profession_m 9653 non-null int64 \n", + " 22 complete_profession_m 9653 non-null int64 \n", + " 23 m_gender 9554 non-null float64\n", + " 24 m_name 9623 non-null object \n", + " 25 m_surname 6960 non-null object \n", + " 26 m_patronimic 2620 non-null object \n", + " 27 m_atelier 1434 non-null object \n", + " 28 m_coords 9639 non-null object \n", + " 29 a_name 9653 non-null object \n", + " 30 a_age 9303 non-null float64\n", + " 31 a_gender 9522 non-null float64\n", + " 32 a_geo_origins 7149 non-null object \n", + " 33 a_geo_origins_std 4636 non-null object \n", + " 34 a_coords 9610 non-null object \n", + " 35 a_quondam 7848 non-null float64\n", + " 36 accommodation_master 9653 non-null int64 \n", + " 37 personal_care_master 9653 non-null int64 \n", + " 38 clothes_master 9653 non-null int64 \n", + " 39 generic_expenses_master 9653 non-null int64 \n", + " 40 salary_in_kind_master 9653 non-null int64 \n", + " 41 pledge_goods_master 9653 non-null int64 \n", + " 42 pledge_money_master 9653 non-null int64 \n", + " 43 salary_master 9653 non-null int64 \n", + " 44 female_guarantor 9653 non-null int64 \n", + " 45 period_cat 7891 non-null float64\n", + " 46 incremental_salary 9653 non-null int64 \n", + "dtypes: float64(11), int64(15), object(21)\n", + "memory usage: 3.5+ MB\n" + ] + } + ], + "source": [ + "df_contracts.info()" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
page_titleregisterannual_salarya_professionprofession_code_strictprofession_code_genprofession_catcorporationkeep_profession_acomplete_profession_a...personal_care_masterclothes_mastergeneric_expenses_mastersalary_in_kind_masterpledge_goods_masterpledge_money_mastersalary_masterfemale_guarantorperiod_catincremental_salary
0Carlo Della sosta (Orese) 1592-08-03asv, giustizia vecchia, accordi dei garzoni, 1...NaNoreseoreseoreficeoreficeOresi11...11100000NaN0
1Antonio quondam Andrea (squerariol) 1583-01-09asv, giustizia vecchia, accordi dei garzoni, 1...12.5squerariolsquerariollavori allo squerolavori allo squeroSquerarioli11...001000101.00
2Cristofollo di Zuane (batioro in carta) 1591-0...asv, giustizia vecchia, accordi dei garzoni, 1...NaNbatiorobatiorobattiorofabbricatore di foglie/fili/cordelle d'oro o a...Battioro11...00000000NaN0
\n", + "

3 rows Ɨ 47 columns

\n", + "
" + ], + "text/plain": [ + " page_title \\\n", + "0 Carlo Della sosta (Orese) 1592-08-03 \n", + "1 Antonio quondam Andrea (squerariol) 1583-01-09 \n", + "2 Cristofollo di Zuane (batioro in carta) 1591-0... \n", + "\n", + " register annual_salary \\\n", + "0 asv, giustizia vecchia, accordi dei garzoni, 1... NaN \n", + "1 asv, giustizia vecchia, accordi dei garzoni, 1... 12.5 \n", + "2 asv, giustizia vecchia, accordi dei garzoni, 1... NaN \n", + "\n", + " a_profession profession_code_strict profession_code_gen \\\n", + "0 orese orese orefice \n", + "1 squerariol squerariol lavori allo squero \n", + "2 batioro batioro battioro \n", + "\n", + " profession_cat corporation \\\n", + "0 orefice Oresi \n", + "1 lavori allo squero Squerarioli \n", + "2 fabbricatore di foglie/fili/cordelle d'oro o a... Battioro \n", + "\n", + " keep_profession_a complete_profession_a ... personal_care_master \\\n", + "0 1 1 ... 1 \n", + "1 1 1 ... 0 \n", + "2 1 1 ... 0 \n", + "\n", + " clothes_master generic_expenses_master salary_in_kind_master \\\n", + "0 1 1 0 \n", + "1 0 1 0 \n", + "2 0 0 0 \n", + "\n", + " pledge_goods_master pledge_money_master salary_master female_guarantor \\\n", + "0 0 0 0 0 \n", + "1 0 0 1 0 \n", + "2 0 0 0 0 \n", + "\n", + " period_cat incremental_salary \n", + "0 NaN 0 \n", + "1 1.0 0 \n", + "2 NaN 0 \n", + "\n", + "[3 rows x 47 columns]" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_contracts.head(3)" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "Index(['page_title', 'register', 'annual_salary', 'a_profession',\n", + " 'profession_code_strict', 'profession_code_gen', 'profession_cat',\n", + " 'corporation', 'keep_profession_a', 'complete_profession_a',\n", + " 'enrolmentY', 'enrolmentM', 'startY', 'startM', 'length', 'has_fled',\n", + " 'm_profession', 'm_profession_code_strict', 'm_profession_code_gen',\n", + " 'm_profession_cat', 'm_corporation', 'keep_profession_m',\n", + " 'complete_profession_m', 'm_gender', 'm_name', 'm_surname',\n", + " 'm_patronimic', 'm_atelier', 'm_coords', 'a_name', 'a_age', 'a_gender',\n", + " 'a_geo_origins', 'a_geo_origins_std', 'a_coords', 'a_quondam',\n", + " 'accommodation_master', 'personal_care_master', 'clothes_master',\n", + " 'generic_expenses_master', 'salary_in_kind_master',\n", + " 'pledge_goods_master', 'pledge_money_master', 'salary_master',\n", + " 'female_guarantor', 'period_cat', 'incremental_salary'],\n", + " dtype='object')" + ] + }, + "execution_count": 5, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_contracts.columns" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Every row represents an apprenticeship contract. Contracts were registered both at the guild's and at a public office. This is a sample of contracts from a much larger set of records.\n", + "\n", + "Some of the variables we will work with are:\n", + "* `annual_salary`: the annual salary paid to the apprencice, if any (in Venetian ducats).\n", + "* `a_profession` to `corporation`: increasingly generic classifications for the apprentice's stated profession.\n", + "* `startY` and `enrolmentY`: contract start and registration year respectively.\n", + "* `length`: of the contract, in years.\n", + "* `m_gender` and `a_gender`: of master and apprentice respectively.\n", + "* `a_age`: age of the apprentice at entry, in years.\n", + "* `female_guarantor`: if at least one of the contract's guarantors was female, boolean." + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1.0 9424\n", + "0.0 130\n", + "Name: m_gender, dtype: int64" + ] + }, + "execution_count": 27, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_contracts.m_gender.value_counts()" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
TrascrizioneStandardGruppo 0Gruppo 1Gruppo 2Gruppo 3Gruppo 4Corporazione
0al negotio del librarolibrerlibraiolibrai - diverse specializzazionistampaaltre lavorazioni manifatturierebenilibreri, stampatori e ligadori
1arte de far arpicordiarte de far arpicordifabbricatore di arpicordifabbricatore di strumenti musicalimusicaaltri serviziserviziNaN
2arte de' coloriarte dei colorifabbricazione/vendita di coloricoloricoloridecorazioni e mestieri dell'artebenispezieri
\n", + "
" + ], + "text/plain": [ + " Trascrizione Standard \\\n", + "0 al negotio del libraro librer \n", + "1 arte de far arpicordi arte de far arpicordi \n", + "2 arte de' colori arte dei colori \n", + "\n", + " Gruppo 0 Gruppo 1 \\\n", + "0 libraio librai - diverse specializzazioni \n", + "1 fabbricatore di arpicordi fabbricatore di strumenti musicali \n", + "2 fabbricazione/vendita di colori colori \n", + "\n", + " Gruppo 2 Gruppo 3 Gruppo 4 \\\n", + "0 stampa altre lavorazioni manifatturiere beni \n", + "1 musica altri servizi servizi \n", + "2 colori decorazioni e mestieri dell'arte beni \n", + "\n", + " Corporazione \n", + "0 libreri, stampatori e ligadori \n", + "1 NaN \n", + "2 spezieri " + ] + }, + "execution_count": 8, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_professions.head(3)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "The professions data frame contains a classification system for each profession as found in the records (transcription, first column). The last column is the guild (or corporation) which governed the given profession. This work was performed manually by historians. We don't use it here as the classifications we need are already part of the main dataframe." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Questions\n", + "\n", + "* Plot the distribution (histogram) of the apprentices' age, contract length, annual salary and start year.\n", + "* Calculate the proportion of female apprentices and masters, and of contracts with a female guarantor.\n", + "* How likely it is for a female apprentice to have a female master? And for a male apprentice?" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD4CAYAAAAAczaOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAUuElEQVR4nO3df4zcd53f8ecLk4YovpCkSVbGdutU56suP4pRVq6l9KQ1pBcfoDpIF8koJYmgMoqCBKqrnsM/wCFL+eOANoJENRcUp/ywrIM0FpBecy6rFCnB2DSc4/xQrIubc2zFuiOAlz9cbN79Y76+jsxkd7w7u47383xIo5l5z+f7nc/bk7z2u5/5zmyqCklSG952vicgSVo4hr4kNcTQl6SGGPqS1BBDX5Ia8vbzPYGZXHXVVbVq1appx/zqV7/i0ksvXZgJvYXYd1vsuy1z7Xv//v1/V1VXn11/y4f+qlWr2Ldv37RjJicnmZiYWJgJvYXYd1vsuy1z7TvJ/xlUd3lHkhpi6EtSQ2YM/STvSLI3yU+THEzyua7+2SSvJXm2u7y/b5v7khxK8lKSW/vqNyU50D32QJLMT1uSpEGGWdM/Cby3qqaSXAT8MMkT3WNfqqo/6x+c5DpgE3A98C7gr5L8Xl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6H3d6uvAZ4D/BuwC/gnwKnB7VZ39Zu8FK8m/Av4XcID/v8b7aXrr+ou5739B7027JfQOzHZV1Z8m+ccs4r77dcs7/6GqPthC30n+Gb2je+gtu3+zqrbNR+8XdOhLks7Nhby8I0k6R4a+JDXE0Jekhhj6ktQQQ1+SGmLoS1JDDH1Jasj/A72+cYT5usntAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "df_contracts.a_age.hist(bins=30)" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "count 9303.000000\n", + "mean 14.266688\n", + "std 2.902770\n", + "min 1.000000\n", + "25% 12.000000\n", + "50% 14.000000\n", + "75% 16.000000\n", + "max 50.000000\n", + "Name: a_age, dtype: float64" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_contracts.a_age.describe()" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD4CAYAAAAAczaOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAVUElEQVR4nO3dfaxc9Z3f8fdnIWEpDgFKcmXZdE1aNy0PyoOvKFVKZBe0OAmN6QOVI7o4LZVVRFaJmpUwjdRu/7DqbcVKgSzsuiHFNOx63exGtjZiu8jNbVSJhMUJiTGE4gSXePHa3ZAHnEakpt/+MYdosO/1HV/mztzh935Joznznd858z3njj/3zG/mjlNVSJLa8AvjbkCSNDqGviQ1xNCXpIYY+pLUEENfkhpy9rgbmM/FF19cq1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UrLdVjOpcl+7xN8ingBPBQVzoC/JWqeg/wL4HfTXL+uPpj7p/1Uj2mH+G1JycjPZ5vxNBf0l/1kORN9AL/oar6Q4CqOlpVr1TV/wP+IyN8WX86VfVCd30M+CK9vo4mWQ7QXR8bX4ev8QHg61V1FJbuMWXu47ckn7dJNgE3ADdXNwHdTZd8v1veR2+u/K+Pq8fT/KyX3DFNcjbwD4Dff7U26uP5Rgz9JftVD91c3v3A01X1m3315X3D/j7w5MnrjlqS85K85dVlem/qPUnvWG7qhm0Cdo+nw1O85uxpKR7TzlzHbw+wMck5SS4FVgOPjaG/n0vvPzy6A/hwVf2fvvrb0vu/MUjyDnq9fnc8XZ72Z73kjilwHfDtqjr8amHkx3NU7xiP8gJ8kN4nY74DfGrc/fT19Xfovbz8FvBEd/kg8J+B/V19D7B8CfT6DnqffPgmcODV4wj8ZWAv8Gx3fdES6PUvAd8H3tpXG/sxpfdL6Ajwf+mddd56uuMHfKp7zj4DfGAJ9HqQ3pz4q8/V3+7G/sPuOfFN4OvA3xtzn3P+rMd1TGfrs6s/APyLk8aO9Hj6NQyS1JA34vSOJGkOhr4kNcTQl6SGGPqS1BBDX5IaYuhLUkMMfUlqyP8HoM4Qkzxoov4AAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "df_contracts.annual_salary.hist(bins=30)" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "count 7870.000000\n", + "mean 5.916921\n", + "std 6.985214\n", + "min 0.166667\n", + "25% 3.000000\n", + "50% 4.000000\n", + "75% 6.000000\n", + "max 180.000000\n", + "Name: annual_salary, dtype: float64" + ] + }, + "execution_count": 26, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_contracts.annual_salary.describe()" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYYAAAD4CAYAAADo30HgAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAVkklEQVR4nO3df4wc91nH8feD3Qa318YOoYexLRyQVUhifsSnECit7pRCTBPVARHkKlAHgqyitATkSnWoRPnHwoCC1BJSZHBUl0S9mjQlJqmhkclRIdUJcUh7cdw0LjGpE9eGNkl7JQpcePhjx7Df697d7s7u3l38fkmnnf3Od2aenZ3bz82PnYvMRJKks75roQuQJC0uBoMkqWAwSJIKBoMkqWAwSJIKyxe6gPlceOGFuX79+rb7f/vb3+b1r399/wqqyfrqsb56rK+epVTfkSNH/iMzv7erGWXmov7ZtGlTduLBBx/sqP+gWV891leP9dWzlOoDHskuP3c9lCRJKhgMkqSCwSBJKhgMkqSCwSBJKhgMkqSCwSBJKhgMkqSCwSBJKiz6W2K8mqzfeT87Nk5zw877257mxO6r+1iRJH0n9xgkSQWDQZJUMBgkSQWDQZJUMBgkSQWDQZJUMBgkSQWDQZJUMBgkSQWDQZJUmDcYIuKOiDgTEY83tf1xRHwpIr4YEZ+OiJVN426JiOMR8WREXNXUvikiJqtxH4mI6PmrkSTV1s4ew8eAzTPaHgAuzcwfBb4M3AIQERcDW4FLqmluj4hl1TQfBbYDG6qfmfOUJC0C8wZDZn4O+MaMts9m5nT19DCwthreAoxn5suZ+TRwHLg8IlYDb8zMz2dmAh8Hru3Ra5Ak9VA0Pqfn6RSxHrgvMy9tMe5vgU9m5p0RcRtwODPvrMbtBQ4CJ4Ddmfn2qv2twAcy85pZlredxt4Fw8PDm8bHx9t+QVNTUwwNDbXdf5Amn32R4RVw+qX2p9m45vz+FdTCYl5/YH11WV89S6m+sbGxI5k50s18at12OyI+CE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CQVluqhJElSnxgMkqSCwSBJKhgMkqSCwSBJKhgMkqSCwSBJKvwvlUId3avGll4AAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "df_contracts[df_contracts.annual_salary < 20].annual_salary.hist(bins=25)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 9, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD4CAYAAAAAczaOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAATvklEQVR4nO3dfYxl9X3f8fenYBPCmgd3lRVmqZZKUImHxO1ONlQu7aztBmJbAquxtA41ILvaCOEqUUnLklYKkbXVNsrGFaJGXQvLUFKPaGwHZCAIo0wIEZTsEuJlIchr74ouILaOycLQlGTX3/5xz1Z3x/O0s3Pn3pnf+yWN5p7vPU/f+/CZM7975kyqCklSG/7OsHdAkrR8DH1JaoihL0kNMfQlqSGGviQ15PRh78B81q5dWxs2bBjIut955x3OOuusgax7VKz2Hu1v5VvtPQ6jv7Vr1/LYY489VlXXTL9v5EN/w4YN7N69eyDrnpycZHx8fCDrHhWrvUf7W/lWe4/D6i/J2pnqDu9IUkMMfUlqiKEvSQ0x9CWpIYa+JDXE0Jekhhj6ktQQQ1+SGmLoS1JDRv4vcleiDdseHtq2D+74+NC2LWn0zXukn+TCJH+Y5KUk+5L8Sle/I8mrSZ7vvj7Wt8ztSfYneTnJ1X31jUn2dvfdmSSDaUuSNJOFHOkfBW6tqueSvA/Yk+Tx7r4vVtVv98+c5FJgC3AZ8AHg20kuqapjwN3AVuAZ4BHgGuDRpWlFkjSfeY/0q+r1qnquu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+Z9J/ijJz3b1C4D/1Tff8T5WS3/9/gXwZ90bbqX1B7P0mOQs4DbgN6fNv9J6nO05vASoJI8leS7Jv+vqK60/mL3HkcqZ5b4Mw7DcDXyB3k/cLwA7gc/SuwDcMeADwHnAHyf5Ngu8XMQIOZ3e/l8J/CzwQJK/z+x9rIr+uqMjklwG/Cd6R42w8vqD2Z/D3wS+WFVT04Z7V1qPs/V3OvBPutr/AZ5Isgd4a4Z1jHJ/MHuPI5UzTYR+Vb1x/HaSLwPf6iZ/CfiDqvpb4HCSPwHGgD+md4mI40b9chGHgG90Ifhskh/Ru8jTbJe9OMTq6O9/J1kPfBO4oaq+1zf/SuoPZu/x54Bf7D4UPBf4UZL/S2+MfyX1ONdr9I+q6gcASR6hN1Z+PyurP5i9x5HKmSaGd7qxs+M+CRz/xP0V4MPpOYveT+i/qKrXgbeTXNl9mn4D8OCy7vTJ+X3gwwBJLgHeS+8qew8BW7px7ouAi4FnV0t/Sc4FHgZur6o/OT7zCuwPZumxqq6qqg1VtQH4z8B/rKq7VmCPv8/Mr9HHgJ9O8pPdmPc/A15cgf3B7D2OVs4M+pPi5f4CvkZv7Oxv6f3k/Rzw34C99M4SeAg4v5t3Db0zIvYBLwL/tm89Y/R+OHwPuIvur5eH/TVLf++ld2T0AvAc8OG++f9918PL9J0ZsBr6A/4DvbHS5/u+jp8xMZL9LeY57FvuDk48e2cke1zEa/Rfdu/BF4DfGvX+FvE6Hamc8TIMktSQJoZ3JEk9hr4kNcTQl6SGGPqS1BBDX5IaYuhLUkMMfUlqyP8DDE9W+GtusxEAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "df_contracts.startY.hist(bins=10)" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1.0 0.987293\n", + "0.0 0.012707\n", + "Name: a_gender, dtype: float64" + ] + }, + "execution_count": 41, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_contracts.a_gender.value_counts(1)" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "9401.0" + ] + }, + "execution_count": 28, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_contracts.a_gender.sum()" + ] + }, + { + "cell_type": "code", + "execution_count": 42, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "9401.0" + ] + }, + "execution_count": 42, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_contracts.a_gender.sum()" + ] + }, + { + "cell_type": "code", + "execution_count": 44, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3" + ] + }, + "execution_count": 44, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sum([True,False,False,True,True])" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "0.026105873821609893" + ] + }, + "execution_count": 35, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "1-(df_contracts.a_gender.sum()/df_contracts.shape[0])" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "2.6105873821609893" + ] + }, + "execution_count": 36, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# proportion of female apprentices\n", + "(1-(df_contracts.a_gender.sum()/df_contracts.shape[0]))*100" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "2.3723194861701047" + ] + }, + "execution_count": 13, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# proportion of female masters\n", + "(1-(df_contracts.m_gender.sum()/df_contracts.shape[0]))*100" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "73.10924369747899" + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# prop female apprentices with male master\n", + "(df_contracts[(df_contracts.a_gender == 0) & (df_contracts.startY < 1800)].m_gender.sum()\\\n", + " /df_contracts[(df_contracts.a_gender == 0) & (df_contracts.startY < 1800)].shape[0])*100" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "98.10528582193993 %\n" + ] + } + ], + "source": [ + "# prop male apprentices with male master\n", + "print((df_contracts[(df_contracts.a_gender == 1) & (df_contracts.startY < 1800)].m_gender.sum()\\\n", + " /df_contracts[(df_contracts.a_gender == 1) & (df_contracts.startY < 1800)].shape[0])*100,\"%\")" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Looking at empirical distributions" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 46, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX0AAAD4CAYAAAAAczaOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAT2ElEQVR4nO3df4zk9X3f8eerh0OpiRM74NXlDveIdLbCj+QqVhTJbbTESbkYK+AqTg5RA7Wrsy0s2epVLaSR7MY6CbVx3FqJic4GgWWXCwqxQcEkITQrXAmK72zi44epD3OxlzvdySY1rGNdc/jdP+a7ZbLs7e7M7M3CfJ4PaTQzn+/38/1+5s3x2u985jvfSVUhSWrDP1jvAUiSxsfQl6SGGPqS1BBDX5IaYuhLUkNOW+8BrOSss86qLVu2DNzvBz/4Aa997WvXfkCvMtbhJdaixzr0THod9u/f/92qOntx+ys+9Lds2cK+ffsG7jc7O8vMzMzaD+hVxjq8xFr0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5ErkJggg==\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "df_contracts[df_contracts.annual_salary < 50].annual_salary.hist(bins=40)" + ] + }, + { + "cell_type": "code", + "execution_count": 47, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 47, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAX8AAAD4CAYAAAAEhuazAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAQaUlEQVR4nO3df6xf9V3H8efLMpHQbRTZGkLRommMQBXlBknmzG02Rx1LYEZMCRklznRZINkS/ljZP5uaJo1xU5cJsROyks01jduksaISshtcMmTtgpYfQ5pRsbRpM2GMLgYte/vHPa3fdd/b9nt7f33P5/lIvvme8znnfM/nndP7uud+zvmepqqQJLXlJxa7A5KkhWf4S1KDDH9JapDhL0kNMvwlqUHnLXYHzuSSSy6p1atXn5z/wQ9+wIUXXrh4HZonfa0L+lubdY2fvtY2rK69e/d+t6reNtM2Sz78V69ezZ49e07OT01NMTk5uXgdmid9rQv6W5t1jZ++1jasriT/cbptHPaRpAYZ/pLUIMNfkhpk+EtSgwx/SWqQ4S9JDTL8JalBhr8kNcjwl6QGLflv+EpzbfXm3SOtf2DrjfPUE2nxeOYvSQ0y/CWpQYa/JDXI8JekBhn+ktQgw1+SGmT4S1KDDH9JapDhL0kNMvwlqUGGvyQ1yPCXpAYZ/pLUIMNfkhpk+EtSg84Y/kkuT/K1JM8meTrJR7r2i5M8kuT57n3FwDb3JNmf5LkkNwy0X5tkX7fsM0kyP2VJkk7nbM78jwN3V9UvAtcDdya5EtgMPFpVa4BHu3m6ZRuAq4D1wL1JlnWfdR+wCVjTvdbPYS2SpLN0xvC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FV9q5t+DXgWuIwxP26nqWvs1bRj3eybulcx4jEbl/C/DPjPgfmD9ORAdgr4pyR7u0db9MnKqjoM0z+QwNsXuT9z7a4k/9YNC43V0MipkqwGfgX4F3p03E6pC3pwzJIsS/IkcBR4pKpGPmbjEv5n9ViIMfaOqvpV4LeAO7shBi199wE/D1wDHAY+tai9OQdJlgNfBj5aVd9f7P7MlSF19eKYVdUbVXUN009JuC7J1aN+xriEf68fC1FVh7r3o8BXmR7m6osj3fjriXHYo4vcnzlTVUe6H8IfAp9jTI9bN278ZeCLVfWVrnnsj9uwuvpyzE6oqu8BU8B6Rjxm4xL+vX0sRJILuwtSJLkQeA/w1Om3Giu7gI3d9EbgoUXsy5w68YPWeT9jeNy6i4f3A89W1acHFo31cZuprp4cs7cluaibvgB4N/BtRjxmY3G3D0B3S9af8f+PhdiyuD2aG0l+jumzfZh+3MZfj2ttSb4ETDL9eNkjwCeAvwV2Aj8DvAjcUlVjd+F0htommR4+KOAA8KETY67jIsmvA/8M7AN+2DV/nOnx8bE9bqep61bG/5j9EtMXdJcxfQK/s6r+MMlPM8IxG5vwlyTNnXEZ9pEkzSHDX5IaZPhLUoMMf0lqkOEvSQ0y/CWpQYa/JDXo/wCyR1tTDJOpXgAAAABJRU5ErkJggg==\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "df_contracts[df_contracts.a_age < 30].a_age.hist(bins=25)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Two very important distributions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Normal\n", + "\n", + "Also known as Gaussian, is a bell-shaped distribution with mass around the mean and exponentially decaying on the sides. It is fully characterized by the mean (center of mass) and standard deviation (spread).\n", + "\n", + "https://en.wikipedia.org/wiki/Normal_distribution" + ] + }, + { + "cell_type": "code", + "execution_count": 48, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 48, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWAAAAFgCAYAAACFYaNMAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAWpElEQVR4nO3df5Dc9X3f8efb0hkMsoIVJHxIXE5MMRH4hvjmQh3T6TiGJmriBCcTXKWNq+mo1R8oNm4zDsKdTtPpqMNMGY8zLqTRkNRKYhurDh6UlIEYbNzpDDZgx81anF0roOAzFw6wXZmkkJN494/9nvzV6iQt0n73s3v7fMwwt/vZ7/fuvaO9F9/7fD8/IjORJPXf60oXIEmjygCWpEIMYEkqxACWpEIMYEkqZHXpAs7F1q1b84EHHihdhiSdSSzXONRXwC+88ELpEiTprA11AEvSMDOAJakQA1iSCjGAJakQA1iSCjGAJakQA1iSCjGAJakQA1iSCjGAJakQA1iSCjGAJakQA1iSChnq5SilQbK4uEir1Tr+fGpqirGxsYIVadAZwFKPtFotbr7zAGvHJzkyf5i7dsH09HTpsjTADGCph9aOT7Ju4srSZWhIGMBSA149dpTZ2dkT2uySUKdGAzgiDgM/AI4BRzNzJiLWAZ8GJoHDwHsz83vV8bcBO6rjP5CZDzZZn9SUlxbmuOP+l1k/uwhgl4SW1Y8r4J/OzPreQbuBhzPz9ojYXT2/NSKuArYBVwOXAg9FxFsy81gfapR6bs2GCbsjdFolhqHdCOyrHu8D3lNrvyczX8nMp4FDwLX9L0+S+qPpK+AE/iwiEvjdzNwLXJKZ8wCZOR8RG6pjNwJfqp07V7WdICJ2AjsBJiYmmqxdakznkDWwj3gUNR3A12Xms1XIfi4ivnGaY5fbtjlPamiH+F6AmZmZk16XhkF9yBrYRzyqGg3gzHy2+roQEZ+l3aXwXESMV1e/48BCdfgccFnt9E3As03WJ5XkkDU11gccERdGxBuXHgM/A3wdOABsrw7bDtxXPT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Zn5HeAO4BlgHvi/mflnZas6tVEP4DNOfV6pImIN8MfABzPzSOl6mhQR7wYWMvMrpWvps9XANPA7mfk24G+AFX2fIyLeRPuv2M3ApcCFEfFrZas6tVEP4JGc+hwRY7TD9xOZeW/pevrgOuAXI+Iw7W6md0XEH5UtqS/mgLnMXPoL5zO0A3kluwF4OjOfz8xF4F7gHYVrOqVRD+CRm/ocEUG7T3A2Mz9Sup5+yMzbMnNTZk7S/jf+fGYO7FVRr2TmXwPfjoil1cmvp4dLuw6oZ4C3R8QF1Wf9egb4xuNATUXut4JTn0u6Dngf0IqIr1VtH87M+8uVpAa9H/hEdYHxFPAvCtfTqMz8ckR8Bvgq7RE/f84AT0l2KrIkFTLqXRCSVIwBLEmFGMCSVIgBLEmFGMCSVIgBLEmFGMCSVMj/B/qjFlrdIbQIAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "s1 = np.random.normal(5, 1, 10000)\n", + "sns.displot(s1)" + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 49, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWAAAAD4CAYAAADSIzzWAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAMCElEQVR4nO3db2hd9R3H8c+3SWcTi2xWURaNV7lzbZkMtzDchFHbirnZ2B4JDreEgRSqi10djK1cEOHioyGTIANxGymTDXQ+mCPpprjHskQt1aaTg4u1md1qZP5ZUm3a3x7kz24al9y09+ZzkrxfUG567+k533N6z7snJwmNlJIAACtvg3sAAFivCDAAmBBgADAhwABgQoABwKR5OQtfccUVqVAoNGgUAFibhoeH30kpXXn+88sKcKFQ0NDQUP2mAoB1ICLe/KTnuQUBACYEGABMCDAAmBBgADAhwABgQoABwIQAA4AJAQYAEwIMACYEGABMCDAAmBBgADAhwABgQoABwIQAA4AJAQYAEwIMACYEGABMCDAAmCzr/4QD8qyvr09ZljVk3WNjY5Kktra2hqy/WCyqt7e3IetGfhFgrBlZlumVV0d0tvXyuq+7aeI9SdLJj+p/yjRNvFv3dWJ1IMBYU862Xq7JrV11X2/LsQFJaui6sf5wDxgATAgwAJgQYAAwIcAAYEKAAcCEAAOACQEGABMCDAAmBBgATAgwAJgQYAAwIcAAYEKAAcCEAAOACQEGABMCDAAmBBgATAgwAJgQYAAwIcAAYEKAAcCEAAOACQEGABMCDAAmBBgATAgwAJgQYAAwIcAAYEKAAcCEAAOACQEGABMCDAAmBBgATAgwAJgQYAAwIcAAYEKAAcCEAAOACQEGABMCDAAmBBgATAjwKtXX16e+vj73GEDdraf3drN7AFyYLMvcIwANsZ7e21wBA4AJAQYAEwIMACYEGABMCDAAmBBgADAhwABgQoABwIQAA4AJAQYAEwIMACYEGABMCDAAmBBgADAhwABgQoABwIQAA4AJAQYAEwIMACYEGABMCDAAmBBgADAhwABgQoABwIQAA4AJAQYAEwIMACYEGABMCDAAmBBgADAhwABgQoABwIQAA4AJAQYAEwIMACYEGABMCDAAmBBgADBZkQCPj4/r/vvv1/j4+Eps7qLNzptl2bzHWuavZV+rl8myTKVSSXv27NHw8LBKpZLuvvtu3XbbbXr22WdVKpV01113aceOHXO/du3apcOHD+vw4cPKsqyeuw7kwsTEhHbv3q0dO3boscceU2dn57xzoLu7W1mW6d5779XevXv1wgsvaOfOneru7tbevXvnzr/x8XHdc8896urqUpZl8869WrvUyH6tSID7+/t15MgRHTx4cCU2d9Fm561UKvMea5m/ln2tXqZSqWhyclKvv/66HnzwQU1OTmpsbEwpJT3yyCOanJzUyZMn5/35s2fPzn1cqVQufEeBnDp+/LimpqYkSU899ZROnz694PVKpaKjR49qZGREDz/8sM6dO6fjx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/RW1e9PiNjMiYiCpJslvWgeJQ9+LunHks6Z58iLGySdkvTrmdsyT0TEpe6hnFJKY5J+Jum4pLclvZdS+rN3qto5Ahyf8BzfCycpIjZL+r2kH6aU3nfP4xQR35T0r5TSsHuWHGmW9CVJv0gp3SzpP5LW9ddQIuIzmv4M+npJn5V0aUR81ztV7RwBPiHp2qrfX6NV9ClDo0TERk3H98mU0jPueXLgVknfiohRTd+m2hkRv/GOZHdC0omU0uxnR09rOsjr2W5Jf08pnUopnZH0jKSvmWeqmSPAf5X0uYi4PiI+pekb5n8wzJEbERGavq83klJ6xD1PHqSUfppSuialVND0e+SFlNKqubJphJTSSUlvRcTnZ57aJemocaQ8OC7plohonTmPdmkVfWGyeaU3mFKaiogfSPqTpr9i+auU0msrPUfO3Crpe5KORMQrM88dSCkN+EZCTvVKenLm4uUNSd83z2OVUnoxIp6W9JKmv5voZa2iH0nmR5EBwISfhAMAEwIMACYEGABMCDAAmBBgADAhwABgQoABwOS/2yHVGtk42qoAAAAASUVORK5CYII=\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "# for boxplots see https://en.wikipedia.org/wiki/Interquartile_range (or ask!)\n", + "sns.boxplot(x=s1)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Heavy-tailed\n", + "Distributions with a small but non-negligible amount of observations with high values. Several probability distributions follow this pattern: https://en.wikipedia.org/wiki/Heavy-tailed_distribution#Common_heavy-tailed_distributions.\n", + "\n", + "We pick the lognormal here: https://en.wikipedia.org/wiki/Log-normal_distribution" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 50, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWEAAAFgCAYAAABqo8hyAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlc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RcBngVcs9HENjO9XgD8BPr7I/nv8KvAdJ7XNy9iW0pnwDcDBqvqHqvoWcA+wsXFNZ1RVfw3800nNG4Ed3foO4JaB9nuqarKqHgMOAjckWQOsqqq/ren/Sj40sE8zVXWkqr7QrU8AjwBrWeDjq2kz94df1P0UC3xcAEnWAa8D3j/QvODHdQbzMralFMJrgScGtg91bQvNVVV1BKaDDLiyaz/d+NZ26ye3D40kLwFezvRZ44IfX/cn+4PAUWB3VS2KcQHvAn4dGHzwymIYF0y/UX4yyee7RyPAPI1tqK4T7tlZb4le4E43vqEed5LLgD8D3lpV42eYQlsw46uqZ4Hrk7wQ+FiSl56h+4IYV5IfB45W1eeTvHouu8zSNnTjGnBjVR1OciWwO8mXz9D3go5tKZ0JL5Zbop/q/uyhWx7t2k83vkPd+sntzSW5iOkA/uOq+mjXvGjGV1X/DDwAbGDhj+tG4CeSfJXpqbzXJvkjFv64AKiqw93yKPAxpqcv52VsSymEF8st0buAzd36ZuDegfZNSUaTXAOsB/Z2f0ZNJHlF90ntzw3s00xXy93AI1X1joGXFvT4kqzuzoBJcjHwQ8CXWeDjqqo7q2pdVb2E6f93/rKqfpYFPi6AJJcmWTmzDvwI8BDzNbbWn0rO5w/wY0x/Cv8V4Dda1zOHej8MHAH+lel32S3Ai4A9wKPd8oqB/r/Rje0AA5/KAmPdf1RfAd5Dd6dk47H9ANN/qv0d8GD382MLfXzA9wBf7Mb1EPCfu/YFPa6Txvhqvn11xIIfF9NXTH2p+9k/kw3zNTZvW5akhpbSdIQkDR1DWJIaMoQlqSFDWJIaMoQlqSFDWJIaMoQlqaH/D/51zou5Vl5DAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "s2 = np.random.lognormal(5, 1, 10000)\n", + "sns.displot(s2)" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 51, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWIAAAD4CAYAAADW1uzrAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAPHklEQVR4nO3dX2xUZ3rH8d/D2Oyy9a4KJhsRgzJZeaXVqqratbXask2FELSYoGyl3OxFY19UWikXDg1RmqzW1LY0UtRGIiHuVdRWsdM/e5OsSoiNCm1Xe1M1tbtJYW1iJnhQIXTJGrXExGb95+2Fzzl7PB47NnjmMTPfj2R5zjvnPO/7zMDPZ44PwkIIAgD42eK9AACodQQxADgjiAHAGUEMAM4IYgBwVreenXfu3Bmy2WyZlgIA1WlkZOQXIYQHVnp+XUGczWY1PDx876sCgBpiZldWe55LEwDgjCAGAGcEMQA4I4gBwBlBDADOCGIAcEYQA4AzghgAnBHEAOCMIAYAZwQxADgjiAHAGUEMAM4IYgBwRhADgDOCGACcEcQA4IwgBgBnBDEAOFvX/1m3Ufr6+pTP55eMXbt2TZLU1NS04nHNzc3q7Ows69oAoNJcgjifz+u9C2Oa/8KOZCzz6f9Jkv7nTuklZT69WZG1AUCluQSxJM1/YYemv3Y42d52cVCSloylxc8DQLXhGjEAOCOIAcAZQQwAzghiAHBGEAOAM4IYAJwRxADgjCAGAGcEMQA4I4gBwBlBDADOCGIAcEYQA4AzghgAnBHEAOCMIAYAZwQxADgjiAHAGUEMAM4IYgBwRhADgDOCGACcEcQA4IwgBgBnBDEAOCOIAcAZQQwAzghiAHBGEAOAM4IYAJwRxADgjCAGAGcEMQA4I4gBwBlBDADOCGIAcEYQA4AzghgAnBHEAOCMIAYAZwQxADirSBD39fWpr6+vElOtyWZbD4DaVleJSfL5fCWmWbPNth4AtY1LEwDgjCAGAGcEMQA4I4gBwBlBDADOCGIAcEYQA4AzghgAnBHEAOC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light" + }, + "output_type": "display_data" + } + ], + "source": [ + "sns.boxplot(x=s2)" + ] + }, + { + "cell_type": "code", + "execution_count": 52, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 52, + "metadata": {}, + "output_type": "execute_result" + }, + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAWAAAAFgCAYAAACFYaNMAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/YYfK9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAX7klEQVR4nO3df5Bd5X3f8fcXYWsxiEo4gq5ZuUC19gScAXt2qWMqT2LSWElcQzrBVaZxNR1adQaSmqZNBtw/OumMOmQm4yHTqdLRYGqlsU0Umx+K48HGskkgP2CFzLX5Od4iCzYIJEhV5FRSkPTtH3sk3b17JS2rPfc5d+/7NaO59z73nKvvaHY/Ovc5z4/ITCRJvXdO6QIkaVAZwJJUiAEsSYUYwJJUiAEsSYWcW7qAs7F27dp86KGHSpchSWcS3Rr7+gr49ddfL12CJM1bXwewJPUzA1iSCjGAJakQA1iSCjGAJakQA1iSCjGAJakQA1iSCqk1gCPihxHx/Yh4KiJ2VG0XRcTDEfGD6nFF2/F3RMRkRLwQER+vszZJKq0XV8A/nZnXZOZY9fp2YHtmjgLbq9dExJXAOuAqYC2wKSKW9KA+SSqiRBfEDcCW6vkW4Ma29nsz83Bm7gImgWt7X54k9UbdAZzANyPiyYjYULVdkpl7AKrHi6v2S4GX286dqtpmiIgNEbEjInbs27evxtIlqV51r4Z2XWa+EhEXAw9HxPOnObbbakGzNqzLzM3AZoCxsTE3tJPUt2oN4Mx8pXrcGxH3M92l8FpEDGfmnogYBvZWh08Bq9pOHwFeqbM+DaZDhw4xMTExo218fJyhoaFCFWlQ1RbAEXE+cE5mHqie/yzwX4BtwHrgzurxweqUbcCXIuJzwHuAUeCJuurT4JqYmOC2TQ+wfGQ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StcFEBH/vvr5fzoivhwR5Rd/6GAf8DxFxDAwnJk7I2IZ8CRw40JPm56PiAjg/Mz8UUS8A3gM+Exm/lXh0gCIiF8HxoALM/MTpes5LiJ+CIxlZulB+7NExBbg0cy8uxoh9K7M3F+4rBmqpQT+munJU7sL13Ip0z/3V2bmwYjYCnw9M79Qsq5OXgHPU2buycyd1fMDwHPApWWrmpbTflS9fEf1pxH/00bECPALwN2la+kXEXEh8FHg8wCZ+XdNC9/K9cD/Lh2+bc4FzouIc4F30cA5BQbwAoiIy4APAo8XLuWE6mv+U8Be4OHMbEptdwG/CRwrXEc3CXwzIp6sprw3xRXAPuB/Vl03d0fE+Wc6qYB1wJdLFwGQmX8N/A7wErAH+L+Z+c2yVc1mAJ+liLgA+CpwW2a+Wbqe4zLzaGZew/Rswmsj4gOFSyIiPgHszcwnS9dyCtdl5oeAnwNujYiPli6oci7wIeD3MvODwN8Ct5ctaaaqW+STwB+VrgUgIlYwvZDX5cB7gPMj4lfKVjWbAXwWqv7VrwJfzMz7StfTTfVV9RFg1kIgBVwHfLLqa70X+FhE/EHZkk7KzFeqx73A/UyvztcEU8BU27eYrzAdyE3yc8DOzHytdCGVnwF2Zea+zHwLuA/4SOGaZjGA56m60fV54LnM/FzpetpFxMqIWF49P4/pH8bnixYFZOYdmTmSmZcx/XX125nZiKuSiDi/uplK9fX+Z4GnT39Wb2Tmq8DLEfH+qul6FniJ1gXwyzSk+6HyEvDhiHhX9bt6PdP3aRqlUVOR+8x1wKeB71d9rQCfzcyvlyvphGFgS3VX+hxga2Y2ashXA10C3D/9u8q5wJcy86GyJc3wa8AXq6/6LwL/qnA9J0TEu5jeROHflq7luMx8PCK+AuwEjgDfpYFTkh2GJkmF2AUhSYUYwJJUiAEsSYUYwJJUiAEsSYUYwJJUiAEsSYX8f+fVXVuUDryBAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "# Why \"lognormal\"?\n", + "\n", + "sns.displot(np.log(s2))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Box plots\n", + "\n", + "" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Outliers, missing values\n", + "\n", + "An *outlier* is an observation far from the center of mass of the distribution. It might be an error or a genuine observation: this distinction requires domain knowledge. Outliers infuence the outcomes of several statistics and machine learning methods: it is important to decide how to deal with them.\n", + "\n", + "A *missing value* is an observation without a value. There can be many reasons for a missing value: the value might not exist (hence its absence is informative and it should be left empty) or might not be known (hence the value is existing but missing in the dataset and it should be marked as NA).\n", + "\n", + "*One way to think about the difference is with this Zen-like koan: An explicit missing value is the presence of an absence; an implicit missing value is the absence of a presence.*" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Summary statistics\n", + "A statistic is a function of a collection of observations, or otherwise stated a measure over a distribution. \n", + "\n", + "A statistic is said to be *robust* if not sensitive to outliers.\n", + "\n", + "* Not robust: min, max, mean, standard deviation.\n", + "* Robust: mode, median, other quartiles.\n", + "\n", + "A closer look at the mean:\n", + "\n", + "$\\bar{x} = \\frac{1}{n} \\sum_{i}x_i$\n", + "\n", + "And variance (the standard deviation is the square root of the variance):\n", + "\n", + "$Var(x) = \\frac{1}{n} \\sum_{i}(x_i - \\bar{x})^2$\n", + "\n", + "The mean, the median, etc. are measures of location (e.g., the typical value); the variance is a measure of dispersion." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "4.993993145847454\n", + "240.65275836549188\n" + ] + } + ], + "source": [ + "# Not robust: min, max, mean, mode, standard deviation\n", + "\n", + "print(np.mean(s1)) # should be 5\n", + "print(np.mean(s2))" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "4.993993145847454" + ] + }, + "execution_count": 57, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "np.mean(s1)" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "4.990826061241218\n", + "147.72833254812608\n" + ] + } + ], + "source": [ + "# Robust: median, other quartiles\n", + "\n", + "print(np.quantile(s1, 0.5)) # should coincide with mean and mode\n", + "print(np.quantile(s2, 0.5))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Questions\n", + "\n", + "* Calculate the min, max, mode and sd. *hint: explore the numpy documentation!*\n", + "* Calculate the 90% quantile values.\n", + "* Consider our normally distributed data in s1. Add an outlier (e.g., value 100). What happens to the mean and mode? Write down your answer and then check." + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
annual_salarya_agelength
count7870.0000009303.0000009645.000000
mean5.91692114.2666885.005694
std6.9852142.9027701.462343
min0.1666671.0000000.083333
25%3.00000012.0000004.000000
50%4.00000014.0000005.000000
75%6.00000016.0000006.000000
max180.00000050.00000015.000000
\n", + "
" + ], + "text/plain": [ + " annual_salary a_age length\n", + "count 7870.000000 9303.000000 9645.000000\n", + "mean 5.916921 14.266688 5.005694\n", + "std 6.985214 2.902770 1.462343\n", + "min 0.166667 1.000000 0.083333\n", + "25% 3.000000 12.000000 4.000000\n", + "50% 4.000000 14.000000 5.000000\n", + "75% 6.000000 16.000000 6.000000\n", + "max 180.000000 50.000000 15.000000" + ] + }, + "execution_count": 32, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# Let's explore our dataset\n", + "df_contracts[[\"annual_salary\",\"a_age\",\"length\"]].describe()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Relating two variables\n", + "\n", + "### Covariance\n", + "\n", + "Measure of association, specifically of the joint linear variability of two variables:\n", + "\n", + "\n", + "\n", + "Its normalized version is called the (Pearson's) correlation coefficient:\n", + "\n", + "\n", + "\n", + "Correlation is helpful to spot possible relations, but is of tricky interpretation and is not exhaustive:\n", + "\n", + "\n", + "\n", + "See: https://en.wikipedia.org/wiki/Covariance and https://en.wikipedia.org/wiki/Pearson_correlation_coefficient.\n", + "\n", + "*Note: correlation is not causation!*" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
annual_salarya_agelength
annual_salary1.0000000.205404-0.361611
a_age0.2054041.000000-0.430062
length-0.361611-0.4300621.000000
\n", + "
" + ], + "text/plain": [ + " annual_salary a_age length\n", + "annual_salary 1.000000 0.205404 -0.361611\n", + "a_age 0.205404 1.000000 -0.430062\n", + "length -0.361611 -0.430062 1.000000" + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_contracts[[\"annual_salary\",\"a_age\",\"length\"]].corr()" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "" + ] + }, + "execution_count": 34, + "metadata": {}, + "output_type": "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SSlloYlDqIESkJwNtLoidhiwiPxCRb6T7dZRKhSYGpbJjAaDrU1RO0sSgVBJE5Jsi8nq47v/14WN14f0efhPeX+GvIlIY/tmx4ce+Et4zYG141f0K4NzwYqxzw80fKSL/IyKbROSKLP2KSmliUGqoROQTQAOh8u0LgGNE5MTwjxuA240xjcA+4Kzw8XuBS40xHwYCECoBTqiY2qPGmAXGmEfDj50FfDLc/nXhmllKHXKaGJQauk+EP94kVMpiFqGEAKGCeG+Fv14J1IV3ESs1xvxv+PjDB2n/v4wxXmPMbkJF6qrTGLtSQ5aX7QCUGkEE+A9jzK8tB0P7ZnhjDgWAQuzLvB/I4Db071Nlhd4xKDV0/w1cFN4rAxGZKCIJN6wxxuwFukXkuPCh2K07uwkVfVMq52hiUGqIwjusPQy8IiJrCFVHPdjJ/WLgThF5hdAdRGf4+IuEBptjB5+VyglaXVWpDBKREmNMT/jrbwO1xpgrsxyWUgekfZhKZdanReQ7hP7WtgJfym44Sh2c3jEopZSy0DEGpZRSFpoYlFJKWWhiUEopZaGJQSmllIUmBqWUUhb/H8hjVCoTroWfAAAAAElFTkSuQmCC\n", + "text/plain": [ + "
" + ] + }, + "metadata": { + "needs_background": "light" + }, + "output_type": "display_data" + } + ], + "source": [ + "sns.scatterplot(x=df_contracts.length,y=df_contracts.annual_salary)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Other ways to measure correlation exist. For example, if you are interested into how one variable will increase (or decrease) as another variable increases (or decreases), the *Spearmanā€™s or Kendallā€™s rank correlation coefficients* might work well." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Questions\n", + "\n", + "* Try to explore the correlation of other variables in the dataset.\n", + "* Can you think of a possible motivation for the trend we see: older apprentices with a shorter contract getting on average a higher annual salary?" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Sampling and uncertainty\n", + "\n", + "Often, we work with samples and we want the sample to be representative of the population it is taken from, in order to draw conclusions that generalise from the sample to the full population.\n", + "\n", + "Sampling is *tricky*. Samples have *variance* (variation between samples from the same population) and *bias* (systematic variation from the population)." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Further reading\n", + "\n", + "* For a complementary introduction to statistics and data analysis, see https://www.humanitiesdataanalysis.org/statistics-essentials/notebook.html.\n", + "* Related to statistics and data analysis is the realm of probability theory, which allows us to formally model and calculate the likelihood of events. For an introduction, see https://www.humanitiesdataanalysis.org/intro-probability/notebook.html." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "---" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Part 2: working with texts\n", + "\n", + "Let's get some basics (or a refresher) of working with texts in Python. Texts are sequences of discrete symbols (words or, more generically, tokens).\n", + "\n", + "Key challenge: representing text for further processing. Two mainstream approaches:\n", + "* *Bag of words*: a text is a collection of tokens occurring with a certain frequence and assumed independently from each other within the text. The mapping from texts to features is determinsitic and straighforward, each text is represented as a vector of the size of the vocabulary.\n", + "* *Embeddings*: a method is used (typically, neural networks), to learn a mapping from each token to a (usually small) vector representing it. A text can be represented in turn as an aggregation of these embeddings." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Import the dataset\n", + "Let us import the Elon Musk's tweets dataset in memory.\n", + "\n", + "" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "root_folder = \"../data/musk_tweets\"\n", + "df_elon = pd.read_csv(codecs.open(os.path.join(root_folder,\"elonmusk_tweets.csv\"), encoding=\"utf8\"), sep=\",\")\n", + "df_elon['text'] = df_elon['text'].str[1:]" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idcreated_attext
08496368680522752002017-04-05 14:56:29'And so the robots spared humanity ... https:/...
18489887305850961922017-04-03 20:01:01\"@ForIn2020 @waltmossberg @mims @defcon_5 Exac...
28489430724234977282017-04-03 16:59:35'@waltmossberg @mims @defcon_5 Et tu, Walt?'
38489357050572800012017-04-03 16:30:19'Stormy weather in Shortville ...'
48484160495736586242017-04-02 06:05:23\"@DaveLeeBBC @verge Coal is dying due to nat g...
\n", + "
" + ], + "text/plain": [ + " id created_at \\\n", + "0 849636868052275200 2017-04-05 14:56:29 \n", + "1 848988730585096192 2017-04-03 20:01:01 \n", + "2 848943072423497728 2017-04-03 16:59:35 \n", + "3 848935705057280001 2017-04-03 16:30:19 \n", + "4 848416049573658624 2017-04-02 06:05:23 \n", + "\n", + " text \n", + "0 'And so the robots spared humanity ... https:/... \n", + "1 \"@ForIn2020 @waltmossberg @mims @defcon_5 Exac... \n", + "2 '@waltmossberg @mims @defcon_5 Et tu, Walt?' \n", + "3 'Stormy weather in Shortville ...' \n", + "4 \"@DaveLeeBBC @verge Coal is dying due to nat g... " + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_elon.head(5)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(2819, 3)" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_elon.shape" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Natural Language Processing in Python" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "# import some of the most popular libraries for NLP in Python\n", + "import spacy\n", + "import nltk\n", + "import string\n", + "import sklearn" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "[nltk_data] Downloading package punkt to\n", + "[nltk_data] /Users/giovannicolavizza/nltk_data...\n", + "[nltk_data] Unzipping tokenizers/punkt.zip.\n" + ] + }, + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 6, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "nltk.download('punkt')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "A typical NLP pipeline might look like the following:\n", + " \n", + "\n", + "\n", + "### Tokenization: splitting a text into constituent tokens" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [], + "source": [ + "from nltk.tokenize import TweetTokenizer, word_tokenize\n", + "tknzr = TweetTokenizer(preserve_case=True, reduce_len=False, strip_handles=False)" + ] + }, + { + "cell_type": "code", + "execution_count": 8, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\"@ForIn2020 @waltmossberg @mims @defcon_5 Exactly. Tesla is absurdly overvalued if based on the past, but that's irr\\xe2\\x80\\xa6 https://t.co/qQcTqkzgMl\"\n" + ] + } + ], + "source": [ + "example_tweet = df_elon.text[1]\n", + "print(example_tweet)" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['\"', '@ForIn2020', '@waltmossberg', '@mims', '@defcon_5', 'Exactly', '.', 'Tesla', 'is', 'absurdly', 'overvalued', 'if', 'based', 'on', 'the', 'past', ',', 'but', \"that's\", 'irr', '\\\\', 'xe2', '\\\\', 'x80', '\\\\', 'xa6', 'https://t.co/qQcTqkzgMl', '\"']\n", + "['``', '@', 'ForIn2020', '@', 'waltmossberg', '@', 'mims', '@', 'defcon_5', 'Exactly', '.', 'Tesla', 'is', 'absurdly', 'overvalued', 'if', 'based', 'on', 'the', 'past', ',', 'but', 'that', \"'s\", 'irr\\\\xe2\\\\x80\\\\xa6', 'https', ':', '//t.co/qQcTqkzgMl', \"''\"]\n" + ] + } + ], + "source": [ + "tkz1 = tknzr.tokenize(example_tweet)\n", + "print(tkz1)\n", + "tkz2 = word_tokenize(example_tweet)\n", + "print(tkz2)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Question: can you spot what the Twitter tokenizer is doing instead of a standard one?" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'!\"#$%&\\'()*+,-./:;<=>?@[\\\\]^_`{|}~'" + ] + }, + "execution_count": 10, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "string.punctuation" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [], + "source": [ + "# some more pre-processing\n", + "\n", + "def filter(tweet):\n", + " \n", + " # remove punctuation and short words and urls\n", + " tweet = [t for t in tweet if t not in string.punctuation and len(t) > 3 and not t.startswith(\"http\")]\n", + " return tweet\n", + "\n", + "def tokenize_and_string(tweet):\n", + " \n", + " tkz = tknzr.tokenize(tweet)\n", + " \n", + " tkz = filter(tkz)\n", + " \n", + " return \" \".join(tkz)" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "['\"', '@ForIn2020', '@waltmossberg', '@mims', '@defcon_5', 'Exactly', '.', 'Tesla', 'is', 'absurdly', 'overvalued', 'if', 'based', 'on', 'the', 'past', ',', 'but', \"that's\", 'irr', '\\\\', 'xe2', '\\\\', 'x80', '\\\\', 'xa6', 'https://t.co/qQcTqkzgMl', '\"']\n", + "['@ForIn2020', '@waltmossberg', '@mims', '@defcon_5', 'Exactly', 'Tesla', 'absurdly', 'overvalued', 'based', 'past', \"that's\"]\n" + ] + } + ], + "source": [ + "print(tkz1)\n", + "print(filter(tkz1))" + ] + }, + { + "cell_type": "code", + "execution_count": 13, + "metadata": {}, + "outputs": [], + "source": [ + "df_elon[\"clean_text\"] = df_elon[\"text\"].apply(tokenize_and_string)" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + " \n", + "
idcreated_attextclean_text
08496368680522752002017-04-05 14:56:29'And so the robots spared humanity ... https:/...robots spared humanity
18489887305850961922017-04-03 20:01:01\"@ForIn2020 @waltmossberg @mims @defcon_5 Exac...@ForIn2020 @waltmossberg @mims @defcon_5 Exact...
28489430724234977282017-04-03 16:59:35'@waltmossberg @mims @defcon_5 Et tu, Walt?'@waltmossberg @mims @defcon_5 Walt
38489357050572800012017-04-03 16:30:19'Stormy weather in Shortville ...'Stormy weather Shortville
48484160495736586242017-04-02 06:05:23\"@DaveLeeBBC @verge Coal is dying due to nat g...@DaveLeeBBC @verge Coal dying fracking It's ba...
\n", + "
" + ], + "text/plain": [ + " id created_at \\\n", + "0 849636868052275200 2017-04-05 14:56:29 \n", + "1 848988730585096192 2017-04-03 20:01:01 \n", + "2 848943072423497728 2017-04-03 16:59:35 \n", + "3 848935705057280001 2017-04-03 16:30:19 \n", + "4 848416049573658624 2017-04-02 06:05:23 \n", + "\n", + " text \\\n", + "0 'And so the robots spared humanity ... https:/... \n", + "1 \"@ForIn2020 @waltmossberg @mims @defcon_5 Exac... \n", + "2 '@waltmossberg @mims @defcon_5 Et tu, Walt?' \n", + "3 'Stormy weather in Shortville ...' \n", + "4 \"@DaveLeeBBC @verge Coal is dying due to nat g... \n", + "\n", + " clean_text \n", + "0 robots spared humanity \n", + "1 @ForIn2020 @waltmossberg @mims @defcon_5 Exact... \n", + "2 @waltmossberg @mims @defcon_5 Walt \n", + "3 Stormy weather Shortville \n", + "4 @DaveLeeBBC @verge Coal dying fracking It's ba... " + ] + }, + "execution_count": 14, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df_elon.head(5)" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [], + "source": [ + "# save cleaned up version\n", + "\n", + "df_elon.to_csv(os.path.join(root_folder,\"df_elon.csv\"), index=False)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Building a dictionary" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(2819, 7864)" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from sklearn.feature_extraction.text import CountVectorizer\n", + "count_vect = CountVectorizer(lowercase=False, tokenizer=tknzr.tokenize)\n", + "X_count = count_vect.fit_transform(df_elon.clean_text)\n", + "X_count.shape" + ] + }, + { + "cell_type": "code", + "execution_count": 17, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "6617" + ] + }, + "execution_count": 17, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "word_list = count_vect.get_feature_names_out() \n", + "count_list = X_count.toarray().sum(axis=0)\n", + "dictionary = dict(zip(word_list,count_list))\n", + "count_vect.vocabulary_.get(\"robots\")" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3" + ] + }, + "execution_count": 18, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "X_count[:,count_vect.vocabulary_.get(\"robots\")].toarray().sum()" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3" + ] + }, + "execution_count": 19, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "dictionary[\"robots\"]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Questions\n", + "\n", + "* Find the tokens most used by Elon.\n", + "* Find the twitter users most referred to by Elon (hint: use the @ handler to spot them)." + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[('Tesla', 322),\n", + " ('Model', 236),\n", + " ('that', 223),\n", + " ('will', 218),\n", + " ('with', 177),\n", + " ('@SpaceX', 169),\n", + " ('from', 163),\n", + " ('this', 159),\n", + " ('@TeslaMotors', 149),\n", + " ('launch', 124)]" + ] + }, + "execution_count": 20, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "dictionary_list = sorted(dictionary.items(), key=lambda x:x[1], reverse=True)\n", + "[d for d in dictionary_list][:10]" + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[('@SpaceX', 169),\n", + " ('@TeslaMotors', 149),\n", + " ('@elonmusk', 85),\n", + " ('@NASA', 48),\n", + " ('@Space_Station', 19),\n", + " ('@FredericLambert', 17),\n", + " ('@ID_AA_Carmack', 15),\n", + " ('@WIRED', 14),\n", + " ('@vicentes', 14),\n", + " ('@BadAstronomer', 11)]" + ] + }, + "execution_count": 22, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "[d for d in dictionary_list if d[0].startswith('@')][:10]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Representing tweets as vectors\n", + "\n", + "Texts are of variable length and need to be represented numerically in some way. Most typically, we represent them as *equally-sized vectors*.\n", + "\n", + "Actually, this is what we have already done! Let's take a closer look at `X_count` above.." + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "id 849636868052275200\n", + "created_at 2017-04-05 14:56:29\n", + "text 'And so the robots spared humanity ... https:/...\n", + "clean_text robots spared humanity\n", + "Name: 0, dtype: object" + ] + }, + "execution_count": 23, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# This is the first Tweet of the data frame\n", + "\n", + "df_elon.loc[0]" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [], + "source": [ + "# let's get the vector representation for this Tweet\n", + "\n", + "vector_representation = X_count[0,:]" + ] + }, + { + "cell_type": "code", + "execution_count": 25, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3" + ] + }, + "execution_count": 25, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# there are 3 positions not to zero, as we would expect: the vector contains 1 in the columns related to the 3 words that make up the Tweet. \n", + "# It would contain a number higher than 1 if a given word were occurring multiple times.\n", + "\n", + "np.sum(vector_representation)" + ] + }, + { + "cell_type": "code", + "execution_count": 26, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "1\n", + "1\n", + "1\n" + ] + } + ], + "source": [ + "# Let's check that indeed the vector contains 1s for the right words\n", + "# Remember, the vector has shape (1 x size of the vocabulary)\n", + "\n", + "print(vector_representation[0,count_vect.vocabulary_.get(\"robots\")])\n", + "print(vector_representation[0,count_vect.vocabulary_.get(\"spared\")])\n", + "print(vector_representation[0,count_vect.vocabulary_.get(\"humanity\")])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Term Frequency - Inverse Document Frequency\n", + "We can use boolean counts (1/0) and raw counts (as we did before) to represent a Tweet over the space of the vocabulary, but there exist improvements on this basic idea. For example, the TF-IDF weighting scheme:\n", + "\n", + "$tfidf(t, d, D) = tf(t, d) \\cdot idf(t, D)$\n", + "\n", + "$tf(t, d) = f_{t,d}$\n", + "\n", + "$idf(t, D) = log \\Big( \\frac{|D|}{|{d \\in D: t \\in d}|} \\Big)$" + ] + }, + { + "cell_type": "code", + "execution_count": 27, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(2819, 7864)" + ] + }, + "execution_count": 27, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from sklearn.feature_extraction.text import TfidfVectorizer\n", + "count_vect = TfidfVectorizer(lowercase=False, tokenizer=tknzr.tokenize)\n", + "X_count_tfidf = count_vect.fit_transform(df_elon.clean_text)\n", + "X_count_tfidf.shape" + ] + }, + { + "cell_type": "code", + "execution_count": 28, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "1.7226760995112569" + ] + }, + "execution_count": 28, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "X_count_tfidf[0,:].sum()" + ] + }, + { + "cell_type": "code", + "execution_count": 29, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "3" + ] + }, + "execution_count": 29, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "X_count[0,:].sum()" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Sparse vectors (mention)\n", + "How is Python representing these vectors in memory? Most of their cells are set to zero. \n", + "\n", + "We call any vector or matrix whose cells are mostly to zero *sparse*.\n", + "There are efficient ways to store them in memory." + ] + }, + { + "cell_type": "code", + "execution_count": 30, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "<1x7864 sparse matrix of type ''\n", + "\twith 3 stored elements in Compressed Sparse Row format>" + ] + }, + "execution_count": 30, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "X_count_tfidf[0,:]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Spacy pipelines\n", + "\n", + "Useful to construct sequences of pre-processing steps: https://spacy.io/usage/processing-pipelines." + ] + }, + { + "cell_type": "code", + "execution_count": 31, + "metadata": {}, + "outputs": [], + "source": [ + "# Load a pre-trained pipeline (Web Small): https://spacy.io/usage/models\n", + "\n", + "#!python -m spacy download en_core_web_sm\n", + "nlp = spacy.load('en_core_web_sm')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "*.. the modelā€™s meta.json tells spaCy to use the language \"en\" and the pipeline [\"tagger\", \"parser\", \"ner\"]. spaCy will then initialize spacy.lang.en.English, and create each pipeline component and add it to the processing pipeline. Itā€™ll then load in the modelā€™s data from its data directory and return the modified Language class for you to use as the nlp object.*\n", + "\n", + "Let's create a simple pipeline that does **lemmatization**, **part of speech tagging** and **named entity recognition** using spaCy models.\n", + "\n", + "*If you don't know what these NLP tasks are, please ask!*" + ] + }, + { + "cell_type": "code", + "execution_count": 32, + "metadata": {}, + "outputs": [], + "source": [ + "tweet_pos = list()\n", + "tweet_ner = list()\n", + "tweet_lemmas = list()\n", + "\n", + "for tweet in df_elon.text.values:\n", + " spacy_tweet = nlp(tweet)\n", + " \n", + " local_tweet_pos = list()\n", + " local_tweet_ner = list()\n", + " local_tweet_lemmas = list()\n", + " \n", + " for sentence in list(spacy_tweet.sents):\n", + " # --- lemmatization, remove punctuation and stop wors\n", + " local_tweet_lemmas.extend([token.lemma_ for token in sentence if not token.is_punct | token.is_stop])\n", + " local_tweet_pos.extend([token.pos_ for token in sentence if not token.is_punct | token.is_stop])\n", + " for ent in spacy_tweet.ents:\n", + " local_tweet_ner.append(ent)\n", + "\n", + " tweet_pos.append(local_tweet_pos)\n", + " tweet_ner.append(local_tweet_ner)\n", + " tweet_lemmas.append(local_tweet_lemmas)" + ] + }, + { + "cell_type": "code", + "execution_count": 33, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['robot', 'spare', 'humanity', 'https://t.co/v7JUJQWfCv']" + ] + }, + "execution_count": 33, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "tweet_lemmas[0]" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['NOUN', 'VERB', 'NOUN', 'NOUN']" + ] + }, + "execution_count": 34, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "tweet_pos[0]" + ] + }, + { + "cell_type": "code", + "execution_count": 35, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[https://t.co/v7JUJQWfCv]" + ] + }, + "execution_count": 35, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "tweet_ner[0]" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[Shortville]" + ] + }, + "execution_count": 36, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# but it actually works!\n", + "\n", + "tweet_ner[3]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "*Note: we are really just scratching the surface of spaCy, but it is worth knowing it's there.*" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "### Searching tweets\n", + "\n", + "Once we have represented Tweets as vectors, we can easily find similar ones using basic operations such as filtering." + ] + }, + { + "cell_type": "code", + "execution_count": 37, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "robots spared humanity\n" + ] + } + ], + "source": [ + "target = 0\n", + "print(df_elon.clean_text[target])" + ] + }, + { + "cell_type": "code", + "execution_count": 38, + "metadata": {}, + "outputs": [], + "source": [ + "condition = X_count_tfidf[target,:] > 0" + ] + }, + { + "cell_type": "code", + "execution_count": 39, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " (0, 5198)\tTrue\n", + " (0, 6617)\tTrue\n", + " (0, 6949)\tTrue\n" + ] + } + ], + "source": [ + "print(condition)" + ] + }, + { + "cell_type": "code", + "execution_count": 40, + "metadata": {}, + "outputs": [], + "source": [ + "X_filtered = X_count_tfidf[:,np.ravel(condition.toarray())]" + ] + }, + { + "cell_type": "code", + "execution_count": 41, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "<2819x3 sparse matrix of type ''\n", + "\twith 16 stored elements in Compressed Sparse Row format>" + ] + }, + "execution_count": 41, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "X_filtered" + ] + }, + { + "cell_type": "code", + "execution_count": 45, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + " (0, 0)\t0.495283407359234\n", + " (0, 2)\t0.6406029997190412\n", + " (0, 1)\t0.5867896924329815\n", + " (217, 0)\t0.2972381925908634\n", + " (271, 0)\t0.3284547085372313\n", + " (464, 0)\t0.2273880239746895\n", + " (473, 0)\t0.5667220639589731\n", + " (734, 1)\t0.3846355279044392\n", + " (940, 0)\t0.27312597149485407\n", + " (1004, 0)\t0.28161575586607157\n", + " (1550, 1)\t0.33303254164524276\n", + " (1862, 0)\t0.3196675199194523\n", + " (2493, 0)\t0.2685018991334563\n", + " (2559, 0)\t0.31145247014227906\n", + " (2565, 0)\t0.2645117238497897\n", + " (2661, 0)\t0.2729016388865858\n" + ] + } + ], + "source": [ + "print(X_filtered)" + ] + }, + { + "cell_type": "code", + "execution_count": 46, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "(array([ 0, 217, 271, 464, 473, 940, 1004, 1862, 2493, 2559, 2565,\n", + " 2661, 0, 734, 1550, 0], dtype=int32),\n", + " array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 2], dtype=int32),\n", + " array([0.49528341, 0.29723819, 0.32845471, 0.22738802, 0.56672206,\n", + " 0.27312597, 0.28161576, 0.31966752, 0.2685019 , 0.31145247,\n", + " 0.26451172, 0.27290164, 0.58678969, 0.38463553, 0.33303254,\n", + " 0.640603 ]))" + ] + }, + "execution_count": 46, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from scipy import sparse\n", + "\n", + "sparse.find(X_filtered)" + ] + }, + { + "cell_type": "code", + "execution_count": 50, + "metadata": {}, + "outputs": [], + "source": [ + "tweet_indices = list(sparse.find(X_filtered)[0])" + ] + }, + { + "cell_type": "code", + "execution_count": 51, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "TARGET: robots spared humanity\n", + "1)@JustBe74 important make humanity proud this case particular duty owed American taxpayer\n", + "2)@pud Faith restored humanity French toast money\n", + "3)humanity have exciting inspiring future cannot confined Earth forever @love_to_dream #APSpaceChat\n", + "4)@ShireeshAgrawal like humanity\n", + "5)Creating neural lace thing that really matters humanity achieve symbiosis with machines\n", + "6)@tzepr Certainly agree that first foremost triumph humanity cheering good spirit\n", + "7)@ReesAndersen @FLIxrisk believe that critical ensure good future humanity\n", + "8)@NASA #Mars hard x99s worth risks extend humanity x99s frontier beyond Earth Learn about neighbor planet\n", + "9)Astronomer Royal Martin Rees soon will robots take over world @Telegraph\n", + "10)@thelogicbox @IanrossWins Mars critical long-term survival humanity life Earth know\n", + "11)humanity wishes become multi-planet species then must figure move millions people Mars\n", + "12)Sure feels weird find myself defending robots\n", + "13)Neil Armstrong hero humanity spirit will carry stars\n" + ] + } + ], + "source": [ + "print(\"TARGET: \" + df_elon.clean_text[target])\n", + "\n", + "for n, tweet_index in enumerate(list(set(tweet_indices))):\n", + " if tweet_index != target:\n", + " print(str(n) +\")\"+ df_elon.clean_text[tweet_index])" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "#### Questions\n", + "\n", + "* Can you rank the matched tweets using their tf-idf weights, so to put higher weighted tweets first?\n", + "* Which limitations do you think a bag of words representation has?\n", + "* Can you spot any limitations of this approach based on similarity measures over bag of words representations?\n", + "\n", + "#### Exercises\n", + "\n", + "* Find the highest IDF tokens in the corpus and discuss your results.\n", + "* Find the most frequent named entities and discuss your results.\n", + "* Are there trends in the topics of tweets during the day? And over time?\n", + "* Perform a **sentiment analysis** of the corpus, see here https://spacy.io/universe/project/spacy-textblob" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": {}, + "outputs": [], + "source": [ + "#!pip install spacytextblob\n", + "#!python -m spacy download en_core_web_sm\n", + "#!python -m textblob.download_corpora" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "-0.125" + ] + }, + "execution_count": 56, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "import spacy\n", + "from spacytextblob.spacytextblob import SpacyTextBlob\n", + "\n", + "nlp = spacy.load('en_core_web_sm')\n", + "nlp.add_pipe('spacytextblob')\n", + "text = 'I had a really horrible day. It was the worst day ever! But every now and then I have a really good day that makes me happy.'\n", + "doc = nlp(text)\n", + "doc._.blob.polarity " + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "---" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "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.10.4" + } + }, + "nbformat": 4, + "nbformat_minor": 2 +}