{
 "cells": [
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Angle"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>category</th>\n",
       "      <th>angle</th>\n",
       "      <th>count</th>\n",
       "      <th>pct</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>white-collar</td>\n",
       "      <td>high angle</td>\n",
       "      <td>2</td>\n",
       "      <td>9.090909</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>white-collar</td>\n",
       "      <td>eye-level</td>\n",
       "      <td>13</td>\n",
       "      <td>59.090909</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>white-collar</td>\n",
       "      <td>low angle</td>\n",
       "      <td>7</td>\n",
       "      <td>31.818182</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>blue-collar</td>\n",
       "      <td>high angle</td>\n",
       "      <td>5</td>\n",
       "      <td>27.777778</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>blue-collar</td>\n",
       "      <td>eye-level</td>\n",
       "      <td>8</td>\n",
       "      <td>44.444444</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>blue-collar</td>\n",
       "      <td>low angle</td>\n",
       "      <td>5</td>\n",
       "      <td>27.777778</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>casual</td>\n",
       "      <td>high angle</td>\n",
       "      <td>6</td>\n",
       "      <td>60.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>casual</td>\n",
       "      <td>eye-level</td>\n",
       "      <td>3</td>\n",
       "      <td>30.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>casual</td>\n",
       "      <td>low angle</td>\n",
       "      <td>1</td>\n",
       "      <td>10.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       category       angle  count        pct\n",
       "0  white-collar  high angle      2   9.090909\n",
       "1  white-collar   eye-level     13  59.090909\n",
       "2  white-collar   low angle      7  31.818182\n",
       "3   blue-collar  high angle      5  27.777778\n",
       "4   blue-collar   eye-level      8  44.444444\n",
       "5   blue-collar   low angle      5  27.777778\n",
       "6        casual  high angle      6  60.000000\n",
       "7        casual   eye-level      3  30.000000\n",
       "8        casual   low angle      1  10.000000"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "import seaborn as sns\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "df = pd.DataFrame({\n",
    "    'category': [\n",
    "        'white-collar',\n",
    "        'white-collar',\n",
    "        'white-collar',\n",
    "        'blue-collar',\n",
    "        'blue-collar',\n",
    "        'blue-collar',\n",
    "        'casual',\n",
    "        'casual',\n",
    "        'casual',\n",
    "    ],\n",
    "    'angle': [\n",
    "        'high angle',\n",
    "        'eye-level',\n",
    "        'low angle',\n",
    "        'high angle',\n",
    "        'eye-level',\n",
    "        'low angle',\n",
    "        'high angle',\n",
    "        'eye-level',\n",
    "        'low angle',\n",
    "    ],\n",
    "    'count': [\n",
    "        2,\n",
    "        13,\n",
    "        7,\n",
    "        5,\n",
    "        8,\n",
    "        5,\n",
    "        6,\n",
    "        3,\n",
    "        1,\n",
    "    ],\n",
    "    'pct': [\n",
    "            2/22*100,\n",
    "            13/22*100,\n",
    "            7/22*100,\n",
    "            5/18*100,\n",
    "            8/18*100,\n",
    "            5/18*100,\n",
    "            6/10*100,\n",
    "            3/10*100,\n",
    "            1/10*100,\n",
    "        ]\n",
    "})\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 33332 characters]",
      "text/plain": [
       "<Figure size 725.625x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "g = sns.catplot(\n",
    "    data=df, kind=\"bar\",\n",
    "    x=\"category\", y=\"pct\", hue=\"angle\",\n",
    "    palette=\"Blues\", alpha=.6, height=6\n",
    ")\n",
    "g.despine(left=True)\n",
    "sns.set_style(\"ticks\",{'axes.grid' : True})\n",
    "g.set_axis_labels(\"\", \"percent of total images in category (%)\")\n",
    "g.legend.set_title(\"\")\n",
    "g.savefig('plots/angle.png')"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Contact"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>category</th>\n",
       "      <th>contact</th>\n",
       "      <th>count</th>\n",
       "      <th>pct</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>white-collar</td>\n",
       "      <td>demand structure</td>\n",
       "      <td>14</td>\n",
       "      <td>63.636364</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>white-collar</td>\n",
       "      <td>offer structure</td>\n",
       "      <td>8</td>\n",
       "      <td>36.363636</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>blue-collar</td>\n",
       "      <td>demand structure</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>blue-collar</td>\n",
       "      <td>offer structure</td>\n",
       "      <td>18</td>\n",
       "      <td>100.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>casual</td>\n",
       "      <td>demand structure</td>\n",
       "      <td>1</td>\n",
       "      <td>10.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>casual</td>\n",
       "      <td>offer structure</td>\n",
       "      <td>9</td>\n",
       "      <td>90.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       category           contact  count         pct\n",
       "0  white-collar  demand structure     14   63.636364\n",
       "1  white-collar   offer structure      8   36.363636\n",
       "2   blue-collar  demand structure      0    0.000000\n",
       "3   blue-collar   offer structure     18  100.000000\n",
       "4        casual  demand structure      1   10.000000\n",
       "5        casual   offer structure      9   90.000000"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame({\n",
    "    'category': [\n",
    "        'white-collar',\n",
    "        'white-collar',\n",
    "        'blue-collar',\n",
    "        'blue-collar',\n",
    "        'casual',\n",
    "        'casual',\n",
    "    ],\n",
    "    'contact': [\n",
    "        'demand structure',\n",
    "        'offer structure',\n",
    "        'demand structure',\n",
    "        'offer structure',\n",
    "        'demand structure',\n",
    "        'offer structure',\n",
    "    ],\n",
    "    'count': [\n",
    "        14,\n",
    "        8,\n",
    "        0,\n",
    "        18,\n",
    "        1,\n",
    "        9,\n",
    "    ],\n",
    "    'pct': [\n",
    "            14/22*100,\n",
    "            8/22*100,\n",
    "            0/18*100,\n",
    "            18/18*100,\n",
    "            1/10*100,\n",
    "            9/10*100,\n",
    "        ]\n",
    "})\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 31336 characters]",
      "text/plain": [
       "<Figure size 773.75x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "g = sns.catplot(\n",
    "    data=df, kind=\"bar\",\n",
    "    x=\"category\", y=\"pct\", hue=\"contact\",\n",
    "    palette=\"Blues\", alpha=.6, height=6\n",
    ")\n",
    "g.despine(left=True)\n",
    "sns.set_style(\"ticks\",{'axes.grid' : True})\n",
    "g.set_axis_labels(\"\", \"percent of total images in category (%)\")\n",
    "g.legend.set_title(\"\")\n",
    "g.savefig('plots/contact.png')"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Point-of-view"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>category</th>\n",
       "      <th>poit_of_view</th>\n",
       "      <th>count</th>\n",
       "      <th>pct</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>white-collar</td>\n",
       "      <td>frontal</td>\n",
       "      <td>16</td>\n",
       "      <td>72.727273</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>white-collar</td>\n",
       "      <td>oblique</td>\n",
       "      <td>2</td>\n",
       "      <td>9.090909</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>blue-collar</td>\n",
       "      <td>frontal</td>\n",
       "      <td>4</td>\n",
       "      <td>22.222222</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>blue-collar</td>\n",
       "      <td>oblique</td>\n",
       "      <td>14</td>\n",
       "      <td>77.777778</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>casual</td>\n",
       "      <td>frontal</td>\n",
       "      <td>3</td>\n",
       "      <td>30.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>casual</td>\n",
       "      <td>oblique</td>\n",
       "      <td>7</td>\n",
       "      <td>70.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       category poit_of_view  count        pct\n",
       "0  white-collar      frontal     16  72.727273\n",
       "1  white-collar      oblique      2   9.090909\n",
       "2   blue-collar      frontal      4  22.222222\n",
       "3   blue-collar      oblique     14  77.777778\n",
       "4        casual      frontal      3  30.000000\n",
       "5        casual      oblique      7  70.000000"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame({\n",
    "    'category': [\n",
    "        'white-collar',\n",
    "        'white-collar',\n",
    "        'blue-collar',\n",
    "        'blue-collar',\n",
    "        'casual',\n",
    "        'casual',\n",
    "    ],\n",
    "    'poit_of_view': [\n",
    "        'frontal',\n",
    "        'oblique',\n",
    "        'frontal',\n",
    "        'oblique',\n",
    "        'frontal',\n",
    "        'oblique',\n",
    "    ],\n",
    "    'count': [\n",
    "        16,\n",
    "        2,\n",
    "        4,\n",
    "        14,\n",
    "        3,\n",
    "        7,\n",
    "    ],\n",
    "    'pct': [\n",
    "            16/22*100,\n",
    "            2/22*100,\n",
    "            4/18*100,\n",
    "            14/18*100,\n",
    "            3/10*100,\n",
    "            7/10*100,\n",
    "        ]\n",
    "})\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 31436 characters]",
      "text/plain": [
       "<Figure size 704.847x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "g = sns.catplot(\n",
    "    data=df, kind=\"bar\",\n",
    "    x=\"category\", y=\"pct\", hue=\"poit_of_view\",\n",
    "    palette=\"Blues\", alpha=.6, height=6\n",
    ")\n",
    "g.despine(left=True)\n",
    "sns.set_style(\"ticks\",{'axes.grid' : True})\n",
    "g.set_axis_labels(\"\", \"percent of total images in category (%)\")\n",
    "g.legend.set_title(\"\")\n",
    "g.savefig('plots/point-of-view.png')"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Distance"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>category</th>\n",
       "      <th>distance</th>\n",
       "      <th>count</th>\n",
       "      <th>pct</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>white-collar</td>\n",
       "      <td>long shot</td>\n",
       "      <td>6</td>\n",
       "      <td>27.272727</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>white-collar</td>\n",
       "      <td>medium shot</td>\n",
       "      <td>16</td>\n",
       "      <td>72.727273</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>white-collar</td>\n",
       "      <td>close-up</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>blue-collar</td>\n",
       "      <td>long shot</td>\n",
       "      <td>15</td>\n",
       "      <td>83.333333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>blue-collar</td>\n",
       "      <td>medium shot</td>\n",
       "      <td>3</td>\n",
       "      <td>16.666667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>blue-collar</td>\n",
       "      <td>close-up</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>casual</td>\n",
       "      <td>long shot</td>\n",
       "      <td>3</td>\n",
       "      <td>30.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>casual</td>\n",
       "      <td>medium shot</td>\n",
       "      <td>5</td>\n",
       "      <td>50.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>casual</td>\n",
       "      <td>close-up</td>\n",
       "      <td>2</td>\n",
       "      <td>20.000000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       category     distance  count        pct\n",
       "0  white-collar    long shot      6  27.272727\n",
       "1  white-collar  medium shot     16  72.727273\n",
       "2  white-collar     close-up      0   0.000000\n",
       "3   blue-collar    long shot     15  83.333333\n",
       "4   blue-collar  medium shot      3  16.666667\n",
       "5   blue-collar     close-up      0   0.000000\n",
       "6        casual    long shot      3  30.000000\n",
       "7        casual  medium shot      5  50.000000\n",
       "8        casual     close-up      2  20.000000"
      ]
     },
     "execution_count": 62,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "\n",
    "df = pd.DataFrame({\n",
    "    'category': [\n",
    "        'white-collar',\n",
    "        'white-collar',\n",
    "        'white-collar',\n",
    "        'blue-collar',\n",
    "        'blue-collar',\n",
    "        'blue-collar',\n",
    "        'casual',\n",
    "        'casual',\n",
    "        'casual',\n",
    "    ],\n",
    "    'distance': [\n",
    "        'long shot',\n",
    "        'medium shot',\n",
    "        'close-up',\n",
    "        'long shot',\n",
    "        'medium shot',\n",
    "        'close-up',\n",
    "        'long shot',\n",
    "        'medium shot',\n",
    "        'close-up',\n",
    "    ],\n",
    "    'count': [\n",
    "        6,\n",
    "        16,\n",
    "        0,\n",
    "        15,\n",
    "        3,\n",
    "        0,\n",
    "        3,\n",
    "        5,\n",
    "        2,\n",
    "    ],\n",
    "    'pct': [\n",
    "            6/22*100,\n",
    "            16/22*100,\n",
    "            0/22*100,\n",
    "            15/18*100,\n",
    "            3/18*100,\n",
    "            0/18*100,\n",
    "            3/10*100,\n",
    "            5/10*100,\n",
    "            2/10*100,\n",
    "        ]\n",
    "})\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 63,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 34664 characters]",
      "text/plain": [
       "<Figure size 742.25x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "g = sns.catplot(\n",
    "    data=df, kind=\"bar\",\n",
    "    x=\"category\", y=\"pct\", hue=\"distance\",\n",
    "    palette=\"Blues\", alpha=.6, height=6\n",
    ")\n",
    "g.despine(left=True)\n",
    "sns.set_style(\"ticks\",{'axes.grid' : True})\n",
    "g.set_axis_labels(\"\", \"percent of total images in category (%)\")\n",
    "g.legend.set_title(\"\")\n",
    "g.savefig('plots/distance.png')"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Pie Charts about Subtypes of Processes"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>category</th>\n",
       "      <th>count</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>non-transactional\\naction</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>speech</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>unidirectional\\ntransactional\\naction</td>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>conversion</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>non-transactional\\nreaction</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>bidirectional\\ntransactional\\naction</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>unidirectional\\ntransactional\\nreaction</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>bidirectional\\ntransactional\\nreaction</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                  category  count\n",
       "0                non-transactional\\naction     26\n",
       "1                                   speech      2\n",
       "2    unidirectional\\ntransactional\\naction     23\n",
       "3                               conversion      2\n",
       "4              non-transactional\\nreaction      6\n",
       "5     bidirectional\\ntransactional\\naction      2\n",
       "6  unidirectional\\ntransactional\\nreaction      5\n",
       "7   bidirectional\\ntransactional\\nreaction      2"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame({\n",
    "    'category': [\n",
    "        'non-transactional\\naction',\n",
    "        'speech',\n",
    "        'unidirectional\\ntransactional\\naction',\n",
    "        'conversion',\n",
    "        'non-transactional\\nreaction',\n",
    "        'bidirectional\\ntransactional\\naction',\n",
    "        'unidirectional\\ntransactional\\nreaction',\n",
    "        'bidirectional\\ntransactional\\nreaction',\n",
    "        \n",
    "        \n",
    "    ],\n",
    "    'count': [\n",
    "        26,\n",
    "        2,\n",
    "        23,\n",
    "        2,\n",
    "        6,\n",
    "        2,\n",
    "        5,\n",
    "        2,\n",
    "    ]\n",
    "})\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 60640 characters]",
      "text/plain": [
       "<Figure size 600x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#define Seaborn color palette to use\n",
    "colors = sns.color_palette('Blues')[0:len(df)]\n",
    "\n",
    "#create pie chart\n",
    "fig = plt.figure(figsize=(6,6))\n",
    "plt.pie(df['count'], labels=df['category'], colors = colors, autopct='%.0f%%', startangle=0)\n",
    "plt.tight_layout()\n",
    "plt.savefig('plots/narrative_processes.png')\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>category</th>\n",
       "      <th>count</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>classification\\novert\\ntaxonomy</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>analytical\\ntemporal</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>analytical\\nexhaustive</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>analytical\\ndistributed</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>analytical\\ndisarranged</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>analytical\\ntopological</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>analytical\\nexploded</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>analytical\\ninclusive</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>symbolic\\nsuggestive</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>symbolic\\nattributive</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                          category  count\n",
       "0  classification\\novert\\ntaxonomy      4\n",
       "1             analytical\\ntemporal      2\n",
       "2           analytical\\nexhaustive     18\n",
       "3          analytical\\ndistributed      1\n",
       "4          analytical\\ndisarranged      6\n",
       "5          analytical\\ntopological      2\n",
       "6             analytical\\nexploded      4\n",
       "7            analytical\\ninclusive      1\n",
       "8             symbolic\\nsuggestive     13\n",
       "9            symbolic\\nattributive      5"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pd.DataFrame({\n",
    "    'category': [\n",
    "        'classification\\novert\\ntaxonomy',\n",
    "        'analytical\\ntemporal',\n",
    "        'analytical\\nexhaustive',\n",
    "        'analytical\\ndistributed',\n",
    "        'analytical\\ndisarranged',\n",
    "        'analytical\\ntopological',\n",
    "        'analytical\\nexploded',\n",
    "        'analytical\\ninclusive',\n",
    "        'symbolic\\nsuggestive',\n",
    "        'symbolic\\nattributive',\n",
    "    ],\n",
    "    'count': [\n",
    "        4,\n",
    "        2,\n",
    "        18,\n",
    "        1,\n",
    "        6,\n",
    "        2,\n",
    "        4,\n",
    "        1,\n",
    "        13,\n",
    "        5,\n",
    "    ]\n",
    "})\n",
    "\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "[encoded data, 71060 characters]",
      "text/plain": [
       "<Figure size 600x600 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#define Seaborn color palette to use\n",
    "colors = sns.color_palette('Blues')[0:len(df)]\n",
    "\n",
    "#create pie chart\n",
    "fig = plt.figure(figsize=(6,6))\n",
    "plt.pie(df['count'], labels=df['category'], colors = colors, autopct='%.0f%%', startangle=0)\n",
    "plt.tight_layout()\n",
    "plt.savefig('plots/conceptual_processes.png')\n",
    "plt.show()"
   ]
  },
  {
   "attachments": {},
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Plot of the Keywords"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "venv",
   "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.8.16"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
