Created
October 5, 2018 00:39
-
-
Save Katba-Caroline/393649670fa6524ab6f3de176320aca6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "cells": [ | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "# Tone Analysis of Supreme Court Nominee Judge Kavanaugh and Dr. Christine Blasey-Ford\n", | |
| "\n", | |
| "The September 27th testimony before the Senate Judicial Committee and questioning by Supreme Court Nominee Judge Brett Kavanaugh and one of his accusers, Dr. Christine Blasey-Ford stirred many emotions. The testimonies themselves and the reactions to them have gripped the media and the nation for almost an entire week. \n", | |
| "\n", | |
| "I wanted to examine the testimonies themselves and analyze each person's testimony in an effort to understand the underlying tones and emotions that they felt. \n", | |
| "\n", | |
| "For this analysis, I programmed the Tone Analyzer using the IBM Watson Tone Analyzer API (you can read more about the science behind it here) and I used text data, retrieved from here. It is worth noting that I consulted with a linguistics expert who encouraged the effort yet noted that some information might be lost. This loss of information is mainly due to the fact that text data does not hold intonational information, which could contribute significantly to sentiment analysis. \n", | |
| "\n", | |
| "With that in mind, here are the results of the analysis:" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 330, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "\n", | |
| "import numpy as np\n", | |
| "import pandas as pd\n" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 331, | |
| "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>person</th>\n", | |
| " <th>statement</th>\n", | |
| " </tr>\n", | |
| " </thead>\n", | |
| " <tbody>\n", | |
| " <tr>\n", | |
| " <th>0</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>This morning we continue our hearing on the n...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>Both Dr. Ford and Judge Kavanaugh have been t...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>As part of judge Kavanaugh’s nomination to th...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>3</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>Democratic staff was invited to participate a...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>4</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>The testimony we will hear today concerns all...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>5</th>\n", | |
| " <td>FEINSTEIN</td>\n", | |
| " <td>Thank you very much, Mr. Chairman. I’ll make ...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>6</th>\n", | |
| " <td>FEINSTEIN</td>\n", | |
| " <td>And I think as I make my remarks, perhaps you...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>7</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>By the way, I was going to introduce her. But...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>8</th>\n", | |
| " <td>FEINSTEIN</td>\n", | |
| " <td>Thank you. I have to say, when I saw your C.V...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>9</th>\n", | |
| " <td>FEINSTEIN</td>\n", | |
| " <td>Twenty-seven years ago, I was walking through...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>10</th>\n", | |
| " <td>FEINSTEIN</td>\n", | |
| " <td>In fact, on Tuesday, the majority went ahead ...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>11</th>\n", | |
| " <td>FEINSTEIN</td>\n", | |
| " <td>Ultimately, members and ladies and gentlemen,...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>12</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>I’m sorry you brought up about the unsubstant...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>13</th>\n", | |
| " <td>FORD</td>\n", | |
| " <td>(OFF-MIKE)</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>14</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>Thank you very much. Please be seated. And be...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>15</th>\n", | |
| " <td>FORD</td>\n", | |
| " <td>Thank you, Senator Grassley. I think after I ...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>16</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>OK. Can you pull the microphone just a little...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>17</th>\n", | |
| " <td>(UNKNOWN)</td>\n", | |
| " <td>That’s what I’m trying, Senator. No.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>18</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>OK, well, then — then…</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>19</th>\n", | |
| " <td>FORD</td>\n", | |
| " <td>I’ll lean forward.</td>\n", | |
| " </tr>\n", | |
| " </tbody>\n", | |
| "</table>\n", | |
| "</div>" | |
| ], | |
| "text/plain": [ | |
| " person statement\n", | |
| "0 GRASSLEY This morning we continue our hearing on the n...\n", | |
| "1 GRASSLEY Both Dr. Ford and Judge Kavanaugh have been t...\n", | |
| "2 GRASSLEY As part of judge Kavanaugh’s nomination to th...\n", | |
| "3 GRASSLEY Democratic staff was invited to participate a...\n", | |
| "4 GRASSLEY The testimony we will hear today concerns all...\n", | |
| "5 FEINSTEIN Thank you very much, Mr. Chairman. I’ll make ...\n", | |
| "6 FEINSTEIN And I think as I make my remarks, perhaps you...\n", | |
| "7 GRASSLEY By the way, I was going to introduce her. But...\n", | |
| "8 FEINSTEIN Thank you. I have to say, when I saw your C.V...\n", | |
| "9 FEINSTEIN Twenty-seven years ago, I was walking through...\n", | |
| "10 FEINSTEIN In fact, on Tuesday, the majority went ahead ...\n", | |
| "11 FEINSTEIN Ultimately, members and ladies and gentlemen,...\n", | |
| "12 GRASSLEY I’m sorry you brought up about the unsubstant...\n", | |
| "13 FORD (OFF-MIKE)\n", | |
| "14 GRASSLEY Thank you very much. Please be seated. And be...\n", | |
| "15 FORD Thank you, Senator Grassley. I think after I ...\n", | |
| "16 GRASSLEY OK. Can you pull the microphone just a little...\n", | |
| "17 (UNKNOWN) That’s what I’m trying, Senator. No.\n", | |
| "18 GRASSLEY OK, well, then — then…\n", | |
| "19 FORD I’ll lean forward." | |
| ] | |
| }, | |
| "execution_count": 331, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "data = pd.read_csv('hearing.txt', \n", | |
| " sep = \":\", \n", | |
| " header=None, \n", | |
| " names= ['person', 'statement'])\n", | |
| "\n", | |
| "data.head(n=20)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 332, | |
| "metadata": { | |
| "scrolled": true | |
| }, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "2114" | |
| ] | |
| }, | |
| "execution_count": 332, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "len(data)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 333, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "(2114, 2)" | |
| ] | |
| }, | |
| "execution_count": 333, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "data.shape\n" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 334, | |
| "metadata": { | |
| "scrolled": true | |
| }, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "array(['GRASSLEY', 'FEINSTEIN', 'FORD', '(UNKNOWN)', 'MITCHELL',\n", | |
| " '(CROSSTALK)', 'LEAHY', 'HARRIS',\n", | |
| " '(CORRECTED COPY – CORRECTS “BY” to “MY”)', '(LAUGHTER)', 'DURBIN',\n", | |
| " '(RECESS)', 'WHITEHOUSE', 'KLOBUCHAR', 'DURBIN?', 'BROMWICH',\n", | |
| " 'GRAHAM', 'COONS', 'BLUMENTHAL', 'HIRONO', 'BOOKER',\n", | |
| " '(CORRECTED COPY – CORRECTS SPELLING)',\n", | |
| " '(CORRECTED COPY – CORRECTS SPEAKER IDENTIFICATION)', 'KENNEDY',\n", | |
| " 'KAVANAUGH', 'CORNYN', 'HATCH (?)', 'HATCH', 'MORE KAVANAUGH',\n", | |
| " 'LEE', 'SASSE', 'GRAHAM?', 'CRAPO', 'TILLIS', 'CRUZ', 'FLAKE',\n", | |
| " 'Hearing adjourned.', 'END'], dtype=object)" | |
| ] | |
| }, | |
| "execution_count": 334, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "data.person.unique()" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 335, | |
| "metadata": { | |
| "scrolled": true | |
| }, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "(2060, 2)" | |
| ] | |
| }, | |
| "execution_count": 335, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "# Drop rows in which any of the columns have a missing value\n", | |
| " #dropna(how='all'): drops rows with NaN in ALL the columns\n", | |
| " #dropna(subset=['col1', 'col2'], how= 'any/all') drops rows where values are missing from specified columns\n", | |
| " # More Info here: [`youtube link`] https://www.youtube.com/watch?v=fCMrO_VzeL8&t=14s\n", | |
| " #More Documentation [`here`] https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.dropna.html\n", | |
| "#the default on inplace = false\n", | |
| "\n", | |
| "data.dropna(how='any', inplace=True)\n", | |
| "data.shape\n", | |
| "\n", | |
| "\n" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 336, | |
| "metadata": { | |
| "scrolled": true | |
| }, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "array(['GRASSLEY', 'FEINSTEIN', 'FORD', '(UNKNOWN)', 'MITCHELL', 'LEAHY',\n", | |
| " 'HARRIS', 'DURBIN', 'WHITEHOUSE', 'KLOBUCHAR', 'DURBIN?',\n", | |
| " 'BROMWICH', 'GRAHAM', 'COONS', 'BLUMENTHAL', 'HIRONO', 'BOOKER',\n", | |
| " 'KENNEDY', 'KAVANAUGH', 'CORNYN', 'HATCH (?)', 'HATCH',\n", | |
| " 'MORE KAVANAUGH', 'LEE', 'SASSE', 'GRAHAM?', 'CRAPO', 'TILLIS',\n", | |
| " 'CRUZ', 'FLAKE'], dtype=object)" | |
| ] | |
| }, | |
| "execution_count": 336, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "data.person.unique()" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 337, | |
| "metadata": { | |
| "scrolled": false | |
| }, | |
| "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>person</th>\n", | |
| " <th>statement</th>\n", | |
| " </tr>\n", | |
| " </thead>\n", | |
| " <tbody>\n", | |
| " <tr>\n", | |
| " <th>0</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>This morning we continue our hearing on the n...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>Both Dr. Ford and Judge Kavanaugh have been t...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>As part of judge Kavanaugh’s nomination to th...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>3</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>Democratic staff was invited to participate a...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>4</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>The testimony we will hear today concerns all...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>5</th>\n", | |
| " <td>FEINSTEIN</td>\n", | |
| " <td>Thank you very much, Mr. Chairman. I’ll make ...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>6</th>\n", | |
| " <td>FEINSTEIN</td>\n", | |
| " <td>And I think as I make my remarks, perhaps you...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>7</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>By the way, I was going to introduce her. But...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>8</th>\n", | |
| " <td>FEINSTEIN</td>\n", | |
| " <td>Thank you. I have to say, when I saw your C.V...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>9</th>\n", | |
| " <td>FEINSTEIN</td>\n", | |
| " <td>Twenty-seven years ago, I was walking through...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>10</th>\n", | |
| " <td>FEINSTEIN</td>\n", | |
| " <td>In fact, on Tuesday, the majority went ahead ...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>11</th>\n", | |
| " <td>FEINSTEIN</td>\n", | |
| " <td>Ultimately, members and ladies and gentlemen,...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>12</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>I’m sorry you brought up about the unsubstant...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>13</th>\n", | |
| " <td>FORD</td>\n", | |
| " <td>(OFF-MIKE)</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>14</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>Thank you very much. Please be seated. And be...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>15</th>\n", | |
| " <td>FORD</td>\n", | |
| " <td>Thank you, Senator Grassley. I think after I ...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>16</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>OK. Can you pull the microphone just a little...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>17</th>\n", | |
| " <td>(UNKNOWN)</td>\n", | |
| " <td>That’s what I’m trying, Senator. No.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>18</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>OK, well, then — then…</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>19</th>\n", | |
| " <td>FORD</td>\n", | |
| " <td>I’ll lean forward.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>20</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>Thank you. Thank you.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>21</th>\n", | |
| " <td>FORD</td>\n", | |
| " <td>Is this good?</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>22</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>Yeah.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>23</th>\n", | |
| " <td>FORD</td>\n", | |
| " <td>OK. Thank you, Chairman Grassley and Ranking ...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>24</th>\n", | |
| " <td>FORD</td>\n", | |
| " <td>During my time at this school, girls at Holto...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>25</th>\n", | |
| " <td>FORD</td>\n", | |
| " <td>Both Brett and Mark were drunkenly laughing d...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>26</th>\n", | |
| " <td>FORD</td>\n", | |
| " <td>I do not recall each person I spoke to about ...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>27</th>\n", | |
| " <td>FORD</td>\n", | |
| " <td>During August 2018, the press reported that M...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>28</th>\n", | |
| " <td>(UNKNOWN)</td>\n", | |
| " <td>A Coke or something?</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>29</th>\n", | |
| " <td>FORD</td>\n", | |
| " <td>That sounds good. That would be great. Thanks.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>...</th>\n", | |
| " <td>...</td>\n", | |
| " <td>...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2082</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Of course, but the point I’ve been emphasizin...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2083</th>\n", | |
| " <td>HARRIS</td>\n", | |
| " <td>I only have a few seconds left and I’ll just ...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2084</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>I did not. I plan to…</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2085</th>\n", | |
| " <td>HARRIS</td>\n", | |
| " <td>Thank you, I have nothing else…</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2086</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>… I plan to…</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2087</th>\n", | |
| " <td>HARRIS</td>\n", | |
| " <td>… Thank you.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2088</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>… I plan to. But I did not because I was prep...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2089</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>Our last five minutes will be, Senator Flake,...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2090</th>\n", | |
| " <td>FLAKE</td>\n", | |
| " <td>Yes.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2091</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>And Senator Kennedy, four minutes.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2092</th>\n", | |
| " <td>FLAKE</td>\n", | |
| " <td>Thank you, Mr. Chairman. When Dr. Ford came f...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2093</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>Thank you, Senator Flake. Now, Senator Kennedy.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2094</th>\n", | |
| " <td>KENNEDY</td>\n", | |
| " <td>I’m — I’m sorry, judge, for what you and your...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2095</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>I do.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2096</th>\n", | |
| " <td>KENNEDY</td>\n", | |
| " <td>I’m going to give you a last opportunity, rig...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2097</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>They are not as to me. I have not questioned ...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2098</th>\n", | |
| " <td>KENNEDY</td>\n", | |
| " <td>Are Ms. Ramirez’s allegations about you true?</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2099</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Those are not. She — no — no — none of the wi...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2100</th>\n", | |
| " <td>KENNEDY</td>\n", | |
| " <td>Are Ms. Swetnick’s allegations, made by Mr. A...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2101</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Those are not true. Never met her, don’t know...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2102</th>\n", | |
| " <td>KENNEDY</td>\n", | |
| " <td>None of these allegations are true?</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2103</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Correct.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2104</th>\n", | |
| " <td>KENNEDY</td>\n", | |
| " <td>No doubt in your mind?</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2105</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Zero, I’m 100 percent certain.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2106</th>\n", | |
| " <td>KENNEDY</td>\n", | |
| " <td>Not even a scintilla?</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2107</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Not a scintilla; 100 percent certain, senator.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2108</th>\n", | |
| " <td>KENNEDY</td>\n", | |
| " <td>You swear to God?</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2109</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>I swear to God.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2110</th>\n", | |
| " <td>KENNEDY</td>\n", | |
| " <td>That’s all I have, judge.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2111</th>\n", | |
| " <td>GRASSLEY</td>\n", | |
| " <td>Judge Kavanaugh, thank you very much.</td>\n", | |
| " </tr>\n", | |
| " </tbody>\n", | |
| "</table>\n", | |
| "<p>2060 rows × 2 columns</p>\n", | |
| "</div>" | |
| ], | |
| "text/plain": [ | |
| " person statement\n", | |
| "0 GRASSLEY This morning we continue our hearing on the n...\n", | |
| "1 GRASSLEY Both Dr. Ford and Judge Kavanaugh have been t...\n", | |
| "2 GRASSLEY As part of judge Kavanaugh’s nomination to th...\n", | |
| "3 GRASSLEY Democratic staff was invited to participate a...\n", | |
| "4 GRASSLEY The testimony we will hear today concerns all...\n", | |
| "5 FEINSTEIN Thank you very much, Mr. Chairman. I’ll make ...\n", | |
| "6 FEINSTEIN And I think as I make my remarks, perhaps you...\n", | |
| "7 GRASSLEY By the way, I was going to introduce her. But...\n", | |
| "8 FEINSTEIN Thank you. I have to say, when I saw your C.V...\n", | |
| "9 FEINSTEIN Twenty-seven years ago, I was walking through...\n", | |
| "10 FEINSTEIN In fact, on Tuesday, the majority went ahead ...\n", | |
| "11 FEINSTEIN Ultimately, members and ladies and gentlemen,...\n", | |
| "12 GRASSLEY I’m sorry you brought up about the unsubstant...\n", | |
| "13 FORD (OFF-MIKE)\n", | |
| "14 GRASSLEY Thank you very much. Please be seated. And be...\n", | |
| "15 FORD Thank you, Senator Grassley. I think after I ...\n", | |
| "16 GRASSLEY OK. Can you pull the microphone just a little...\n", | |
| "17 (UNKNOWN) That’s what I’m trying, Senator. No.\n", | |
| "18 GRASSLEY OK, well, then — then…\n", | |
| "19 FORD I’ll lean forward.\n", | |
| "20 GRASSLEY Thank you. Thank you.\n", | |
| "21 FORD Is this good?\n", | |
| "22 GRASSLEY Yeah.\n", | |
| "23 FORD OK. Thank you, Chairman Grassley and Ranking ...\n", | |
| "24 FORD During my time at this school, girls at Holto...\n", | |
| "25 FORD Both Brett and Mark were drunkenly laughing d...\n", | |
| "26 FORD I do not recall each person I spoke to about ...\n", | |
| "27 FORD During August 2018, the press reported that M...\n", | |
| "28 (UNKNOWN) A Coke or something?\n", | |
| "29 FORD That sounds good. That would be great. Thanks.\n", | |
| "... ... ...\n", | |
| "2082 KAVANAUGH Of course, but the point I’ve been emphasizin...\n", | |
| "2083 HARRIS I only have a few seconds left and I’ll just ...\n", | |
| "2084 KAVANAUGH I did not. I plan to…\n", | |
| "2085 HARRIS Thank you, I have nothing else…\n", | |
| "2086 KAVANAUGH … I plan to…\n", | |
| "2087 HARRIS … Thank you.\n", | |
| "2088 KAVANAUGH … I plan to. But I did not because I was prep...\n", | |
| "2089 GRASSLEY Our last five minutes will be, Senator Flake,...\n", | |
| "2090 FLAKE Yes.\n", | |
| "2091 GRASSLEY And Senator Kennedy, four minutes.\n", | |
| "2092 FLAKE Thank you, Mr. Chairman. When Dr. Ford came f...\n", | |
| "2093 GRASSLEY Thank you, Senator Flake. Now, Senator Kennedy.\n", | |
| "2094 KENNEDY I’m — I’m sorry, judge, for what you and your...\n", | |
| "2095 KAVANAUGH I do.\n", | |
| "2096 KENNEDY I’m going to give you a last opportunity, rig...\n", | |
| "2097 KAVANAUGH They are not as to me. I have not questioned ...\n", | |
| "2098 KENNEDY Are Ms. Ramirez’s allegations about you true?\n", | |
| "2099 KAVANAUGH Those are not. She — no — no — none of the wi...\n", | |
| "2100 KENNEDY Are Ms. Swetnick’s allegations, made by Mr. A...\n", | |
| "2101 KAVANAUGH Those are not true. Never met her, don’t know...\n", | |
| "2102 KENNEDY None of these allegations are true?\n", | |
| "2103 KAVANAUGH Correct.\n", | |
| "2104 KENNEDY No doubt in your mind?\n", | |
| "2105 KAVANAUGH Zero, I’m 100 percent certain.\n", | |
| "2106 KENNEDY Not even a scintilla?\n", | |
| "2107 KAVANAUGH Not a scintilla; 100 percent certain, senator.\n", | |
| "2108 KENNEDY You swear to God?\n", | |
| "2109 KAVANAUGH I swear to God.\n", | |
| "2110 KENNEDY That’s all I have, judge.\n", | |
| "2111 GRASSLEY Judge Kavanaugh, thank you very much.\n", | |
| "\n", | |
| "[2060 rows x 2 columns]" | |
| ] | |
| }, | |
| "execution_count": 337, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "# droping (Unkowns)\n", | |
| "data[data.person != '(UNKOWN)']" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 338, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "array(['GRASSLEY', 'FEINSTEIN', 'FORD', '(UNKNOWN)', 'MITCHELL', 'LEAHY',\n", | |
| " 'HARRIS', 'DURBIN', 'WHITEHOUSE', 'KLOBUCHAR', 'DURBIN?',\n", | |
| " 'BROMWICH', 'GRAHAM', 'COONS', 'BLUMENTHAL', 'HIRONO', 'BOOKER',\n", | |
| " 'KENNEDY', 'KAVANAUGH', 'CORNYN', 'HATCH (?)', 'HATCH',\n", | |
| " 'MORE KAVANAUGH', 'LEE', 'SASSE', 'GRAHAM?', 'CRAPO', 'TILLIS',\n", | |
| " 'CRUZ', 'FLAKE'], dtype=object)" | |
| ] | |
| }, | |
| "execution_count": 338, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "data.person.unique()" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 339, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "KAVANAUGH 465\n", | |
| "MITCHELL 405\n", | |
| "FORD 368\n", | |
| "GRASSLEY 212\n", | |
| "WHITEHOUSE 77\n", | |
| "KLOBUCHAR 71\n", | |
| "FEINSTEIN 56\n", | |
| "LEAHY 54\n", | |
| "DURBIN 51\n", | |
| "(UNKNOWN) 36\n", | |
| "BLUMENTHAL 35\n", | |
| "BOOKER 34\n", | |
| "HIRONO 27\n", | |
| "COONS 25\n", | |
| "CORNYN 25\n", | |
| "GRAHAM 24\n", | |
| "HARRIS 19\n", | |
| "KENNEDY 16\n", | |
| "BROMWICH 15\n", | |
| "HATCH 12\n", | |
| "CRAPO 9\n", | |
| "CRUZ 5\n", | |
| "SASSE 5\n", | |
| "HATCH (?) 4\n", | |
| "LEE 4\n", | |
| "FLAKE 2\n", | |
| "TILLIS 1\n", | |
| "MORE KAVANAUGH 1\n", | |
| "DURBIN? 1\n", | |
| "GRAHAM? 1\n", | |
| "Name: person, dtype: int64" | |
| ] | |
| }, | |
| "execution_count": 339, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "data['person'].value_counts()" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 340, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "#Remove extra Punctuation (end = rstip, beginning =lstrip) \n", | |
| "# to assign them to proper speaker.\n", | |
| "data['person'] = data['person'].str.rstrip('?') \n", | |
| "data['person'] = data['person'].str.rstrip(' (?)') \n", | |
| "data['person'] = data['person'].str.lstrip(' (')\n", | |
| "data['person'] = data['person'].str.lstrip('MORE ') \n", | |
| "\n", | |
| "#^This one removes 'MORE Kavanaugh'" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 341, | |
| "metadata": { | |
| "scrolled": true | |
| }, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "KAVANAUGH 466\n", | |
| "ITCHELL 405\n", | |
| "FORD 368\n", | |
| "GRASSLEY 212\n", | |
| "WHITEHOUSE 77\n", | |
| "KLOBUCHAR 71\n", | |
| "FEINSTEIN 56\n", | |
| "LEAHY 54\n", | |
| "DURBIN 52\n", | |
| "UNKNOWN 36\n", | |
| "BLUMENTHAL 35\n", | |
| "BOOKER 34\n", | |
| "HIRONO 27\n", | |
| "CORNYN 25\n", | |
| "COONS 25\n", | |
| "GRAHAM 25\n", | |
| "HARRIS 19\n", | |
| "HATCH 16\n", | |
| "KENNEDY 16\n", | |
| "BROMWICH 15\n", | |
| "CRAPO 9\n", | |
| "CRUZ 5\n", | |
| "SASSE 5\n", | |
| "LEE 4\n", | |
| "FLAKE 2\n", | |
| "TILLIS 1\n", | |
| "Name: person, dtype: int64" | |
| ] | |
| }, | |
| "execution_count": 341, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "data['person'].value_counts()" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 344, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/html": [ | |
| "\n", | |
| " <div class=\"bk-root\">\n", | |
| " <a href=\"https://bokeh.pydata.org\" target=\"_blank\" class=\"bk-logo bk-logo-small bk-logo-notebook\"></a>\n", | |
| " <span id=\"88934619-d5f3-4b75-8b96-5c33a3527456\">Loading BokehJS ...</span>\n", | |
| " </div>" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/javascript": [ | |
| "\n", | |
| "(function(root) {\n", | |
| " function now() {\n", | |
| " return new Date();\n", | |
| " }\n", | |
| "\n", | |
| " var force = true;\n", | |
| "\n", | |
| " if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n", | |
| " root._bokeh_onload_callbacks = [];\n", | |
| " root._bokeh_is_loading = undefined;\n", | |
| " }\n", | |
| "\n", | |
| " var JS_MIME_TYPE = 'application/javascript';\n", | |
| " var HTML_MIME_TYPE = 'text/html';\n", | |
| " var EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", | |
| " var CLASS_NAME = 'output_bokeh rendered_html';\n", | |
| "\n", | |
| " /**\n", | |
| " * Render data to the DOM node\n", | |
| " */\n", | |
| " function render(props, node) {\n", | |
| " var script = document.createElement(\"script\");\n", | |
| " node.appendChild(script);\n", | |
| " }\n", | |
| "\n", | |
| " /**\n", | |
| " * Handle when an output is cleared or removed\n", | |
| " */\n", | |
| " function handleClearOutput(event, handle) {\n", | |
| " var cell = handle.cell;\n", | |
| "\n", | |
| " var id = cell.output_area._bokeh_element_id;\n", | |
| " var server_id = cell.output_area._bokeh_server_id;\n", | |
| " // Clean up Bokeh references\n", | |
| " if (id != null && id in Bokeh.index) {\n", | |
| " Bokeh.index[id].model.document.clear();\n", | |
| " delete Bokeh.index[id];\n", | |
| " }\n", | |
| "\n", | |
| " if (server_id !== undefined) {\n", | |
| " // Clean up Bokeh references\n", | |
| " var cmd = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", | |
| " cell.notebook.kernel.execute(cmd, {\n", | |
| " iopub: {\n", | |
| " output: function(msg) {\n", | |
| " var id = msg.content.text.trim();\n", | |
| " if (id in Bokeh.index) {\n", | |
| " Bokeh.index[id].model.document.clear();\n", | |
| " delete Bokeh.index[id];\n", | |
| " }\n", | |
| " }\n", | |
| " }\n", | |
| " });\n", | |
| " // Destroy server and session\n", | |
| " var cmd = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", | |
| " cell.notebook.kernel.execute(cmd);\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| " /**\n", | |
| " * Handle when a new output is added\n", | |
| " */\n", | |
| " function handleAddOutput(event, handle) {\n", | |
| " var output_area = handle.output_area;\n", | |
| " var output = handle.output;\n", | |
| "\n", | |
| " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", | |
| " if ((output.output_type != \"display_data\") || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n", | |
| " return\n", | |
| " }\n", | |
| "\n", | |
| " var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", | |
| "\n", | |
| " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", | |
| " toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n", | |
| " // store reference to embed id on output_area\n", | |
| " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", | |
| " }\n", | |
| " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", | |
| " var bk_div = document.createElement(\"div\");\n", | |
| " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", | |
| " var script_attrs = bk_div.children[0].attributes;\n", | |
| " for (var i = 0; i < script_attrs.length; i++) {\n", | |
| " toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", | |
| " }\n", | |
| " // store reference to server id on output_area\n", | |
| " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| " function register_renderer(events, OutputArea) {\n", | |
| "\n", | |
| " function append_mime(data, metadata, element) {\n", | |
| " // create a DOM node to render to\n", | |
| " var toinsert = this.create_output_subarea(\n", | |
| " metadata,\n", | |
| " CLASS_NAME,\n", | |
| " EXEC_MIME_TYPE\n", | |
| " );\n", | |
| " this.keyboard_manager.register_events(toinsert);\n", | |
| " // Render to node\n", | |
| " var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", | |
| " render(props, toinsert[toinsert.length - 1]);\n", | |
| " element.append(toinsert);\n", | |
| " return toinsert\n", | |
| " }\n", | |
| "\n", | |
| " /* Handle when an output is cleared or removed */\n", | |
| " events.on('clear_output.CodeCell', handleClearOutput);\n", | |
| " events.on('delete.Cell', handleClearOutput);\n", | |
| "\n", | |
| " /* Handle when a new output is added */\n", | |
| " events.on('output_added.OutputArea', handleAddOutput);\n", | |
| "\n", | |
| " /**\n", | |
| " * Register the mime type and append_mime function with output_area\n", | |
| " */\n", | |
| " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", | |
| " /* Is output safe? */\n", | |
| " safe: true,\n", | |
| " /* Index of renderer in `output_area.display_order` */\n", | |
| " index: 0\n", | |
| " });\n", | |
| " }\n", | |
| "\n", | |
| " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", | |
| " if (root.Jupyter !== undefined) {\n", | |
| " var events = require('base/js/events');\n", | |
| " var OutputArea = require('notebook/js/outputarea').OutputArea;\n", | |
| "\n", | |
| " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", | |
| " register_renderer(events, OutputArea);\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| " \n", | |
| " if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n", | |
| " root._bokeh_timeout = Date.now() + 5000;\n", | |
| " root._bokeh_failed_load = false;\n", | |
| " }\n", | |
| "\n", | |
| " var NB_LOAD_WARNING = {'data': {'text/html':\n", | |
| " \"<div style='background-color: #fdd'>\\n\"+\n", | |
| " \"<p>\\n\"+\n", | |
| " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", | |
| " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", | |
| " \"</p>\\n\"+\n", | |
| " \"<ul>\\n\"+\n", | |
| " \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n", | |
| " \"<li>use INLINE resources instead, as so:</li>\\n\"+\n", | |
| " \"</ul>\\n\"+\n", | |
| " \"<code>\\n\"+\n", | |
| " \"from bokeh.resources import INLINE\\n\"+\n", | |
| " \"output_notebook(resources=INLINE)\\n\"+\n", | |
| " \"</code>\\n\"+\n", | |
| " \"</div>\"}};\n", | |
| "\n", | |
| " function display_loaded() {\n", | |
| " var el = document.getElementById(\"88934619-d5f3-4b75-8b96-5c33a3527456\");\n", | |
| " if (el != null) {\n", | |
| " el.textContent = \"BokehJS is loading...\";\n", | |
| " }\n", | |
| " if (root.Bokeh !== undefined) {\n", | |
| " if (el != null) {\n", | |
| " el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n", | |
| " }\n", | |
| " } else if (Date.now() < root._bokeh_timeout) {\n", | |
| " setTimeout(display_loaded, 100)\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| "\n", | |
| " function run_callbacks() {\n", | |
| " try {\n", | |
| " root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n", | |
| " }\n", | |
| " finally {\n", | |
| " delete root._bokeh_onload_callbacks\n", | |
| " }\n", | |
| " console.info(\"Bokeh: all callbacks have finished\");\n", | |
| " }\n", | |
| "\n", | |
| " function load_libs(js_urls, callback) {\n", | |
| " root._bokeh_onload_callbacks.push(callback);\n", | |
| " if (root._bokeh_is_loading > 0) {\n", | |
| " console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n", | |
| " return null;\n", | |
| " }\n", | |
| " if (js_urls == null || js_urls.length === 0) {\n", | |
| " run_callbacks();\n", | |
| " return null;\n", | |
| " }\n", | |
| " console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", | |
| " root._bokeh_is_loading = js_urls.length;\n", | |
| " for (var i = 0; i < js_urls.length; i++) {\n", | |
| " var url = js_urls[i];\n", | |
| " var s = document.createElement('script');\n", | |
| " s.src = url;\n", | |
| " s.async = false;\n", | |
| " s.onreadystatechange = s.onload = function() {\n", | |
| " root._bokeh_is_loading--;\n", | |
| " if (root._bokeh_is_loading === 0) {\n", | |
| " console.log(\"Bokeh: all BokehJS libraries loaded\");\n", | |
| " run_callbacks()\n", | |
| " }\n", | |
| " };\n", | |
| " s.onerror = function() {\n", | |
| " console.warn(\"failed to load library \" + url);\n", | |
| " };\n", | |
| " console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", | |
| " document.getElementsByTagName(\"head\")[0].appendChild(s);\n", | |
| " }\n", | |
| " };var element = document.getElementById(\"88934619-d5f3-4b75-8b96-5c33a3527456\");\n", | |
| " if (element == null) {\n", | |
| " console.log(\"Bokeh: ERROR: autoload.js configured with elementid '88934619-d5f3-4b75-8b96-5c33a3527456' but no matching script tag was found. \")\n", | |
| " return false;\n", | |
| " }\n", | |
| "\n", | |
| " var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-0.13.0.min.js\"];\n", | |
| "\n", | |
| " var inline_js = [\n", | |
| " function(Bokeh) {\n", | |
| " Bokeh.set_log_level(\"info\");\n", | |
| " },\n", | |
| " \n", | |
| " function(Bokeh) {\n", | |
| " \n", | |
| " },\n", | |
| " function(Bokeh) {\n", | |
| " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n", | |
| " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n", | |
| " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n", | |
| " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n", | |
| " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n", | |
| " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n", | |
| " }\n", | |
| " ];\n", | |
| "\n", | |
| " function run_inline_js() {\n", | |
| " \n", | |
| " if ((root.Bokeh !== undefined) || (force === true)) {\n", | |
| " for (var i = 0; i < inline_js.length; i++) {\n", | |
| " inline_js[i].call(root, root.Bokeh);\n", | |
| " }if (force === true) {\n", | |
| " display_loaded();\n", | |
| " }} else if (Date.now() < root._bokeh_timeout) {\n", | |
| " setTimeout(run_inline_js, 100);\n", | |
| " } else if (!root._bokeh_failed_load) {\n", | |
| " console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n", | |
| " root._bokeh_failed_load = true;\n", | |
| " } else if (force !== true) {\n", | |
| " var cell = $(document.getElementById(\"88934619-d5f3-4b75-8b96-5c33a3527456\")).parents('.cell').data().cell;\n", | |
| " cell.output_area.append_execute_result(NB_LOAD_WARNING)\n", | |
| " }\n", | |
| "\n", | |
| " }\n", | |
| "\n", | |
| " if (root._bokeh_is_loading === 0) {\n", | |
| " console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n", | |
| " run_inline_js();\n", | |
| " } else {\n", | |
| " load_libs(js_urls, function() {\n", | |
| " console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n", | |
| " run_inline_js();\n", | |
| " });\n", | |
| " }\n", | |
| "}(window));" | |
| ], | |
| "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n function now() {\n return new Date();\n }\n\n var force = true;\n\n if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\n \n\n \n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n var NB_LOAD_WARNING = {'data': {'text/html':\n \"<div style='background-color: #fdd'>\\n\"+\n \"<p>\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"</p>\\n\"+\n \"<ul>\\n\"+\n \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n \"<li>use INLINE resources instead, as so:</li>\\n\"+\n \"</ul>\\n\"+\n \"<code>\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"</code>\\n\"+\n \"</div>\"}};\n\n function display_loaded() {\n var el = document.getElementById(\"88934619-d5f3-4b75-8b96-5c33a3527456\");\n if (el != null) {\n el.textContent = \"BokehJS is loading...\";\n }\n if (root.Bokeh !== undefined) {\n if (el != null) {\n el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(display_loaded, 100)\n }\n }\n\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n }\n finally {\n delete root._bokeh_onload_callbacks\n }\n console.info(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(js_urls, callback) {\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = js_urls.length;\n for (var i = 0; i < js_urls.length; i++) {\n var url = js_urls[i];\n var s = document.createElement('script');\n s.src = url;\n s.async = false;\n s.onreadystatechange = s.onload = function() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.log(\"Bokeh: all BokehJS libraries loaded\");\n run_callbacks()\n }\n };\n s.onerror = function() {\n console.warn(\"failed to load library \" + url);\n };\n console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.getElementsByTagName(\"head\")[0].appendChild(s);\n }\n };var element = document.getElementById(\"88934619-d5f3-4b75-8b96-5c33a3527456\");\n if (element == null) {\n console.log(\"Bokeh: ERROR: autoload.js configured with elementid '88934619-d5f3-4b75-8b96-5c33a3527456' but no matching script tag was found. \")\n return false;\n }\n\n var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-0.13.0.min.js\"];\n\n var inline_js = [\n function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\n \n function(Bokeh) {\n \n },\n function(Bokeh) {\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n }\n ];\n\n function run_inline_js() {\n \n if ((root.Bokeh !== undefined) || (force === true)) {\n for (var i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }if (force === true) {\n display_loaded();\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n var cell = $(document.getElementById(\"88934619-d5f3-4b75-8b96-5c33a3527456\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n\n }\n\n if (root._bokeh_is_loading === 0) {\n console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(js_urls, function() {\n console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));" | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "name": "stderr", | |
| "output_type": "stream", | |
| "text": [ | |
| "C:\\Users\\Frank the Tank\\Anaconda3\\lib\\site-packages\\bokeh\\models\\sources.py:110: BokehUserWarning:\n", | |
| "\n", | |
| "ColumnDataSource's columns must be of the same length. Current lengths: ('color', 6), ('x', 26), ('y', 26)\n", | |
| "\n" | |
| ] | |
| }, | |
| { | |
| "data": { | |
| "text/html": [ | |
| "\n", | |
| "\n", | |
| "\n", | |
| "\n", | |
| "\n", | |
| "\n", | |
| " <div class=\"bk-root\" id=\"d294f725-1bb3-4d05-ac62-f56945175133\"></div>\n" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/javascript": [ | |
| "(function(root) {\n", | |
| " function embed_document(root) {\n", | |
| " \n", | |
| " var docs_json = {\"e12283f5-10f4-4ee5-aca6-8c4e5403739d\":{\"roots\":{\"references\":[{\"attributes\":{},\"id\":\"e75379c8-0b8a-443d-b5e8-1c4965d1e6d0\",\"type\":\"PanTool\"},{\"attributes\":{\"plot\":null,\"text\":\"Number of Statements per Person\"},\"id\":\"6565b3df-c43a-47f3-b24c-b3358ca113f1\",\"type\":\"Title\"},{\"attributes\":{\"callback\":null,\"data\":{\"color\":[\"#3288bd\",\"#99d594\",\"#e6f598\",\"#fee08b\",\"#fc8d59\",\"#d53e4f\"],\"x\":[\"KAVANAUGH\",\"MITCHELL\",\"FORD\",\"GRASSLEY\",\"WHITEHOUSE\",\"KLOBUCHAR\",\"FEINSTEIN\",\"LEAHY\",\"DURBIN\",\"UNKNOWN\",\"BLUMENTHAL\",\"BOOKER\",\"HIRONO\",\"GRAHAM\",\"CORNYN\",\"COONS\",\"HARRIS\",\"HATCH\",\"KENNEDY\",\"BROMWICH\",\"CRAPO\",\"SASSE\",\"CRUZ\",\"LEE\",\"FLAKE\",\"TILLIS\"],\"y\":[466,405,368,212,77,71,56,54,52,36,35,34,27,25,25,25,19,16,16,15,9,5,5,4,2,1]},\"selected\":{\"id\":\"710cbba0-4f36-48a7-a596-7ddd92937444\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"46005cb9-7e48-4cbe-abd4-ddcde1e61bde\",\"type\":\"UnionRenderers\"}},\"id\":\"f900db22-27a2-4f65-af93-6bbb24345443\",\"type\":\"ColumnDataSource\"},{\"attributes\":{},\"id\":\"0ed4e1ef-771c-44fc-bb34-0d668fe117b7\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"callback\":null,\"factors\":[\"KAVANAUGH\",\"MITCHELL\",\"FORD\",\"GRASSLEY\",\"WHITEHOUSE\",\"KLOBUCHAR\",\"FEINSTEIN\",\"LEAHY\",\"DURBIN\",\"UNKNOWN\",\"BLUMENTHAL\",\"BOOKER\",\"HIRONO\",\"GRAHAM\",\"CORNYN\",\"COONS\",\"HARRIS\",\"HATCH\",\"KENNEDY\",\"BROMWICH\",\"CRAPO\",\"SASSE\",\"CRUZ\",\"LEE\",\"FLAKE\",\"TILLIS\"]},\"id\":\"4125de49-83fd-4802-b98f-057d0cc88d0e\",\"type\":\"FactorRange\"},{\"attributes\":{\"overlay\":{\"id\":\"4e51a04b-37b2-4967-807c-26df5fbd6302\",\"type\":\"BoxAnnotation\"}},\"id\":\"a00587ae-63c8-4f05-97ab-6ee27236ba13\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"e75379c8-0b8a-443d-b5e8-1c4965d1e6d0\",\"type\":\"PanTool\"},{\"id\":\"0ed4e1ef-771c-44fc-bb34-0d668fe117b7\",\"type\":\"WheelZoomTool\"},{\"id\":\"a00587ae-63c8-4f05-97ab-6ee27236ba13\",\"type\":\"BoxZoomTool\"},{\"id\":\"ddc1ba92-ec41-4ced-9952-245bdc74c7de\",\"type\":\"SaveTool\"},{\"id\":\"e5a61ba7-5911-4f84-94ed-59d0bcacd91c\",\"type\":\"ResetTool\"},{\"id\":\"80d07679-591e-40ed-b1c8-4ae2b9875280\",\"type\":\"HelpTool\"}]},\"id\":\"c844f90c-044d-41d3-8270-6a23dee4c199\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"ddc1ba92-ec41-4ced-9952-245bdc74c7de\",\"type\":\"SaveTool\"},{\"attributes\":{\"formatter\":{\"id\":\"064fcd7a-0082-4497-9478-f65fa055964d\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"0aabdcd4-2013-4eae-9e47-982acd141332\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"103ee850-da70-478a-a006-20c37ed19828\",\"type\":\"BasicTicker\"}},\"id\":\"d2607338-0c44-426c-9dd0-0b851658be92\",\"type\":\"LinearAxis\"},{\"attributes\":{\"below\":[{\"id\":\"c63addd4-2946-4c6e-a961-3955bd6501ee\",\"type\":\"CategoricalAxis\"}],\"left\":[{\"id\":\"d2607338-0c44-426c-9dd0-0b851658be92\",\"type\":\"LinearAxis\"}],\"renderers\":[{\"id\":\"c63addd4-2946-4c6e-a961-3955bd6501ee\",\"type\":\"CategoricalAxis\"},{\"id\":\"1d846856-03f6-431e-b168-f5b01adaedab\",\"type\":\"Grid\"},{\"id\":\"d2607338-0c44-426c-9dd0-0b851658be92\",\"type\":\"LinearAxis\"},{\"id\":\"57fec508-30bf-4751-a7ab-182f20f33f76\",\"type\":\"Grid\"},{\"id\":\"4e51a04b-37b2-4967-807c-26df5fbd6302\",\"type\":\"BoxAnnotation\"},{\"id\":\"b8f81082-05ce-4dd5-965c-4fc59bdf6005\",\"type\":\"GlyphRenderer\"},{\"id\":\"001a8723-1410-4ab8-b46a-adabbc23843f\",\"type\":\"LabelSet\"}],\"title\":{\"id\":\"6565b3df-c43a-47f3-b24c-b3358ca113f1\",\"type\":\"Title\"},\"toolbar\":{\"id\":\"c844f90c-044d-41d3-8270-6a23dee4c199\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"4125de49-83fd-4802-b98f-057d0cc88d0e\",\"type\":\"FactorRange\"},\"x_scale\":{\"id\":\"8d8740af-c3b2-434e-a76a-05c0f39499e4\",\"type\":\"CategoricalScale\"},\"y_range\":{\"id\":\"bed03e2d-4228-4848-8e1d-797ba911b398\",\"type\":\"Range1d\"},\"y_scale\":{\"id\":\"0326347a-aeb1-4c65-81a2-d71b39d414cf\",\"type\":\"LinearScale\"}},\"id\":\"0aabdcd4-2013-4eae-9e47-982acd141332\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"e5a61ba7-5911-4f84-94ed-59d0bcacd91c\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"8d8740af-c3b2-434e-a76a-05c0f39499e4\",\"type\":\"CategoricalScale\"},{\"attributes\":{},\"id\":\"80d07679-591e-40ed-b1c8-4ae2b9875280\",\"type\":\"HelpTool\"},{\"attributes\":{\"callback\":null,\"end\":500},\"id\":\"bed03e2d-4228-4848-8e1d-797ba911b398\",\"type\":\"Range1d\"},{\"attributes\":{},\"id\":\"710cbba0-4f36-48a7-a596-7ddd92937444\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"0326347a-aeb1-4c65-81a2-d71b39d414cf\",\"type\":\"LinearScale\"},{\"attributes\":{\"plot\":{\"id\":\"0aabdcd4-2013-4eae-9e47-982acd141332\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"8585ff04-604d-4059-8efc-36c19cb65012\",\"type\":\"CategoricalTicker\"}},\"id\":\"1d846856-03f6-431e-b168-f5b01adaedab\",\"type\":\"Grid\"},{\"attributes\":{\"formatter\":{\"id\":\"817287e9-2a68-4d1c-99e3-696655f26240\",\"type\":\"CategoricalTickFormatter\"},\"major_label_orientation\":0.7853981633974483,\"plot\":{\"id\":\"0aabdcd4-2013-4eae-9e47-982acd141332\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"8585ff04-604d-4059-8efc-36c19cb65012\",\"type\":\"CategoricalTicker\"}},\"id\":\"c63addd4-2946-4c6e-a961-3955bd6501ee\",\"type\":\"CategoricalAxis\"},{\"attributes\":{},\"id\":\"8585ff04-604d-4059-8efc-36c19cb65012\",\"type\":\"CategoricalTicker\"},{\"attributes\":{\"data_source\":{\"id\":\"f900db22-27a2-4f65-af93-6bbb24345443\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"0ef0b1f5-85cc-49e6-aa04-3ef73ebaad75\",\"type\":\"VBar\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"85582a05-a161-4aa8-844c-854e77c5cab3\",\"type\":\"VBar\"},\"selection_glyph\":null,\"view\":{\"id\":\"001ef51c-7748-4ec5-8ea8-bfc889b56da0\",\"type\":\"CDSView\"}},\"id\":\"b8f81082-05ce-4dd5-965c-4fc59bdf6005\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"103ee850-da70-478a-a006-20c37ed19828\",\"type\":\"BasicTicker\"},{\"attributes\":{\"level\":\"glyph\",\"plot\":{\"id\":\"0aabdcd4-2013-4eae-9e47-982acd141332\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"source\":{\"id\":\"f900db22-27a2-4f65-af93-6bbb24345443\",\"type\":\"ColumnDataSource\"},\"text\":{\"field\":\"y\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":-10.5},\"y\":{\"field\":\"y\"}},\"id\":\"001a8723-1410-4ab8-b46a-adabbc23843f\",\"type\":\"LabelSet\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"0aabdcd4-2013-4eae-9e47-982acd141332\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"103ee850-da70-478a-a006-20c37ed19828\",\"type\":\"BasicTicker\"}},\"id\":\"57fec508-30bf-4751-a7ab-182f20f33f76\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"064fcd7a-0082-4497-9478-f65fa055964d\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"source\":{\"id\":\"f900db22-27a2-4f65-af93-6bbb24345443\",\"type\":\"ColumnDataSource\"}},\"id\":\"001ef51c-7748-4ec5-8ea8-bfc889b56da0\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"46005cb9-7e48-4cbe-abd4-ddcde1e61bde\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"top\":{\"field\":\"y\"},\"width\":{\"value\":0.5},\"x\":{\"field\":\"x\"}},\"id\":\"85582a05-a161-4aa8-844c-854e77c5cab3\",\"type\":\"VBar\"},{\"attributes\":{},\"id\":\"817287e9-2a68-4d1c-99e3-696655f26240\",\"type\":\"CategoricalTickFormatter\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"4e51a04b-37b2-4967-807c-26df5fbd6302\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"fill_color\":{\"field\":\"color\"},\"line_color\":{\"field\":\"color\"},\"top\":{\"field\":\"y\"},\"width\":{\"value\":0.5},\"x\":{\"field\":\"x\"}},\"id\":\"0ef0b1f5-85cc-49e6-aa04-3ef73ebaad75\",\"type\":\"VBar\"}],\"root_ids\":[\"0aabdcd4-2013-4eae-9e47-982acd141332\"]},\"title\":\"Bokeh Application\",\"version\":\"0.13.0\"}};\n", | |
| " var render_items = [{\"docid\":\"e12283f5-10f4-4ee5-aca6-8c4e5403739d\",\"roots\":{\"0aabdcd4-2013-4eae-9e47-982acd141332\":\"d294f725-1bb3-4d05-ac62-f56945175133\"}}];\n", | |
| " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", | |
| "\n", | |
| " }\n", | |
| " if (root.Bokeh !== undefined) {\n", | |
| " embed_document(root);\n", | |
| " } else {\n", | |
| " var attempts = 0;\n", | |
| " var timer = setInterval(function(root) {\n", | |
| " if (root.Bokeh !== undefined) {\n", | |
| " embed_document(root);\n", | |
| " clearInterval(timer);\n", | |
| " }\n", | |
| " attempts++;\n", | |
| " if (attempts > 100) {\n", | |
| " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\")\n", | |
| " clearInterval(timer);\n", | |
| " }\n", | |
| " }, 10, root)\n", | |
| " }\n", | |
| "})(window);" | |
| ], | |
| "application/vnd.bokehjs_exec.v0+json": "" | |
| }, | |
| "metadata": { | |
| "application/vnd.bokehjs_exec.v0+json": { | |
| "id": "0aabdcd4-2013-4eae-9e47-982acd141332" | |
| } | |
| }, | |
| "output_type": "display_data" | |
| } | |
| ], | |
| "source": [ | |
| "from bokeh.plotting import figure\n", | |
| "from bokeh.io import output_notebook, show\n", | |
| "from bokeh.palettes import Spectral6\n", | |
| "from bokeh.models import ColumnDataSource, ranges, LabelSet\n", | |
| "\n", | |
| "output_notebook()\n", | |
| "\n", | |
| "x = ['KAVANAUGH','MITCHELL', 'FORD', 'GRASSLEY', 'WHITEHOUSE', 'KLOBUCHAR', 'FEINSTEIN', 'LEAHY',\n", | |
| " 'DURBIN', 'UNKNOWN', 'BLUMENTHAL', 'BOOKER', 'HIRONO', 'GRAHAM', 'CORNYN', 'COONS', 'HARRIS', 'HATCH',\n", | |
| " 'KENNEDY', 'BROMWICH', 'CRAPO', 'SASSE', 'CRUZ', 'LEE', 'FLAKE', 'TILLIS']\n", | |
| "y = [466, 405 ,368 ,212 ,77 ,71 ,56 ,54 ,52 ,36 ,35 ,34 ,27\n", | |
| " ,25 ,25 ,25 ,19 ,16 ,16 ,15 ,9 ,5 ,5 ,4 ,2 ,1]\n", | |
| "\n", | |
| "source = ColumnDataSource(data=dict(x=x, y=y, color=Spectral6))\n", | |
| "p = figure(x_range=x, y_range=(0, 500), title=\"Number of Statements per Person\")\n", | |
| "\n", | |
| "p.xaxis.major_label_orientation = np.pi/4 # radians, \"horizontal\", \"vertical\", \"normal\"\n", | |
| "\n", | |
| "p.vbar(x='x', top='y' , width=0.5, color = 'color', source=source)\n", | |
| "\n", | |
| "labels = LabelSet(x='x', y='y', text='y', level='glyph',\n", | |
| " x_offset=-10.5, y_offset=0, source=source, render_mode='canvas')\n", | |
| "p.add_layout(labels)\n", | |
| "show(p)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 74, | |
| "metadata": { | |
| "scrolled": true | |
| }, | |
| "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>person</th>\n", | |
| " <th>statement</th>\n", | |
| " </tr>\n", | |
| " </thead>\n", | |
| " <tbody>\n", | |
| " <tr>\n", | |
| " <th>974</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>I am.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>976</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Yes.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>978</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>I do.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>980</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Mr. Chairman, Ranking Member Feinstein, membe...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>983</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Yes, I’m ready.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>985</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Thank you.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>991</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Yeah.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>993</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>No.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>995</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>No.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>998</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>I have. I may refer back to it, if I can?</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1000</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>I do.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1002</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>I do.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1004</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>He was a friend at Georgetown Prep, starting ...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1006</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>I haven’t talked to him in a couple years. We...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1008</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Also ninth grade, Georgetown Prep. Went by P....</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1010</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>He lives in the area. I see him once in a whi...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1012</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>I — I know of her. And it — it’s possible I, ...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1014</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Correct.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1018</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Yes.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1020</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Senator, I’ll do whatever the committee wants...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1022</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>And — and whoever wants — you know whatever t...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1024</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Immediately. I’m all in immediately.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1026</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Senator, the committee investigates. It’s not...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1028</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>You’re interviewing me.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1030</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>You’re interviewing me. You’re — you’re doing...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1032</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>… but you’re doing it. That’s — the — the — t...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1034</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Yes, that — that is emphatically what I’m say...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1036</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>No.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1042</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Yes, we drank beer. My friends and I, the boy...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1044</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>We drank beer. We liked beer.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>...</th>\n", | |
| " <td>...</td>\n", | |
| " <td>...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2008</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>… I don’t know her. But I’ve also said that w...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2010</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Yes.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2012</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>I — I did not say that — that’s…</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2014</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>… Coordinated by people in this room.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2016</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>All the witnesses who were there say it didn’...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2018</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Senator, I — I say listen to both sides befor...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2020</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Look at the…</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2022</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Is that a question?</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2061</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>I’ve — I’ve talked about that, Mr. Chairman.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2064</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>No, the — I’ll do whatever the committee want...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2066</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>As you know.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2068</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Right.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2070</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>I’ll do whatever the committee wants, of cour...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2072</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>The witness statements —</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2074</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>The FBI would gather witness statements, you ...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2076</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>I’ve had six background investigations over 2...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2078</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>The witness testimonies before you know a wit...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2080</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>I explained that in my opening statement, Sen...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2082</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Of course, but the point I’ve been emphasizin...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2084</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>I did not. I plan to…</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2086</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>… I plan to…</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2088</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>… I plan to. But I did not because I was prep...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2095</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>I do.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2097</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>They are not as to me. I have not questioned ...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2099</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Those are not. She — no — no — none of the wi...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2101</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Those are not true. Never met her, don’t know...</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2103</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Correct.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2105</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Zero, I’m 100 percent certain.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2107</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>Not a scintilla; 100 percent certain, senator.</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2109</th>\n", | |
| " <td>KAVANAUGH</td>\n", | |
| " <td>I swear to God.</td>\n", | |
| " </tr>\n", | |
| " </tbody>\n", | |
| "</table>\n", | |
| "<p>466 rows × 2 columns</p>\n", | |
| "</div>" | |
| ], | |
| "text/plain": [ | |
| " person statement\n", | |
| "974 KAVANAUGH I am.\n", | |
| "976 KAVANAUGH Yes.\n", | |
| "978 KAVANAUGH I do.\n", | |
| "980 KAVANAUGH Mr. Chairman, Ranking Member Feinstein, membe...\n", | |
| "983 KAVANAUGH Yes, I’m ready.\n", | |
| "985 KAVANAUGH Thank you.\n", | |
| "991 KAVANAUGH Yeah.\n", | |
| "993 KAVANAUGH No.\n", | |
| "995 KAVANAUGH No.\n", | |
| "998 KAVANAUGH I have. I may refer back to it, if I can?\n", | |
| "1000 KAVANAUGH I do.\n", | |
| "1002 KAVANAUGH I do.\n", | |
| "1004 KAVANAUGH He was a friend at Georgetown Prep, starting ...\n", | |
| "1006 KAVANAUGH I haven’t talked to him in a couple years. We...\n", | |
| "1008 KAVANAUGH Also ninth grade, Georgetown Prep. Went by P....\n", | |
| "1010 KAVANAUGH He lives in the area. I see him once in a whi...\n", | |
| "1012 KAVANAUGH I — I know of her. And it — it’s possible I, ...\n", | |
| "1014 KAVANAUGH Correct.\n", | |
| "1018 KAVANAUGH Yes.\n", | |
| "1020 KAVANAUGH Senator, I’ll do whatever the committee wants...\n", | |
| "1022 KAVANAUGH And — and whoever wants — you know whatever t...\n", | |
| "1024 KAVANAUGH Immediately. I’m all in immediately.\n", | |
| "1026 KAVANAUGH Senator, the committee investigates. It’s not...\n", | |
| "1028 KAVANAUGH You’re interviewing me.\n", | |
| "1030 KAVANAUGH You’re interviewing me. You’re — you’re doing...\n", | |
| "1032 KAVANAUGH … but you’re doing it. That’s — the — the — t...\n", | |
| "1034 KAVANAUGH Yes, that — that is emphatically what I’m say...\n", | |
| "1036 KAVANAUGH No.\n", | |
| "1042 KAVANAUGH Yes, we drank beer. My friends and I, the boy...\n", | |
| "1044 KAVANAUGH We drank beer. We liked beer.\n", | |
| "... ... ...\n", | |
| "2008 KAVANAUGH … I don’t know her. But I’ve also said that w...\n", | |
| "2010 KAVANAUGH Yes.\n", | |
| "2012 KAVANAUGH I — I did not say that — that’s…\n", | |
| "2014 KAVANAUGH … Coordinated by people in this room.\n", | |
| "2016 KAVANAUGH All the witnesses who were there say it didn’...\n", | |
| "2018 KAVANAUGH Senator, I — I say listen to both sides befor...\n", | |
| "2020 KAVANAUGH Look at the…\n", | |
| "2022 KAVANAUGH Is that a question?\n", | |
| "2061 KAVANAUGH I’ve — I’ve talked about that, Mr. Chairman.\n", | |
| "2064 KAVANAUGH No, the — I’ll do whatever the committee want...\n", | |
| "2066 KAVANAUGH As you know.\n", | |
| "2068 KAVANAUGH Right.\n", | |
| "2070 KAVANAUGH I’ll do whatever the committee wants, of cour...\n", | |
| "2072 KAVANAUGH The witness statements —\n", | |
| "2074 KAVANAUGH The FBI would gather witness statements, you ...\n", | |
| "2076 KAVANAUGH I’ve had six background investigations over 2...\n", | |
| "2078 KAVANAUGH The witness testimonies before you know a wit...\n", | |
| "2080 KAVANAUGH I explained that in my opening statement, Sen...\n", | |
| "2082 KAVANAUGH Of course, but the point I’ve been emphasizin...\n", | |
| "2084 KAVANAUGH I did not. I plan to…\n", | |
| "2086 KAVANAUGH … I plan to…\n", | |
| "2088 KAVANAUGH … I plan to. But I did not because I was prep...\n", | |
| "2095 KAVANAUGH I do.\n", | |
| "2097 KAVANAUGH They are not as to me. I have not questioned ...\n", | |
| "2099 KAVANAUGH Those are not. She — no — no — none of the wi...\n", | |
| "2101 KAVANAUGH Those are not true. Never met her, don’t know...\n", | |
| "2103 KAVANAUGH Correct.\n", | |
| "2105 KAVANAUGH Zero, I’m 100 percent certain.\n", | |
| "2107 KAVANAUGH Not a scintilla; 100 percent certain, senator.\n", | |
| "2109 KAVANAUGH I swear to God.\n", | |
| "\n", | |
| "[466 rows x 2 columns]" | |
| ] | |
| }, | |
| "execution_count": 74, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "data[data.person == 'KAVANAUGH']" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 75, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "from watson_developer_cloud import ToneAnalyzerV3\n", | |
| "\n", | |
| "tone_analyzer = ToneAnalyzerV3(\n", | |
| " version='2017-09-21',\n", | |
| " iam_apikey= 'myapikey',\n", | |
| " url='https://gateway-wdc.watsonplatform.net/tone-analyzer/api'\n", | |
| " )" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 329, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "from __future__ import unicode_literals\n", | |
| "import json, time\n", | |
| "from watson_developer_cloud import ToneAnalyzerV3\n" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 80, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "tone_analyzer = ToneAnalyzerV3(\n", | |
| " version='2017-09-21',\n", | |
| " iam_apikey= 'myapikey',\n", | |
| " url='https://gateway-wdc.watsonplatform.net/tone-analyzer/api'\n", | |
| " )" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "# Analyzing the tone of the data\n", | |
| "## Converting JSON Output to CSV for Further Analysis \n", | |
| "\n", | |
| "# Ford's Openning Statement" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 224, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "{\n", | |
| " \"document_tone\": {\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.527994,\n", | |
| " \"tone_id\": \"joy\",\n", | |
| " \"tone_name\": \"Joy\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.630239,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " \"sentences_tone\": [\n", | |
| " {\n", | |
| " \"sentence_id\": 0,\n", | |
| " \"text\": \"OK. Thank you, Chairman Grassley and Ranking Member Feinstein, members of the committee.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.509368,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 1,\n", | |
| " \"text\": \"My name is Christine Blasey Ford.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 2,\n", | |
| " \"text\": \"I am a professor of psychology at Palo Alto University and a research psychologist at the Stanford University School of Medicine.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 3,\n", | |
| " \"text\": \"I won\\u2019t detail my educational background since it has already been summarized.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.502139,\n", | |
| " \"tone_id\": \"joy\",\n", | |
| " \"tone_name\": \"Joy\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 4,\n", | |
| " \"text\": \"I have been married to Russell Ford since 2002 and we have two children.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 5,\n", | |
| " \"text\": \"I am here today not because I want to be.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.687768,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 6,\n", | |
| " \"text\": \"I am terrified.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 7,\n", | |
| " \"text\": \"I am here because I believe it is my civic duty to tell you what happened to me while Brett Kavanaugh and I were in high school.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 8,\n", | |
| " \"text\": \"I have described the events publicly before.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 9,\n", | |
| " \"text\": \"I summarized them in my letter to Ranking Member Feinstein and again in a letter to Chairman Grassley.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 10,\n", | |
| " \"text\": \"I understand and appreciate the importance of your hearing from me directly about what happened to me and the impact that it has had on my life and on my family.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.662733,\n", | |
| " \"tone_id\": \"joy\",\n", | |
| " \"tone_name\": \"Joy\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.607667,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 11,\n", | |
| " \"text\": \"I grew up in the suburbs of Washington, D.C.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 12,\n", | |
| " \"text\": \"I attended the Holton-Arms School in Bethesda, Maryland, from 1978 to 1984.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 13,\n", | |
| " \"text\": \"Holton-Arms is an all-girls school that opened in 1901.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 14,\n", | |
| " \"text\": \"During my time at this school, girls at Holton-Arms frequently met and became friendly with boys from all-boys schools in the area, including the Landon School, Georgetown Prep, Gonzaga High School, as well as our country clubs and other places where kids and families socialized.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.640752,\n", | |
| " \"tone_id\": \"joy\",\n", | |
| " \"tone_name\": \"Joy\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 15,\n", | |
| " \"text\": \"This is how I met Brett Kavanaugh, the boy who sexually assaulted me.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 16,\n", | |
| " \"text\": \"During my freshman and sophomore school years, when I was 14 and 15 years old, my group of friends intersected with Brett and his friends for a short period of time.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.537159,\n", | |
| " \"tone_id\": \"sadness\",\n", | |
| " \"tone_name\": \"Sadness\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 17,\n", | |
| " \"text\": \"I had been friendly with a classmate of Brett\\u2019s for a short time during my freshman and sophomore year, and it was through that connection that I attended a number of parties that Brett also attended.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 18,\n", | |
| " \"text\": \"We did not know each other well, but I knew him and he knew me.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.882284,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 19,\n", | |
| " \"text\": \"In the summer of 1982, like most summers, I spent most every day at the Columbia Country Club in Chevy Chase, Maryland, swimming and practicing diving.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.627077,\n", | |
| " \"tone_id\": \"joy\",\n", | |
| " \"tone_name\": \"Joy\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 20,\n", | |
| " \"text\": \"One evening that summer, after a day of diving at the club, I attended a small gathering at a house in the Bethesda area.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 21,\n", | |
| " \"text\": \"There were four boys I remember specifically being there, Brett Kavanaugh, Mark Judge, a boy named P.J., and one other boy whose name I cannot recall.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.644721,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 22,\n", | |
| " \"text\": \"I also remember my friend Leland attending.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.538922,\n", | |
| " \"tone_id\": \"sadness\",\n", | |
| " \"tone_name\": \"Sadness\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.801827,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 23,\n", | |
| " \"text\": \"I do not remember all of the details of how that gathering came together, but like many that summer, it was almost surely a spur-of-the-moment gathering.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.58176,\n", | |
| " \"tone_id\": \"joy\",\n", | |
| " \"tone_name\": \"Joy\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.73677,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 24,\n", | |
| " \"text\": \"I truly wish I could be more helpful with more detailed answers to all of the questions that have and will be asked about how I got to the party and where it took place and so forth.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.518175,\n", | |
| " \"tone_id\": \"sadness\",\n", | |
| " \"tone_name\": \"Sadness\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.812763,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 25,\n", | |
| " \"text\": \"I don\\u2019t have all the answers, and I don\\u2019t remember as much as I would like to.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.855572,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.66371,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 26,\n", | |
| " \"text\": \"But the details that \\u2014 about that night that bring me here today are the ones I will never forget.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 27,\n", | |
| " \"text\": \"They have been seared into my memory, and have haunted me episodically as an adult.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.532616,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 28,\n", | |
| " \"text\": \"When I got to the small gathering, people were drinking beer in a small living room/family room-type area on the first floor of the house.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 29,\n", | |
| " \"text\": \"I drank one beer.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.622907,\n", | |
| " \"tone_id\": \"joy\",\n", | |
| " \"tone_name\": \"Joy\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 30,\n", | |
| " \"text\": \"Brett and Mark were visibly drunk.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 31,\n", | |
| " \"text\": \"Early in the evening, I went up a very narrow set of stairs leading from the living room to a second floor to use the restroom.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.509368,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 32,\n", | |
| " \"text\": \"When I got to the top of the stairs, I was pushed from behind into a bedroom across from the bathroom.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 33,\n", | |
| " \"text\": \"I couldn\\u2019t see who pushed me.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 34,\n", | |
| " \"text\": \"Brett and Mark came into the bedroom and locked the door behind them.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 35,\n", | |
| " \"text\": \"There was music playing in the bedroom.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.601107,\n", | |
| " \"tone_id\": \"joy\",\n", | |
| " \"tone_name\": \"Joy\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 36,\n", | |
| " \"text\": \"It was turned up louder by either Brett or Mark once we were in the room.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.595347,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.615352,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 37,\n", | |
| " \"text\": \"I was pushed onto the bed, and Brett got on top of me.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 38,\n", | |
| " \"text\": \"He began running his hands over my body and grinding into me.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 39,\n", | |
| " \"text\": \"I yelled, hoping that someone downstairs might hear me, and I tried to get away from him, but his weight was heavy.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.939052,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 40,\n", | |
| " \"text\": \"Brett groped me and tried to take off my clothes.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.955445,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.5538,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 41,\n", | |
| " \"text\": \"He had a hard time, because he was very inebriated, and because I was wearing a one-piece bathing suit underneath my clothing.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.629172,\n", | |
| " \"tone_id\": \"sadness\",\n", | |
| " \"tone_name\": \"Sadness\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.731735,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.579436,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 42,\n", | |
| " \"text\": \"I believed he was going to rape me.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.88939,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 43,\n", | |
| " \"text\": \"I tried to yell for help.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.75152,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 44,\n", | |
| " \"text\": \"When I did, Brett put his hand over my mouth to stop me from yelling.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.529036,\n", | |
| " \"tone_id\": \"anger\",\n", | |
| " \"tone_name\": \"Anger\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 45,\n", | |
| " \"text\": \"This is what terrified me the most, and has had the most lasting impact on my life.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.935297,\n", | |
| " \"tone_id\": \"fear\",\n", | |
| " \"tone_name\": \"Fear\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.58393,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 46,\n", | |
| " \"text\": \"It was hard for me to breathe, and I thought that Brett was accidentally going to kill me.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.542689,\n", | |
| " \"tone_id\": \"fear\",\n", | |
| " \"tone_name\": \"Fear\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.620279,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 47,\n", | |
| " \"text\": \"Both Brett and Mark were drunkenly laughing during the attack.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 48,\n", | |
| " \"text\": \"They seemed to be having a very good time.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.64122,\n", | |
| " \"tone_id\": \"joy\",\n", | |
| " \"tone_name\": \"Joy\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 49,\n", | |
| " \"text\": \"Mark seemed ambivalent, at times urging Brett on and at times telling him to stop.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.647986,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 50,\n", | |
| " \"text\": \"A couple of times, I made eye contact with Mark and thought he might try to help me, but he did not.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.786991,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 51,\n", | |
| " \"text\": \"During this assault, Mark came over and jumped on the bed twice while Brett was on top of me.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 52,\n", | |
| " \"text\": \"And the last time that he did this, we toppled over and Brett was no longer on top of me.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 53,\n", | |
| " \"text\": \"I was able to get up and run out of the room.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 54,\n", | |
| " \"text\": \"Directly across from the bedroom was a small bathroom.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.660207,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 55,\n", | |
| " \"text\": \"I ran inside the bathroom and locked the door.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 56,\n", | |
| " \"text\": \"I waited until I heard Brett and Mark leave the bedroom, laughing and loudly walk down the narrow stairway, pinballing off the walls on the way down.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 57,\n", | |
| " \"text\": \"I waited, and when I did not hear them come back up the stairs, I left the bathroom, went down the same stairwell through the living room, and left the house.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.549596,\n", | |
| " \"tone_id\": \"sadness\",\n", | |
| " \"tone_name\": \"Sadness\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 58,\n", | |
| " \"text\": \"I remember being on the street and feeling this enormous sense of relief that I had escaped that house and that Brett and Mark were not coming outside after me.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 59,\n", | |
| " \"text\": \"Brett\\u2019s assault on me drastically altered my life.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 60,\n", | |
| " \"text\": \"For a very long time, I was too afraid and ashamed to tell anyone these details.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.83289,\n", | |
| " \"tone_id\": \"fear\",\n", | |
| " \"tone_name\": \"Fear\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 61,\n", | |
| " \"text\": \"I did not want to tell my parents that I, at age 15, was in a house without any parents present, drinking beer with boys.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.519764,\n", | |
| " \"tone_id\": \"joy\",\n", | |
| " \"tone_name\": \"Joy\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 62,\n", | |
| " \"text\": \"I convinced myself that because Brett did not rape me, I should just move on and just pretend that it didn\\u2019t happen.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.583407,\n", | |
| " \"tone_id\": \"sadness\",\n", | |
| " \"tone_name\": \"Sadness\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.786991,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 63,\n", | |
| " \"text\": \"Over the years, I told very, very few friends that I had this traumatic experience.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.909949,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 64,\n", | |
| " \"text\": \"I told my husband before we were married that I had experienced a sexual assault.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 65,\n", | |
| " \"text\": \"I had never told the details to anyone \\u2014 the specific details \\u2014 until May 2012, during a couples counseling session.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.687931,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 66,\n", | |
| " \"text\": \"The reason this came up in counseling is that my husband and I had completed a very extensive, very long remodel of our home and I insisted on a second front door, an idea that he and others disagreed with and could not understand.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.541591,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 67,\n", | |
| " \"text\": \"In explaining why I wanted a second front door, I began to describe the assault in detail.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 68,\n", | |
| " \"text\": \"I recall saying that the boy who assaulted me could someday be on the U.S. Supreme Court, and spoke a bit about his background at an elitist all-boys school in Bethesda, Maryland.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 69,\n", | |
| " \"text\": \"My husband recalls that I named my attacker as Brett Kavanaugh.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.653099,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 70,\n", | |
| " \"text\": \"After that May 2012 therapy session, I did my best to ignore the memories of the assault, because recounting them caused me to relive the experience, and caused panic and anxiety.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.870227,\n", | |
| " \"tone_id\": \"fear\",\n", | |
| " \"tone_name\": \"Fear\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.78314,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 71,\n", | |
| " \"text\": \"Occasionally, I would discuss the assault in an individual therapy session, but talking about it caused more reliving of the trauma, so I tried not to think about it or discuss it.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.509873,\n", | |
| " \"tone_id\": \"sadness\",\n", | |
| " \"tone_name\": \"Sadness\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.810545,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 72,\n", | |
| " \"text\": \"But over the years, I went through periods where I thought about the attack.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.7259,\n", | |
| " \"tone_id\": \"fear\",\n", | |
| " \"tone_name\": \"Fear\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.560098,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.681699,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 73,\n", | |
| " \"text\": \"I had confided in some close friends that I had had an experience with sexual assault.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.615352,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 74,\n", | |
| " \"text\": \"Occasionally, I stated that my assailant was a prominent lawyer or judge, but I did not use his name.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.839577,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 75,\n", | |
| " \"text\": \"I do not recall each person I spoke to about Brett\\u2019s assault.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.620279,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 76,\n", | |
| " \"text\": \"And some friends have reminded me of these conversations since the publication of the Washington Post story on September 16th, 2018.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 77,\n", | |
| " \"text\": \"But until July 2018, I had never named Mr. Kavanaugh as my attacker outside of therapy.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 78,\n", | |
| " \"text\": \"This changed in early July 2018.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 79,\n", | |
| " \"text\": \"I saw press reports stating that Brett Kavanaugh was on the shortlist of a list of very well-qualified Supreme Court nominees.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.598602,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 80,\n", | |
| " \"text\": \"I thought it was my civic duty to relay the information I had about Mr. Kavanaugh\\u2019s conduct so that those considering his nomination would know about this assault.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.943139,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.5538,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 81,\n", | |
| " \"text\": \"On July 6th, I had a sense of urgency to relay the information to the Senate and the president as soon as possible, before a nominee was selected.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 82,\n", | |
| " \"text\": \"I did not know how, specifically, to do this.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.724236,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 83,\n", | |
| " \"text\": \"I called my congressional representative and let her receptionist know that someone on the president\\u2019s shortlist had attacked me.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.572397,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.525007,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 84,\n", | |
| " \"text\": \"I also sent a message to the encrypted Washington Post confidential tip line.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 85,\n", | |
| " \"text\": \"I did not use my name, but I provided the names of Brett Kavanaugh and Mark Judge.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 86,\n", | |
| " \"text\": \"I stated that Mr. Kavanaugh had assaulted me in the 1980s in Maryland.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 87,\n", | |
| " \"text\": \"This was an extremely hard thing for me to do, but I felt that I couldn\\u2019t not do it.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.644641,\n", | |
| " \"tone_id\": \"sadness\",\n", | |
| " \"tone_name\": \"Sadness\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 88,\n", | |
| " \"text\": \"Over the next two days, I told a couple of close friends on the beach in Aptos, California, that Mr. Kavanaugh had sexually assaulted me.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 89,\n", | |
| " \"text\": \"I was very conflicted as to whether to speak out.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 90,\n", | |
| " \"text\": \"On July 9th, I received a return phone call from the office of Congresswoman Anna Eshoo after Mr. Kavanaugh had become the nominee.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 91,\n", | |
| " \"text\": \"I met with her staff on July 18th and with her on July 20th, describing the assault and discussing my fears about coming forward.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.600856,\n", | |
| " \"tone_id\": \"fear\",\n", | |
| " \"tone_name\": \"Fear\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 92,\n", | |
| " \"text\": \"Later, we discussed the possibility of sending a letter to Ranking Member Feinstein, who is one of my state senators, describing what occurred.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 93,\n", | |
| " \"text\": \"My understanding is that Representative Eshoo\\u2019s office delivered a copy of my letter to Senator Feinstein\\u2019s office on July 30th.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.506763,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 94,\n", | |
| " \"text\": \"The letter included my name, but also a request that it be kept confidential.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.908301,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 95,\n", | |
| " \"text\": \"My hope was that providing the information confidentially would be sufficient to allow the Senate to consider Mr. Kavanaugh\\u2019s serious misconduct without having to make myself, my family or anyone\\u2019s family vulnerable to the personal attacks and invasions of privacy that we have faced since my name became public.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.508382,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 96,\n", | |
| " \"text\": \"In a letter dated August 31st, Senator Feinstein wrote that she would not share the letter without my explicit consent, and I appreciated this commitment.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 97,\n", | |
| " \"text\": \"Sexual assault victims should be able to decide for themselves when and whether their private experience is made public.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.778006,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.638987,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 98,\n", | |
| " \"text\": \"As the hearing date got closer, I struggled with a terrible choice, Do I share the facts with the Senate and put myself and my family in the public spotlight, or do I preserve our privacy and allow the Senate to make its decision without knowing the full truth of his past behaviors?\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.512394,\n", | |
| " \"tone_id\": \"sadness\",\n", | |
| " \"tone_name\": \"Sadness\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.730481,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 99,\n", | |
| " \"text\": \"I agonized daily with this decision throughout August and September 2018.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.653099,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " }\n", | |
| " ]\n", | |
| "}\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "#Copied Text of Dr. Ford's testimony Openning statement\n", | |
| "Ford_Statement = 'OK. Thank you, Chairman Grassley and Ranking Member Feinstein, members of the committee. My name is Christine Blasey Ford. I am a professor of psychology at Palo Alto University and a research psychologist at the Stanford University School of Medicine. I won’t detail my educational background since it has already been summarized. I have been married to Russell Ford since 2002 and we have two children. I am here today not because I want to be. I am terrified. I am here because I believe it is my civic duty to tell you what happened to me while Brett Kavanaugh and I were in high school. I have described the events publicly before. I summarized them in my letter to Ranking Member Feinstein and again in a letter to Chairman Grassley. I understand and appreciate the importance of your hearing from me directly about what happened to me and the impact that it has had on my life and on my family. I grew up in the suburbs of Washington, D.C. I attended the Holton-Arms School in Bethesda, Maryland, from 1978 to 1984. Holton-Arms is an all-girls school that opened in 1901. \\\n", | |
| " During my time at this school, girls at Holton-Arms frequently met and became friendly with boys from all-boys schools in the area, including the Landon School, Georgetown Prep, Gonzaga High School, as well as our country clubs and other places where kids and families socialized. This is how I met Brett Kavanaugh, the boy who sexually assaulted me. During my freshman and sophomore school years, when I was 14 and 15 years old, my group of friends intersected with Brett and his friends for a short period of time. I had been friendly with a classmate of Brett’s for a short time during my freshman and sophomore year, and it was through that connection that I attended a number of parties that Brett also attended. We did not know each other well, but I knew him and he knew me. In the summer of 1982, like most summers, I spent most every day at the Columbia Country Club in Chevy Chase, Maryland, swimming and practicing diving. One evening that summer, after a day of diving at the club, I attended a small gathering at a house in the Bethesda area. There were four boys I remember specifically being there, Brett Kavanaugh, Mark Judge, a boy named P.J., and one other boy whose name I cannot recall. I also remember my friend Leland attending. I do not remember all of the details of how that gathering came together, but like many that summer, it was almost surely a spur-of-the-moment gathering. I truly wish I could be more helpful with more detailed answers to all of the questions that have and will be asked about how I got to the party and where it took place and so forth. I don’t have all the answers, and I don’t remember as much as I would like to. But the details that — about that night that bring me here today are the ones I will never forget. They have been seared into my memory, and have haunted me episodically as an adult. When I got to the small gathering, people were drinking beer in a small living room/family room-type area on the first floor of the house. I drank one beer. Brett and Mark were visibly drunk. Early in the evening, I went up a very narrow set of stairs leading from the living room to a second floor to use the restroom. When I got to the top of the stairs, I was pushed from behind into a bedroom across from the bathroom. I couldn’t see who pushed me. Brett and Mark came into the bedroom and locked the door behind them. There was music playing in the bedroom. It was turned up louder by either Brett or Mark once we were in the room. I was pushed onto the bed, and Brett got on top of me. He began running his hands over my body and grinding into me. I yelled, hoping that someone downstairs might hear me, and I tried to get away from him, but his weight was heavy. Brett groped me and tried to take off my clothes. He had a hard time, because he was very inebriated, and because I was wearing a one-piece bathing suit underneath my clothing. I believed he was going to rape me. I tried to yell for help. When I did, Brett put his hand over my mouth to stop me from yelling. This is what terrified me the most, and has had the most lasting impact on my life. It was hard for me to breathe, and I thought that Brett was accidentally going to kill me. Both Brett and Mark were drunkenly laughing during the attack. They seemed to be having a very good time. Mark seemed ambivalent, at times urging Brett on and at times telling him to stop. A couple of times, I made eye contact with Mark and thought he might try to help me, but he did not. During this assault, Mark came over and jumped on the bed twice while Brett was on top of me. And the last time that he did this, we toppled over and Brett was no longer on top of me. I was able to get up and run out of the room. Directly across from the bedroom was a small bathroom. I ran inside the bathroom and locked the door. I waited until I heard Brett and Mark leave the bedroom, laughing and loudly walk down the narrow stairway, pinballing off the walls on the way down. I waited, and when I did not hear them come back up the stairs, I left the bathroom, went down the same stairwell through the living room, and left the house. I remember being on the street and feeling this enormous sense of relief that I had escaped that house and that Brett and Mark were not coming outside after me. Brett’s assault on me drastically altered my life. For a very long time, I was too afraid and ashamed to tell anyone these details. I did not want to tell my parents that I, at age 15, was in a house without any parents present, drinking beer with boys. I convinced myself that because Brett did not rape me, I should just move on and just pretend that it didn’t happen. Over the years, I told very, very few friends that I had this traumatic experience. I told my husband before we were married that I had experienced a sexual assault. I had never told the details to anyone — the specific details — until May 2012, during a couples counseling session. The reason this came up in counseling is that my husband and I had completed a very extensive, very long remodel of our home and I insisted on a second front door, an idea that he and others disagreed with and could not understand. In explaining why I wanted a second front door, I began to describe the assault in detail. I recall saying that the boy who assaulted me could someday be on the U.S. Supreme Court, and spoke a bit about his background at an elitist all-boys school in Bethesda, Maryland. My husband recalls that I named my attacker as Brett Kavanaugh. After that May 2012 therapy session, I did my best to ignore the memories of the assault, because recounting them caused me to relive the experience, and caused panic and anxiety. Occasionally, I would discuss the assault in an individual therapy session, but talking about it caused more reliving of the trauma, so I tried not to think about it or discuss it. But over the years, I went through periods where I thought about the attack. I had confided in some close friends that I had had an experience with sexual assault. Occasionally, I stated that my assailant was a prominent lawyer or judge, but I did not use his name.\\\n", | |
| " I do not recall each person I spoke to about Brett’s assault. And some friends have reminded me of these conversations since the publication of the Washington Post story on September 16th, 2018. But until July 2018, I had never named Mr. Kavanaugh as my attacker outside of therapy. This changed in early July 2018. I saw press reports stating that Brett Kavanaugh was on the shortlist of a list of very well-qualified Supreme Court nominees. I thought it was my civic duty to relay the information I had about Mr. Kavanaugh’s conduct so that those considering his nomination would know about this assault. On July 6th, I had a sense of urgency to relay the information to the Senate and the president as soon as possible, before a nominee was selected. I did not know how, specifically, to do this. I called my congressional representative and let her receptionist know that someone on the president’s shortlist had attacked me. I also sent a message to the encrypted Washington Post confidential tip line. I did not use my name, but I provided the names of Brett Kavanaugh and Mark Judge. I stated that Mr. Kavanaugh had assaulted me in the 1980s in Maryland. This was an extremely hard thing for me to do, but I felt that I couldn’t not do it. Over the next two days, I told a couple of close friends on the beach in Aptos, California, that Mr. Kavanaugh had sexually assaulted me. I was very conflicted as to whether to speak out. On July 9th, I received a return phone call from the office of Congresswoman Anna Eshoo after Mr. Kavanaugh had become the nominee. I met with her staff on July 18th and with her on July 20th, describing the assault and discussing my fears about coming forward. Later, we discussed the possibility of sending a letter to Ranking Member Feinstein, who is one of my state senators, describing what occurred. My understanding is that Representative Eshoo’s office delivered a copy of my letter to Senator Feinstein’s office on July 30th. The letter included my name, but also a request that it be kept confidential. My hope was that providing the information confidentially would be sufficient to allow the Senate to consider Mr. Kavanaugh’s serious misconduct without having to make myself, my family or anyone’s family vulnerable to the personal attacks and invasions of privacy that we have faced since my name became public. In a letter dated August 31st, Senator Feinstein wrote that she would not share the letter without my explicit consent, and I appreciated this commitment. Sexual assault victims should be able to decide for themselves when and whether their private experience is made public. As the hearing date got closer, I struggled with a terrible choice, Do I share the facts with the Senate and put myself and my family in the public spotlight, or do I preserve our privacy and allow the Senate to make its decision without knowing the full truth of his past behaviors? I agonized daily with this decision throughout August and September 2018. The sense of duty that originally motivated me to reach out confidentially to The Washington Post and to Anna Eshoo’s office when there was still a list of extremely qualified candidates — and to Senator Feinstein — was always there, but my fears of the consequences of speaking out started to exponentially increase. During August 2018, the press reported that Mr. Kavanaugh’s confirmation was virtually certain. Persons painted him as a champion of women’s rights and empowerment. And I believed that if I came forward, my single voice would be drowned out by a chorus of powerful supporters. By the time of the confirmation hearings, I had resigned myself to remaining quiet and letting the committee and the Senate make their decision without knowing what Mr. Kavanaugh had done to me. Once the press started reporting on the existence of the letter I had sent to Senator Feinstein, I faced mounting pressure. Reporters appeared at my home and at my workplace, demanding information about the letter in the presence of my graduate students. They called my bosses and co-workers, and left me many messages, making it clear that my name would inevitably be released to the media. I decided to speak out publicly to a journalist who had originally responded to the tip I had sent to the Washington Post and who had gained my trust. It was important for me to describe the details of the assault in my own words. Since September 16th, the date of the Washington Post’s story, I have experienced an outpouring of support from people in every state of this country. Thousands and thousands of people who have had their lives dramatically altered by sexual violence have reached out to share their experience and have thanked me for coming forward. We have received tremendous support from our friends and our community. At the same time, my greatest fears have been realized and the reality has been far worse than what I expected. My family and I have been the target of constant harassment and death threats, and I have been called the most vile and hateful names imaginable. These messages, while far fewer than the expressions of support, have been terrifying and have rocked me to my core. People have posted my personal information and that of my parents online on the Internet. This has resulted in additional e-mails, calls and threats. My family and I were forced to move out of our home. Since September 16th, my family and I have been visiting in various secure locales, at times separated and at times together, with the help of security guards. This past Tuesday evening, my work e-mail was hacked and messages were sent out trying to recant my description of the sexual assault. Apart from the assault itself, these past couple of weeks have been the hardest of my life. I’ve had to relive this trauma in front of the world. And I’ve seen my life picked apart by people on television, on Twitter, other social media, other media and in this body, who have never met me or spoken with me. I have been accused of acting out of partisan political motives. Those who say that do not know me. I’m an independent person and I am no one’s pawn.\\\n", | |
| " My motivation in coming forward was to be helpful and to provide facts about how Mr. Kavanaugh’s actions have damaged my life, so that you could take into a serious consideration as you make your decision about how to proceed. FORD: It is not my responsibility to determine whether Mr. Kavanaugh deserves to sit on the Supreme Court. My responsibility is to tell you the truth. I understand that a professional prosecutor has been hired to ask me questions, and I’m committed to doing my very best to answer them. I have never been questioned by a prosecutor, and I will do my best. At the same time, because the committee members will be judging my credibility, I do hope to be able to engage directly with each of you. And at this point, I will do my best to answer your questions, and would request some caffeine.'\n", | |
| "\n", | |
| "tone_analysis = tone_analyzer.tone(\n", | |
| " {'text': Ford_Statement},\n", | |
| " 'application/json'\n", | |
| ").get_result()\n", | |
| "Ford_results = json.dumps(tone_analysis, indent=2)\n", | |
| "print(Ford_results)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 225, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "#save outout to external file\n", | |
| "with open('Ford_results.json', 'w') as outfile:\n", | |
| " json.dump(tone_analysis, outfile, sort_keys = True, indent =4, ensure_ascii = False)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 226, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "{'document_tone': {'tones': [{'score': 0.527994, 'tone_id': 'joy', 'tone_name': 'Joy'}, {'score': 0.630239, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, 'sentences_tone': [{'sentence_id': 0, 'text': 'OK. Thank you, Chairman Grassley and Ranking Member Feinstein, members of the committee.', 'tones': [{'score': 0.509368, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 1, 'text': 'My name is Christine Blasey Ford.', 'tones': []}, {'sentence_id': 2, 'text': 'I am a professor of psychology at Palo Alto University and a research psychologist at the Stanford University School of Medicine.', 'tones': []}, {'sentence_id': 3, 'text': 'I won’t detail my educational background since it has already been summarized.', 'tones': [{'score': 0.502139, 'tone_id': 'joy', 'tone_name': 'Joy'}]}, {'sentence_id': 4, 'text': 'I have been married to Russell Ford since 2002 and we have two children.', 'tones': []}, {'sentence_id': 5, 'text': 'I am here today not because I want to be.', 'tones': [{'score': 0.687768, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 6, 'text': 'I am terrified.', 'tones': []}, {'sentence_id': 7, 'text': 'I am here because I believe it is my civic duty to tell you what happened to me while Brett Kavanaugh and I were in high school.', 'tones': []}, {'sentence_id': 8, 'text': 'I have described the events publicly before.', 'tones': []}, {'sentence_id': 9, 'text': 'I summarized them in my letter to Ranking Member Feinstein and again in a letter to Chairman Grassley.', 'tones': []}, {'sentence_id': 10, 'text': 'I understand and appreciate the importance of your hearing from me directly about what happened to me and the impact that it has had on my life and on my family.', 'tones': [{'score': 0.662733, 'tone_id': 'joy', 'tone_name': 'Joy'}, {'score': 0.607667, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 11, 'text': 'I grew up in the suburbs of Washington, D.C.', 'tones': []}, {'sentence_id': 12, 'text': 'I attended the Holton-Arms School in Bethesda, Maryland, from 1978 to 1984.', 'tones': []}, {'sentence_id': 13, 'text': 'Holton-Arms is an all-girls school that opened in 1901.', 'tones': []}, {'sentence_id': 14, 'text': 'During my time at this school, girls at Holton-Arms frequently met and became friendly with boys from all-boys schools in the area, including the Landon School, Georgetown Prep, Gonzaga High School, as well as our country clubs and other places where kids and families socialized.', 'tones': [{'score': 0.640752, 'tone_id': 'joy', 'tone_name': 'Joy'}]}, {'sentence_id': 15, 'text': 'This is how I met Brett Kavanaugh, the boy who sexually assaulted me.', 'tones': []}, {'sentence_id': 16, 'text': 'During my freshman and sophomore school years, when I was 14 and 15 years old, my group of friends intersected with Brett and his friends for a short period of time.', 'tones': [{'score': 0.537159, 'tone_id': 'sadness', 'tone_name': 'Sadness'}]}, {'sentence_id': 17, 'text': 'I had been friendly with a classmate of Brett’s for a short time during my freshman and sophomore year, and it was through that connection that I attended a number of parties that Brett also attended.', 'tones': []}, {'sentence_id': 18, 'text': 'We did not know each other well, but I knew him and he knew me.', 'tones': [{'score': 0.882284, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 19, 'text': 'In the summer of 1982, like most summers, I spent most every day at the Columbia Country Club in Chevy Chase, Maryland, swimming and practicing diving.', 'tones': [{'score': 0.627077, 'tone_id': 'joy', 'tone_name': 'Joy'}]}, {'sentence_id': 20, 'text': 'One evening that summer, after a day of diving at the club, I attended a small gathering at a house in the Bethesda area.', 'tones': []}, {'sentence_id': 21, 'text': 'There were four boys I remember specifically being there, Brett Kavanaugh, Mark Judge, a boy named P.J., and one other boy whose name I cannot recall.', 'tones': [{'score': 0.644721, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 22, 'text': 'I also remember my friend Leland attending.', 'tones': [{'score': 0.538922, 'tone_id': 'sadness', 'tone_name': 'Sadness'}, {'score': 0.801827, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 23, 'text': 'I do not remember all of the details of how that gathering came together, but like many that summer, it was almost surely a spur-of-the-moment gathering.', 'tones': [{'score': 0.58176, 'tone_id': 'joy', 'tone_name': 'Joy'}, {'score': 0.73677, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 24, 'text': 'I truly wish I could be more helpful with more detailed answers to all of the questions that have and will be asked about how I got to the party and where it took place and so forth.', 'tones': [{'score': 0.518175, 'tone_id': 'sadness', 'tone_name': 'Sadness'}, {'score': 0.812763, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 25, 'text': 'I don’t have all the answers, and I don’t remember as much as I would like to.', 'tones': [{'score': 0.855572, 'tone_id': 'analytical', 'tone_name': 'Analytical'}, {'score': 0.66371, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 26, 'text': 'But the details that — about that night that bring me here today are the ones I will never forget.', 'tones': []}, {'sentence_id': 27, 'text': 'They have been seared into my memory, and have haunted me episodically as an adult.', 'tones': [{'score': 0.532616, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 28, 'text': 'When I got to the small gathering, people were drinking beer in a small living room/family room-type area on the first floor of the house.', 'tones': []}, {'sentence_id': 29, 'text': 'I drank one beer.', 'tones': [{'score': 0.622907, 'tone_id': 'joy', 'tone_name': 'Joy'}]}, {'sentence_id': 30, 'text': 'Brett and Mark were visibly drunk.', 'tones': []}, {'sentence_id': 31, 'text': 'Early in the evening, I went up a very narrow set of stairs leading from the living room to a second floor to use the restroom.', 'tones': [{'score': 0.509368, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 32, 'text': 'When I got to the top of the stairs, I was pushed from behind into a bedroom across from the bathroom.', 'tones': []}, {'sentence_id': 33, 'text': 'I couldn’t see who pushed me.', 'tones': []}, {'sentence_id': 34, 'text': 'Brett and Mark came into the bedroom and locked the door behind them.', 'tones': []}, {'sentence_id': 35, 'text': 'There was music playing in the bedroom.', 'tones': [{'score': 0.601107, 'tone_id': 'joy', 'tone_name': 'Joy'}]}, {'sentence_id': 36, 'text': 'It was turned up louder by either Brett or Mark once we were in the room.', 'tones': [{'score': 0.595347, 'tone_id': 'analytical', 'tone_name': 'Analytical'}, {'score': 0.615352, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 37, 'text': 'I was pushed onto the bed, and Brett got on top of me.', 'tones': []}, {'sentence_id': 38, 'text': 'He began running his hands over my body and grinding into me.', 'tones': []}, {'sentence_id': 39, 'text': 'I yelled, hoping that someone downstairs might hear me, and I tried to get away from him, but his weight was heavy.', 'tones': [{'score': 0.939052, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 40, 'text': 'Brett groped me and tried to take off my clothes.', 'tones': [{'score': 0.955445, 'tone_id': 'analytical', 'tone_name': 'Analytical'}, {'score': 0.5538, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 41, 'text': 'He had a hard time, because he was very inebriated, and because I was wearing a one-piece bathing suit underneath my clothing.', 'tones': [{'score': 0.629172, 'tone_id': 'sadness', 'tone_name': 'Sadness'}, {'score': 0.731735, 'tone_id': 'analytical', 'tone_name': 'Analytical'}, {'score': 0.579436, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 42, 'text': 'I believed he was going to rape me.', 'tones': [{'score': 0.88939, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 43, 'text': 'I tried to yell for help.', 'tones': [{'score': 0.75152, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 44, 'text': 'When I did, Brett put his hand over my mouth to stop me from yelling.', 'tones': [{'score': 0.529036, 'tone_id': 'anger', 'tone_name': 'Anger'}]}, {'sentence_id': 45, 'text': 'This is what terrified me the most, and has had the most lasting impact on my life.', 'tones': [{'score': 0.935297, 'tone_id': 'fear', 'tone_name': 'Fear'}, {'score': 0.58393, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 46, 'text': 'It was hard for me to breathe, and I thought that Brett was accidentally going to kill me.', 'tones': [{'score': 0.542689, 'tone_id': 'fear', 'tone_name': 'Fear'}, {'score': 0.620279, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 47, 'text': 'Both Brett and Mark were drunkenly laughing during the attack.', 'tones': []}, {'sentence_id': 48, 'text': 'They seemed to be having a very good time.', 'tones': [{'score': 0.64122, 'tone_id': 'joy', 'tone_name': 'Joy'}]}, {'sentence_id': 49, 'text': 'Mark seemed ambivalent, at times urging Brett on and at times telling him to stop.', 'tones': [{'score': 0.647986, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 50, 'text': 'A couple of times, I made eye contact with Mark and thought he might try to help me, but he did not.', 'tones': [{'score': 0.786991, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 51, 'text': 'During this assault, Mark came over and jumped on the bed twice while Brett was on top of me.', 'tones': []}, {'sentence_id': 52, 'text': 'And the last time that he did this, we toppled over and Brett was no longer on top of me.', 'tones': []}, {'sentence_id': 53, 'text': 'I was able to get up and run out of the room.', 'tones': []}, {'sentence_id': 54, 'text': 'Directly across from the bedroom was a small bathroom.', 'tones': [{'score': 0.660207, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 55, 'text': 'I ran inside the bathroom and locked the door.', 'tones': []}, {'sentence_id': 56, 'text': 'I waited until I heard Brett and Mark leave the bedroom, laughing and loudly walk down the narrow stairway, pinballing off the walls on the way down.', 'tones': []}, {'sentence_id': 57, 'text': 'I waited, and when I did not hear them come back up the stairs, I left the bathroom, went down the same stairwell through the living room, and left the house.', 'tones': [{'score': 0.549596, 'tone_id': 'sadness', 'tone_name': 'Sadness'}]}, {'sentence_id': 58, 'text': 'I remember being on the street and feeling this enormous sense of relief that I had escaped that house and that Brett and Mark were not coming outside after me.', 'tones': []}, {'sentence_id': 59, 'text': 'Brett’s assault on me drastically altered my life.', 'tones': []}, {'sentence_id': 60, 'text': 'For a very long time, I was too afraid and ashamed to tell anyone these details.', 'tones': [{'score': 0.83289, 'tone_id': 'fear', 'tone_name': 'Fear'}]}, {'sentence_id': 61, 'text': 'I did not want to tell my parents that I, at age 15, was in a house without any parents present, drinking beer with boys.', 'tones': [{'score': 0.519764, 'tone_id': 'joy', 'tone_name': 'Joy'}]}, {'sentence_id': 62, 'text': 'I convinced myself that because Brett did not rape me, I should just move on and just pretend that it didn’t happen.', 'tones': [{'score': 0.583407, 'tone_id': 'sadness', 'tone_name': 'Sadness'}, {'score': 0.786991, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 63, 'text': 'Over the years, I told very, very few friends that I had this traumatic experience.', 'tones': [{'score': 0.909949, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 64, 'text': 'I told my husband before we were married that I had experienced a sexual assault.', 'tones': []}, {'sentence_id': 65, 'text': 'I had never told the details to anyone — the specific details — until May 2012, during a couples counseling session.', 'tones': [{'score': 0.687931, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 66, 'text': 'The reason this came up in counseling is that my husband and I had completed a very extensive, very long remodel of our home and I insisted on a second front door, an idea that he and others disagreed with and could not understand.', 'tones': [{'score': 0.541591, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 67, 'text': 'In explaining why I wanted a second front door, I began to describe the assault in detail.', 'tones': []}, {'sentence_id': 68, 'text': 'I recall saying that the boy who assaulted me could someday be on the U.S. Supreme Court, and spoke a bit about his background at an elitist all-boys school in Bethesda, Maryland.', 'tones': []}, {'sentence_id': 69, 'text': 'My husband recalls that I named my attacker as Brett Kavanaugh.', 'tones': [{'score': 0.653099, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 70, 'text': 'After that May 2012 therapy session, I did my best to ignore the memories of the assault, because recounting them caused me to relive the experience, and caused panic and anxiety.', 'tones': [{'score': 0.870227, 'tone_id': 'fear', 'tone_name': 'Fear'}, {'score': 0.78314, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 71, 'text': 'Occasionally, I would discuss the assault in an individual therapy session, but talking about it caused more reliving of the trauma, so I tried not to think about it or discuss it.', 'tones': [{'score': 0.509873, 'tone_id': 'sadness', 'tone_name': 'Sadness'}, {'score': 0.810545, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 72, 'text': 'But over the years, I went through periods where I thought about the attack.', 'tones': [{'score': 0.7259, 'tone_id': 'fear', 'tone_name': 'Fear'}, {'score': 0.560098, 'tone_id': 'analytical', 'tone_name': 'Analytical'}, {'score': 0.681699, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 73, 'text': 'I had confided in some close friends that I had had an experience with sexual assault.', 'tones': [{'score': 0.615352, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 74, 'text': 'Occasionally, I stated that my assailant was a prominent lawyer or judge, but I did not use his name.', 'tones': [{'score': 0.839577, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 75, 'text': 'I do not recall each person I spoke to about Brett’s assault.', 'tones': [{'score': 0.620279, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 76, 'text': 'And some friends have reminded me of these conversations since the publication of the Washington Post story on September 16th, 2018.', 'tones': []}, {'sentence_id': 77, 'text': 'But until July 2018, I had never named Mr. Kavanaugh as my attacker outside of therapy.', 'tones': []}, {'sentence_id': 78, 'text': 'This changed in early July 2018.', 'tones': []}, {'sentence_id': 79, 'text': 'I saw press reports stating that Brett Kavanaugh was on the shortlist of a list of very well-qualified Supreme Court nominees.', 'tones': [{'score': 0.598602, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 80, 'text': 'I thought it was my civic duty to relay the information I had about Mr. Kavanaugh’s conduct so that those considering his nomination would know about this assault.', 'tones': [{'score': 0.943139, 'tone_id': 'analytical', 'tone_name': 'Analytical'}, {'score': 0.5538, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 81, 'text': 'On July 6th, I had a sense of urgency to relay the information to the Senate and the president as soon as possible, before a nominee was selected.', 'tones': []}, {'sentence_id': 82, 'text': 'I did not know how, specifically, to do this.', 'tones': [{'score': 0.724236, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 83, 'text': 'I called my congressional representative and let her receptionist know that someone on the president’s shortlist had attacked me.', 'tones': [{'score': 0.572397, 'tone_id': 'analytical', 'tone_name': 'Analytical'}, {'score': 0.525007, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 84, 'text': 'I also sent a message to the encrypted Washington Post confidential tip line.', 'tones': []}, {'sentence_id': 85, 'text': 'I did not use my name, but I provided the names of Brett Kavanaugh and Mark Judge.', 'tones': []}, {'sentence_id': 86, 'text': 'I stated that Mr. Kavanaugh had assaulted me in the 1980s in Maryland.', 'tones': []}, {'sentence_id': 87, 'text': 'This was an extremely hard thing for me to do, but I felt that I couldn’t not do it.', 'tones': [{'score': 0.644641, 'tone_id': 'sadness', 'tone_name': 'Sadness'}]}, {'sentence_id': 88, 'text': 'Over the next two days, I told a couple of close friends on the beach in Aptos, California, that Mr. Kavanaugh had sexually assaulted me.', 'tones': []}, {'sentence_id': 89, 'text': 'I was very conflicted as to whether to speak out.', 'tones': []}, {'sentence_id': 90, 'text': 'On July 9th, I received a return phone call from the office of Congresswoman Anna Eshoo after Mr. Kavanaugh had become the nominee.', 'tones': []}, {'sentence_id': 91, 'text': 'I met with her staff on July 18th and with her on July 20th, describing the assault and discussing my fears about coming forward.', 'tones': [{'score': 0.600856, 'tone_id': 'fear', 'tone_name': 'Fear'}]}, {'sentence_id': 92, 'text': 'Later, we discussed the possibility of sending a letter to Ranking Member Feinstein, who is one of my state senators, describing what occurred.', 'tones': []}, {'sentence_id': 93, 'text': 'My understanding is that Representative Eshoo’s office delivered a copy of my letter to Senator Feinstein’s office on July 30th.', 'tones': [{'score': 0.506763, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 94, 'text': 'The letter included my name, but also a request that it be kept confidential.', 'tones': [{'score': 0.908301, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 95, 'text': 'My hope was that providing the information confidentially would be sufficient to allow the Senate to consider Mr. Kavanaugh’s serious misconduct without having to make myself, my family or anyone’s family vulnerable to the personal attacks and invasions of privacy that we have faced since my name became public.', 'tones': [{'score': 0.508382, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 96, 'text': 'In a letter dated August 31st, Senator Feinstein wrote that she would not share the letter without my explicit consent, and I appreciated this commitment.', 'tones': []}, {'sentence_id': 97, 'text': 'Sexual assault victims should be able to decide for themselves when and whether their private experience is made public.', 'tones': [{'score': 0.778006, 'tone_id': 'analytical', 'tone_name': 'Analytical'}, {'score': 0.638987, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 98, 'text': 'As the hearing date got closer, I struggled with a terrible choice, Do I share the facts with the Senate and put myself and my family in the public spotlight, or do I preserve our privacy and allow the Senate to make its decision without knowing the full truth of his past behaviors?', 'tones': [{'score': 0.512394, 'tone_id': 'sadness', 'tone_name': 'Sadness'}, {'score': 0.730481, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 99, 'text': 'I agonized daily with this decision throughout August and September 2018.', 'tones': [{'score': 0.653099, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}]}\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "#openning the file for further Analysis\n", | |
| "# Excellent resource: https://www.youtube.com/watch?v=CUOgrrLXckM\n", | |
| "import json\n", | |
| "Ford_open_results= open(\"Ford_results.json\")\n", | |
| "\n", | |
| "Ford_results = json.load(Ford_open_results)\n", | |
| "\n", | |
| "print(Ford_results)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 251, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "#Converting to CSV for easier analysis and Pandas application\n", | |
| "import csv\n", | |
| "output_Ford_open_results = open('output_Ford_open_results.csv', 'w')\n", | |
| "\n", | |
| "outputWriter = csv.writer(output_Ford_open_results)\n", | |
| "\n", | |
| "for sentence in Ford_results['sentences_tone']:\n", | |
| " row_array= []\n", | |
| " row_array.append(sentence['sentence_id'])\n", | |
| " row_array.append(sentence['text'])\n", | |
| " for tone in sentence['tones']:\n", | |
| " row_array.append(tone['score'])\n", | |
| " row_array.append(tone['tone_id'])\n", | |
| " \n", | |
| " \n", | |
| " outputWriter.writerow(row_array) \n", | |
| "\n", | |
| "Ford_open_results.close()\n", | |
| "output_Ford_open_results.close()" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "# Kavanaugh's Openning Statement" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 228, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "{\n", | |
| " \"document_tone\": {\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.595371,\n", | |
| " \"tone_id\": \"joy\",\n", | |
| " \"tone_name\": \"Joy\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " \"sentences_tone\": [\n", | |
| " {\n", | |
| " \"sentence_id\": 0,\n", | |
| " \"text\": \"Mr. Chairman, Ranking Member Feinstein, members of the committee, thank you for allowing me to make my statement.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.747994,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 1,\n", | |
| " \"text\": \"I wrote it myself yesterday afternoon and evening.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.575441,\n", | |
| " \"tone_id\": \"joy\",\n", | |
| " \"tone_name\": \"Joy\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 2,\n", | |
| " \"text\": \"No one has seen a draft, or it, except for one of my former law clerks.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.506763,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 3,\n", | |
| " \"text\": \"This is my statement.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.920855,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 4,\n", | |
| " \"text\": \"Less than two weeks ago, Dr. Ford publicly accused me of committing wrongdoing at an event more than 36 years ago when we were both in high school.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.510839,\n", | |
| " \"tone_id\": \"sadness\",\n", | |
| " \"tone_name\": \"Sadness\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 5,\n", | |
| " \"text\": \"I denied the allegation immediately, categorically and unequivocally.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.767794,\n", | |
| " \"tone_id\": \"anger\",\n", | |
| " \"tone_name\": \"Anger\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.920855,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.898327,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 6,\n", | |
| " \"text\": \"All four people allegedly at the event, including Dr. Ford\\u2019s longtime friend, Ms. Keyser, have said they recall no such event.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.670204,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 7,\n", | |
| " \"text\": \"Her longtime friend, Ms. Keyser, said under penalty of felony that she does not know me, and does not believe she ever saw me at a party, ever.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 8,\n", | |
| " \"text\": \"Here is the quote from Ms. Keyser\\u2019s attorney\\u2019s letter, quote, \\u201cSimply put, Ms. Keyser does not know Mr. Kavanaugh, and she has no recollection of ever being at a party or gathering where he was present, with or without Dr.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.693233,\n", | |
| " \"tone_id\": \"joy\",\n", | |
| " \"tone_name\": \"Joy\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.638807,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 9,\n", | |
| " \"text\": \"Ford,\\u201d end quote.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.521804,\n", | |
| " \"tone_id\": \"joy\",\n", | |
| " \"tone_name\": \"Joy\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 10,\n", | |
| " \"text\": \"Think about that fact.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.998461,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.989586,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 11,\n", | |
| " \"text\": \"The day after the allegation appeared, I told this committee that I wanted a hearing as soon as possible to clear my name.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 12,\n", | |
| " \"text\": \"I demanded a hearing for the very next day.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.874372,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 13,\n", | |
| " \"text\": \"Unfortunately, it took the committee 10 days to get to this hearing.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.543112,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 14,\n", | |
| " \"text\": \"In those 10 long days, as was predictable, and as I predicted, my family and my name have been totally and permanently destroyed by vicious and false additional accusations.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 15,\n", | |
| " \"text\": \"The 10-day delay has been harmful to me and my family, to the Supreme Court and to the country.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.663727,\n", | |
| " \"tone_id\": \"sadness\",\n", | |
| " \"tone_name\": \"Sadness\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 16,\n", | |
| " \"text\": \"When this allegation first arose, I welcomed any kind of investigation, Senate, FBI or otherwise.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.968123,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 17,\n", | |
| " \"text\": \"The committee now has conducted a thorough investigation, and I\\u2019ve cooperated fully.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.543112,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 18,\n", | |
| " \"text\": \"I know that any kind of investigation \\u2014 Senate, FBI, Montgomery County Police \\u2014 whatever, will clear me.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.615352,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 19,\n", | |
| " \"text\": \"Listen to the people I know.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.57157,\n", | |
| " \"tone_id\": \"joy\",\n", | |
| " \"tone_name\": \"Joy\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.842108,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 20,\n", | |
| " \"text\": \"Listen to the people who\\u2019ve known me my whole life.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.762356,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 21,\n", | |
| " \"text\": \"Listen to the people I\\u2019ve grown up with, and worked with, and played with, and coached with, and dated, and taught, and gone to games with, and had beers with.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.666459,\n", | |
| " \"tone_id\": \"joy\",\n", | |
| " \"tone_name\": \"Joy\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 22,\n", | |
| " \"text\": \"And listen to the witnesses who allegedly were at this event 36 years ago.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.560098,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 23,\n", | |
| " \"text\": \"Listen to Ms. Keyser.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.756919,\n", | |
| " \"tone_id\": \"joy\",\n", | |
| " \"tone_name\": \"Joy\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 24,\n", | |
| " \"text\": \"She does not know me.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.882284,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 25,\n", | |
| " \"text\": \"I was not at the party described by Dr. Ford.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 26,\n", | |
| " \"text\": \"This confirmation process has become a national disgrace.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.931038,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 27,\n", | |
| " \"text\": \"The Constitution gives the Senate an important role in the confirmation process, but you have replaced advice and consent with search and destroy.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.736294,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 28,\n", | |
| " \"text\": \"Since my nomination in July, there\\u2019s been a frenzy on the left to come up with something, anything to block my confirmation.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.538763,\n", | |
| " \"tone_id\": \"sadness\",\n", | |
| " \"tone_name\": \"Sadness\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.786991,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.788547,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 29,\n", | |
| " \"text\": \"Shortly after I was nominated, the Democratic Senate leader said he would, quote, \\u201coppose me with everything he\\u2019s got.\\u201d\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.705784,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 30,\n", | |
| " \"text\": \"A Democratic senator on this committee publicly \\u2014 publicly referred to me as evil \\u2014 evil.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.560098,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 31,\n", | |
| " \"text\": \"Think about that word.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.982476,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 32,\n", | |
| " \"text\": \"It\\u2019s said that those who supported me were, quote, \\u201ccomplicit in evil.\\u201d\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 33,\n", | |
| " \"text\": \"Another Democratic senator on this committee said, quote, \\u201cJudge Kavanaugh is your worst nightmare.\\u201d\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 34,\n", | |
| " \"text\": \"A former head of the Democratic National Committee said, quote, \\u201cJudge Kavanaugh will threaten the lives of millions of Americans for decades to come.\\u201d\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.530052,\n", | |
| " \"tone_id\": \"sadness\",\n", | |
| " \"tone_name\": \"Sadness\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 35,\n", | |
| " \"text\": \"I understand the passions of the moment, but I would say to those senators, your words have meaning.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.524655,\n", | |
| " \"tone_id\": \"joy\",\n", | |
| " \"tone_name\": \"Joy\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.724236,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 36,\n", | |
| " \"text\": \"Millions of Americans listen carefully to you.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 37,\n", | |
| " \"text\": \"Given comments like those, is it any surprise that people have been willing to do anything to make any physical threat against my family, to send any violent e-mail to my wife, to make any kind of allegation against me and against my friends.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.926112,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 38,\n", | |
| " \"text\": \"To blow me up and take me down.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 39,\n", | |
| " \"text\": \"You sowed the wind for decades to come.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.59446,\n", | |
| " \"tone_id\": \"sadness\",\n", | |
| " \"tone_name\": \"Sadness\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 40,\n", | |
| " \"text\": \"I fear that the whole country will reap the whirlwind.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.95014,\n", | |
| " \"tone_id\": \"fear\",\n", | |
| " \"tone_name\": \"Fear\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 41,\n", | |
| " \"text\": \"The behavior of several of the Democratic members of this committee at my hearing a few weeks ago was an embarrassment.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 42,\n", | |
| " \"text\": \"But at least it was just a good old-fashioned attempt at Borking.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.946222,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 43,\n", | |
| " \"text\": \"Those efforts didn\\u2019t work.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 44,\n", | |
| " \"text\": \"When I did at least OK enough at the hearings that it looked like I might actually get confirmed, a new tactic was needed.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.702145,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 45,\n", | |
| " \"text\": \"Some of you were lying in wait and had it ready.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.63121,\n", | |
| " \"tone_id\": \"anger\",\n", | |
| " \"tone_name\": \"Anger\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.786991,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 46,\n", | |
| " \"text\": \"This first allegation was held in secret for weeks by a Democratic member of this committee, and by staff.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 47,\n", | |
| " \"text\": \"It would be needed only if you couldn\\u2019t take me out on the merits.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.73677,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 48,\n", | |
| " \"text\": \"When it was needed, this allegation was unleashed and publicly deployed over Dr. Ford\\u2019s wishes.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 49,\n", | |
| " \"text\": \"And then \\u2014 and then as no doubt was expected \\u2014 if not planned \\u2014 came a long series of false last-minute smears designed to scare me and drive me out of the process before any hearing occurred.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.754562,\n", | |
| " \"tone_id\": \"fear\",\n", | |
| " \"tone_name\": \"Fear\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.855691,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 50,\n", | |
| " \"text\": \"Crazy stuff.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 51,\n", | |
| " \"text\": \"Gangs, illegitimate children, fights on boats in Rhode Island.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 52,\n", | |
| " \"text\": \"All nonsense, reported breathlessly and often uncritically by the media.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.618451,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 53,\n", | |
| " \"text\": \"This has destroyed my family and my good name.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 54,\n", | |
| " \"text\": \"A good name built up through decades of very hard work and public service at the highest levels of the American government.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.571346,\n", | |
| " \"tone_id\": \"sadness\",\n", | |
| " \"tone_name\": \"Sadness\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.579436,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 55,\n", | |
| " \"text\": \"This whole two-week effort has been a calculated and orchestrated political hit, fueled with apparent pent-up anger about President Trump and the 2016 election.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.619422,\n", | |
| " \"tone_id\": \"anger\",\n", | |
| " \"tone_name\": \"Anger\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 56,\n", | |
| " \"text\": \"Fear that has been unfairly stoked about my judicial record.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.917143,\n", | |
| " \"tone_id\": \"fear\",\n", | |
| " \"tone_name\": \"Fear\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 57,\n", | |
| " \"text\": \"Revenge on behalf of the Clintons.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.508702,\n", | |
| " \"tone_id\": \"anger\",\n", | |
| " \"tone_name\": \"Anger\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 58,\n", | |
| " \"text\": \"and millions of dollars in money from outside left-wing opposition groups.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.653099,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 59,\n", | |
| " \"text\": \"This is a circus.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 60,\n", | |
| " \"text\": \"The consequences will extend long past my nomination.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.920855,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 61,\n", | |
| " \"text\": \"The consequences will be with us for decades.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.677581,\n", | |
| " \"tone_id\": \"sadness\",\n", | |
| " \"tone_name\": \"Sadness\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.920855,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 62,\n", | |
| " \"text\": \"This grotesque and coordinated character assassination will dissuade competent and good people of all political persuasions, from serving our country.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.618451,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 63,\n", | |
| " \"text\": \"And as we all know, in the United States political system of the early 2000s, what goes around comes around.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 64,\n", | |
| " \"text\": \"I am an optimistic guy.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 65,\n", | |
| " \"text\": \"I always try to be on the sunrise side of the mountain, to be optimistic about the day that is coming.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 66,\n", | |
| " \"text\": \"But today, I have to say that I fear for the future.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.980879,\n", | |
| " \"tone_id\": \"fear\",\n", | |
| " \"tone_name\": \"Fear\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.735644,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 67,\n", | |
| " \"text\": \"Last time I was here, I told this committee that a federal judge must be independent, not swayed by public or political pressure.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 68,\n", | |
| " \"text\": \"I said I was such a judge, and I am.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 69,\n", | |
| " \"text\": \"I will not be intimidated into withdrawing from this process.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 70,\n", | |
| " \"text\": \"You\\u2019ve tried hard.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.622311,\n", | |
| " \"tone_id\": \"sadness\",\n", | |
| " \"tone_name\": \"Sadness\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.946222,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 71,\n", | |
| " \"text\": \"You\\u2019ve given it your all.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.961633,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 72,\n", | |
| " \"text\": \"No one can question your effort, but your coordinated and well-funded effort to destroy my good name and to destroy my family will not drive me out.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.582677,\n", | |
| " \"tone_id\": \"anger\",\n", | |
| " \"tone_name\": \"Anger\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.574477,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 73,\n", | |
| " \"text\": \"The vile threats of violence against my family will not drive me out.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.60827,\n", | |
| " \"tone_id\": \"fear\",\n", | |
| " \"tone_name\": \"Fear\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 74,\n", | |
| " \"text\": \"You may defeat me in the final vote, but you\\u2019ll never get me to quit.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 75,\n", | |
| " \"text\": \"Never.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.996934,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 76,\n", | |
| " \"text\": \"I\\u2019m here today to tell the truth.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.751512,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 77,\n", | |
| " \"text\": \"I\\u2019ve never sexually assaulted anyone.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.822231,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 78,\n", | |
| " \"text\": \"Not in high school, not in college, not ever.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 79,\n", | |
| " \"text\": \"Sexual assault is horrific.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 80,\n", | |
| " \"text\": \"One of my closest friends to this day is a woman who was sexually abused and who, in the 1990s when we were in our 30s, confided in me about the abuse and sought my advice.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 81,\n", | |
| " \"text\": \"I was one of the only people she consulted.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 82,\n", | |
| " \"text\": \"Allegations of sexual assault must always be taken seriously, always.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.986078,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 83,\n", | |
| " \"text\": \"Those who make allegations always deserve to be heard.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.874372,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 84,\n", | |
| " \"text\": \"At the same time, the person who was the subject of the allegations also deserves to be heard.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.72085,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 85,\n", | |
| " \"text\": \"Due process is a foundation of the American rule of law.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.8152,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.63627,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 86,\n", | |
| " \"text\": \"Due process means listening to both sides.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 87,\n", | |
| " \"text\": \"As I told you at my hearing three weeks ago, I\\u2019m the only child of Martha and Ed Kavanaugh.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 88,\n", | |
| " \"text\": \"They\\u2019re here today.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 89,\n", | |
| " \"text\": \"When I was 10, my mom went to law school.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.618451,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 90,\n", | |
| " \"text\": \"And as a lawyer, she worked hard and overcame barriers, including the workplace sexual harassment that so many women faced (ph) at that time and still face today.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 91,\n", | |
| " \"text\": \"She became a trailblazer, one of Maryland\\u2019s earliest women prosecutors and trial judges.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 92,\n", | |
| " \"text\": \"She and my dad taught me the importance of equality and respect for all people, and she inspired me to be a lawyer and a judge.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.787354,\n", | |
| " \"tone_id\": \"joy\",\n", | |
| " \"tone_name\": \"Joy\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.509368,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 93,\n", | |
| " \"text\": \"Last time I was here, I told you that when my mom was a prosecutor and I was in high school, she used to practice her closing arguments at the dining room table, on my dad and me.As I told you, her trademark line was, \\u201cUse your common sense.\",\n", | |
| " \"tones\": []\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 94,\n", | |
| " \"text\": \"What rings true?\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.942582,\n", | |
| " \"tone_id\": \"confident\",\n", | |
| " \"tone_name\": \"Confident\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 95,\n", | |
| " \"text\": \"What rings false?\\u201d\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.513609,\n", | |
| " \"tone_id\": \"fear\",\n", | |
| " \"tone_name\": \"Fear\"\n", | |
| " },\n", | |
| " {\n", | |
| " \"score\": 0.842108,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 96,\n", | |
| " \"text\": \"Her trademark line is a good reminder, as we sit here today, some 36 years after the alleged event occurred when there is no corroboration and indeed it is refuted by the people allegedly there.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.702543,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 97,\n", | |
| " \"text\": \"After I\\u2019ve been in the public arena for 26 years without even a hint \\u2014 a whiff \\u2014 of an allegation like this.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.681699,\n", | |
| " \"tone_id\": \"tentative\",\n", | |
| " \"tone_name\": \"Tentative\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 98,\n", | |
| " \"text\": \"And when my nomination to the Supreme Court was just about to be voted on, at a time when I\\u2019m called \\u201cevil\\u201d by a Democratic member of this committee, while Democratic opponents of my nomination say people will die if I am confirmed.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.570095,\n", | |
| " \"tone_id\": \"analytical\",\n", | |
| " \"tone_name\": \"Analytical\"\n", | |
| " }\n", | |
| " ]\n", | |
| " },\n", | |
| " {\n", | |
| " \"sentence_id\": 99,\n", | |
| " \"text\": \"This onslaught of last-minute allegations does not ring true.\",\n", | |
| " \"tones\": [\n", | |
| " {\n", | |
| " \"score\": 0.520732,\n", | |
| " \"tone_id\": \"sadness\",\n", | |
| " \"tone_name\": \"Sadness\"\n", | |
| " }\n", | |
| " ]\n", | |
| " }\n", | |
| " ]\n", | |
| "}\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "#Copied Text of Judge Kavanuagh's testimony Openning statement\n", | |
| "Kavanaugh_Statement = 'Mr. Chairman, Ranking Member Feinstein, members of the committee, thank you for allowing me to make my statement. I wrote it myself yesterday afternoon and evening. No one has seen a draft, or it, except for one of my former law clerks. This is my statement. Less than two weeks ago, Dr. Ford publicly accused me of committing wrongdoing at an event more than 36 years ago when we were both in high school. I denied the allegation immediately, categorically and unequivocally. All four people allegedly at the event, including Dr. Ford’s longtime friend, Ms. Keyser, have said they recall no such event. Her longtime friend, Ms. Keyser, said under penalty of felony that she does not know me, and does not believe she ever saw me at a party, ever. Here is the quote from Ms. Keyser’s attorney’s letter, quote, “Simply put, Ms. Keyser does not know Mr. Kavanaugh, and she has no recollection of ever being at a party or gathering where he was present, with or without Dr. Ford,” end quote. Think about that fact. The day after the allegation appeared, I told this committee that I wanted a hearing as soon as possible to clear my name. I demanded a hearing for the very next day. Unfortunately, it took the committee 10 days to get to this hearing. In those 10 long days, as was predictable, and as I predicted, my family and my name have been totally and permanently destroyed by vicious and false additional accusations. The 10-day delay has been harmful to me and my family, to the Supreme Court and to the country. When this allegation first arose, I welcomed any kind of investigation, Senate, FBI or otherwise. The committee now has conducted a thorough investigation, and I’ve cooperated fully. I know that any kind of investigation — Senate, FBI, Montgomery County Police — whatever, will clear me. Listen to the people I know. Listen to the people who’ve known me my whole life. Listen to the people I’ve grown up with, and worked with, and played with, and coached with, and dated, and taught, and gone to games with, and had beers with. And listen to the witnesses who allegedly were at this event 36 years ago. Listen to Ms. Keyser. She does not know me. I was not at the party described by Dr. Ford. This confirmation process has become a national disgrace. The Constitution gives the Senate an important role in the confirmation process, but you have replaced advice and consent with search and destroy. Since my nomination in July, there’s been a frenzy on the left to come up with something, anything to block my confirmation. Shortly after I was nominated, the Democratic Senate leader said he would, quote, “oppose me with everything he’s got.” A Democratic senator on this committee publicly — publicly referred to me as evil — evil. Think about that word. It’s said that those who supported me were, quote, “complicit in evil.” Another Democratic senator on this committee said, quote, “Judge Kavanaugh is your worst nightmare.” A former head of the Democratic National Committee said, quote, “Judge Kavanaugh will threaten the lives of millions of Americans for decades to come.” I understand the passions of the moment, but I would say to those senators, your words have meaning. Millions of Americans listen carefully to you. Given comments like those, is it any surprise that people have been willing to do anything to make any physical threat against my family, to send any violent e-mail to my wife, to make any kind of allegation against me and against my friends. To blow me up and take me down. You sowed the wind for decades to come. I fear that the whole country will reap the whirlwind. The behavior of several of the Democratic members of this committee at my hearing a few weeks ago was an embarrassment. But at least it was just a good old-fashioned attempt at Borking. Those efforts didn’t work. When I did at least OK enough at the hearings that it looked like I might actually get confirmed, a new tactic was needed. Some of you were lying in wait and had it ready. This first allegation was held in secret for weeks by a Democratic member of this committee, and by staff. It would be needed only if you couldn’t take me out on the merits. When it was needed, this allegation was unleashed and publicly deployed over Dr. Ford’s wishes. And then — and then as no doubt was expected — if not planned — came a long series of false last-minute smears designed to scare me and drive me out of the process before any hearing occurred. Crazy stuff. Gangs, illegitimate children, fights on boats in Rhode Island. All nonsense, reported breathlessly and often uncritically by the media. This has destroyed my family and my good name. A good name built up through decades of very hard work and public service at the highest levels of the American government. This whole two-week effort has been a calculated and orchestrated political hit, fueled with apparent pent-up anger about President Trump and the 2016 election. Fear that has been unfairly stoked about my judicial record. Revenge on behalf of the Clintons. and millions of dollars in money from outside left-wing opposition groups. This is a circus. The consequences will extend long past my nomination. The consequences will be with us for decades. This grotesque and coordinated character assassination will dissuade competent and good people of all political persuasions, from serving our country. And as we all know, in the United States political system of the early 2000s, what goes around comes around. I am an optimistic guy. I always try to be on the sunrise side of the mountain, to be optimistic about the day that is coming. But today, I have to say that I fear for the future. Last time I was here, I told this committee that a federal judge must be independent, not swayed by public or political pressure. I said I was such a judge, and I am. I will not be intimidated into withdrawing from this process. You’ve tried hard. You’ve given it your all. No one can question your effort, but your coordinated and well-funded effort to destroy my good name and to destroy my family will not drive me out. The vile threats of violence against my family will not drive me out. You may defeat me in the final vote, but you’ll never get me to quit. Never. I’m here today to tell the truth. I’ve never sexually assaulted anyone. Not in high school, not in college, not ever. Sexual assault is horrific. One of my closest friends to this day is a woman who was sexually abused and who, in the 1990s when we were in our 30s, confided in me about the abuse and sought my advice. I was one of the only people she consulted. Allegations of sexual assault must always be taken seriously, always. Those who make allegations always deserve to be heard. At the same time, the person who was the subject of the allegations also deserves to be heard. Due process is a foundation of the American rule of law. Due process means listening to both sides. As I told you at my hearing three weeks ago, I’m the only child of Martha and Ed Kavanaugh. They’re here today. When I was 10, my mom went to law school. And as a lawyer, she worked hard and overcame barriers, including the workplace sexual harassment that so many women faced (ph) at that time and still face today. She became a trailblazer, one of Maryland’s earliest women prosecutors and trial judges. She and my dad taught me the importance of equality and respect for all people, and she inspired me to be a lawyer and a judge. Last time I was here, I told you that when my mom was a prosecutor and I was in high school, she used to practice her closing arguments at the dining room table, on my dad and me.As I told you, her trademark line was, “Use your common sense. What rings true? What rings false?” Her trademark line is a good reminder, as we sit here today, some 36 years after the alleged event occurred when there is no corroboration and indeed it is refuted by the people allegedly there. After I’ve been in the public arena for 26 years without even a hint — a whiff — of an allegation like this. And when my nomination to the Supreme Court was just about to be voted on, at a time when I’m called “evil” by a Democratic member of this committee, while Democratic opponents of my nomination say people will die if I am confirmed. This onslaught of last-minute allegations does not ring true. I’m not questioning that Dr. Ford may have been sexually assaulted by some person in some place at some time. But I have never done this. To her or to anyone. That’s not who I am. It is not who I was. I am innocent of this charge. I intend no ill will to Dr. Ford and her family.\\\n", | |
| " The other night, Ashley and my daughter, Liza, said their prayers. And little Liza — all of 10 years old — said to Ashley, “We should pray for the woman.” It’s a lot of wisdom from a 10-year old. We mean — we mean no ill will. First, let’s start with my career. For the last 26 years, since 1992, I have served in many high profile and sensitive government positions for which the FBI has investigated my background six separate times. Six separate FBI background investigations over 26 years. All of them after the elent (ph) — event alleged here. I have been in the public arena and under extreme public scrutiny for decades. In 1992, I worked for the Office of Solicitor General in the Department of Justice. In 1993, I clerked on the Supreme Court for Justice Anthony Kennedy. I spent 4 years at the Independent Counsel’s office during the 1990s. That office was the subject of enormous scrutiny from the media and the public. During 1998, the year of the impeachment of President Clinton, our office generally and I personally were in the middle of an intense national media and political spotlight. I and other leading members of Ken Starr’s office were opposition researched from head to toe, from birth through the present day. Recall the people who were exposed that year of 1998 as having in engaged in some sexual wrongdoing or indiscretions in their pasts. One person on the left even paid a million dollars for people to report evidence of sexual wrongdoing, and it worked. Exposed some prominent people. Nothing about me. From 2001 to 2006, I worked for President George W. Bush in the White House. As Staff Secretary, I was by President Bush’s side for 3 years and was entrusted with the nation’s most sensitive secrets. I traveled on Air Force One all over the country and the world with President Bush. I went everywhere with him, from Texas to Pakistan, from Alaska to Australia, from Buckingham Palace to the Vatican. Three years in the West Wing, 5 1/2 years in the White House. I was then nominated to be a judge on the D.C. Circuit. I was thoroughly vetted by the White House, the FBI, the American Bar Association, and this committee. I sat before this committee for two thorough confirmation hearings in 2004 and 2006. For the past 12 years leading up to my nomination for this job, I’ve served in a very public arena as a federal judge on what is often referred to as the second-most important court in the country. I’ve handled some of the most significant sensitive cases affecting the lives and liberties of the American people. I have been a good judge. And for this nomination, another FBI background investigation, another American Bar Association investigation, 31 hours of hearings, 65 senator meetings, 1,200 written questions, more than all previous Supreme Court nominees combined. Throughout that entire time, throughout my 53 years and 7 months on this Earth, until last week, no one ever accused me of any kind of sexual misconduct. No one, ever. A lifetime. A lifetime of public service and a lifetime of high-profile public service at the highest levels of American government and never a hint of anything of this kind, and that’s because nothing of this kind ever happened. Second, let’s turn to specifics. I categorically and unequivocally deny the allegation against me by Dr. Ford. I never had any sexual or physical encounter of any kind with Dr. Ford. I never attended a gathering like the one Dr. Ford describes in her allegation. I’ve never sexually assaulted Dr. Ford or anyone. Again, I am not questioning that Dr. Ford may have been sexually assaulted by some person in some place at some time. But I have never done that to her or to anyone. Dr. Ford’s allegation stems from a party that she alleges occurred during the summer of 1982, 36 years ago. I was 17 years old, between my junior and senior years of high school at Georgetown Prep, a rigorous all-boys Catholic Jesuit High School in Rockville, Maryland. When my friends and I spent time together at parties on weekends, it was usually the — with friends from nearby Catholic all-girls high schools, Stone Ridge, Holy Child, Visitation, Immaculata, Holy Cross. Dr. Ford did not attend one of those schools. She attended an independent private school named Holton-Arms and she was a year behind me. She and I did not travel in the same social circles. It is possible that we met at some point at some events, although I do not recall that. To repeat, all of the people identified by Dr. Ford as being present at the party have said they do not remember any such party ever happening. Importantly her friend, Ms. Keyser, has not only denied knowledge of the party, Ms. Keyser said under penalty of felony she does not know me, does not recall ever being at a party with me ever. And my two male friends who were allegedly there, who knew me well, have told this committee under penalty of felony that they do not recall any such party and that I never did or would do anything like this. Dr. Ford’s allegation is not merely uncorroborated, it is refuted by the very people she says were there, including by a long-time friend of hers. Refuted. Third, Dr. Ford has said that this event occurred at a house near Columbia Country Club, which is at the corner of Connecticut Avenue in the East-West Highway in Chevy Chase, Maryland. In her letter to Senator Feinstein, she said that there were four other people at the house but none of those people, nor I, lived near Columbia Country Club. As of the summer of 1982, Dr. Ford was 15 and could not drive yet and she did not live near Columbia Country Club. She says confidently that she had one beer at the party, but she does not say how she got to the house in question or how she got home or whose house it was. Fourth, I have submitted to this committee detailed calendars recording my activities in the summer of 1982. Why did I keep calendars? My dad started keeping detailed calendars of his life in 1978. He did so as both a calendar and a diary. He was a very organized guy, to put it mildly. Christmas time, we’d sit around and he regales us with old stories, old milestones, old weddings, old events from his calendars. In ninth grade — in ninth grade, in 1980, I started keeping calendars of my own. For me, also, it’s both a calendar and a diary.I’ve kept such calendar as diaries for the last 38 years; mine are not as good as my dad’s in some years.And when I was a kid, the calendars are about what you would expect from a kid; some goofy parts, some embarrassing parts. But I did have the summer of 1982 documented pretty well. The event described by Dr. Ford, presumably happened on a weekend because I believed everyone worked and had jobs in the summers. And in any event, a drunken early evening event of the kind she describes, presumably happened on a weekend. If it was a weekend, my calendars show that I was out of town almost every weekend night before football training camp started in late August. The only weekend nights that I was in D.C. were Friday, June 4, when I was with my dad at a pro golf tournament and had my high school achievement test at 830 the next morning. I also was in D.C. on Saturday night, August 7th. But I was at a small gathering at Becky’s house in Rockville with Matt, Denise, Laurie and Jenny. Their names are all listed on my calendar. I won’t use their last names here. And then on the weekend of August 20 to 22nd, I was staying at the Garrets’ (ph) with Pat (ph) and Chris (ph) as we did final preparations for football training camp that began on Sunday, the 22nd. As the calendars’ confirm, the — that weekend before a brutal training camp schedule was no time for parities. So let me emphasize this point. If the party described by Dr. Ford happened in the summer of 1982 on a weekend night, my calendar shows all but definitively that I was not there. During the weekdays in the summer of 1982, as you can see, I was out of town for two weeks of the summer for a trip to the beach with friends and at the legendary Five-Star Basketball Camp in Honesdale, Pennsylvania. When I was in town, I spent much of my time working, working out, lifting weights, playing basketball, or hanging out and having some beers with friends as we talked about life, and football, and school and girls. Some have noticed that I didn’t have church on Sundays on my calendars. I also didn’t list brushing my teeth. And for me, going to church on Sundays was like brushing my teeth, automatic. It still is. In the summer of 1981, I had worked construction. In the summer of 1982, my job was cutting lawns. I had my own business of sorts.\\\n", | |
| " You see some specifics about the lawn cutting listed on the August calendar page, when I had to time the last lawn cuttings of the summer of various lawns before football training camp. I played in a lot of summer league basketball games for the Georgetown Prep team at night at Blair High School in Silver Spring. Many nights, I worked out with other guys at Tobin’s house. He was the great quarterback on our football team and his dad ran workouts — or lifted weights at Georgetown Prep in preparation for the football season. I attended and watched many sporting events, as is my habit to this day. The calendars show a few weekday gatherings at friends’ houses after a workout or just to meet up and have some beers. But none of those gatherings included the group of people that Dr. Ford has identified. And as my calendars show, I was very precise about listing who was there; very precise. And keeping — keep in mind, my calendars also were diaries of sorts, forward-looking and backward-looking, just like my dad’s. You can see, for example, that I crossed out missed workouts and the canceled doctor’s appointments, and that I listed the precise people who had shown up for certain events. The calendars are obviously not dispositive on their own, but they are another piece of evidence for you to consider. Fifth, Dr. Ford’s allegation is radically inconsistent with my record and my character from my youth to the present day. As students at an all-boys catholic Jesuit school, many of us became friends and remain friends to this day with students at local catholic all-girls schools. One feature of my life that has remained true to the present day is that I have always had a lot of close female friends. I’m not talking about girlfriends; I’m talking about friends who are women. That started in high school. Maybe it was because I’m an only child and had no sisters. But anyway, we had no social media, or texts, or e-mail and we talked on the phone. I remember talking almost every night it seemed, to my friends Amy, or Julie, or Kristin, or Karen, or Suzanne, or Moira, or Megan, or Nikki (ph). The list goes on — friends for a lifetime, built on a foundation of talking through school and life, starting at age 14. Several of those great women are in the seats right behind me today. My friends and I sometimes got together and had parties on weekends. The drinking age was 18 in Maryland for most of my time in high school, and was 18 in D.C. for all of my time in high school. I drank beer with my friends. Almost everyone did. Sometimes I had too many beers. Sometimes others did. I liked beer. I still like beer. But I did not drink beer to the point of blacking out, and I never sexually assaulted anyone. There is a bright line between drinking beer, which I gladly do, and which I fully embrace, and sexually assaulting someone, which is a violent crime. If every American who drinks beer or every American who drank beer in high school is suddenly presumed guilty of sexual assault, will be an ugly, new place in this country. I never committed sexual assault. As high school students, we sometimes did goofy or stupid things. I doubt we are alone in looking back in high school and cringing at some things. For one thing, our yearbook was a disaster. I think some editors and students wanted the yearbook to be some combination of Animal House, Caddy Shack and Fast Times at Ridgemont High, which were all recent movies at that time. Many of us went along in the yearbook to the point of absurdity. This past week, my friends and I have cringed when we read about it and talked to each other. One thing in particular we’re sad about, one of our good — one of our good female friends who we would admire and went to dances with had her names used on the yearbook page with the term “alumnus.” That yearbook reference was clumsily intended to show affection, and that she was one of us. But in this circus, the media’s interpreted the term is related to sex. It was not related to sex. As the woman herself noted to the media on the record, she and I never had any six — sexual interaction of — at all. I’m so sorry to her for that yearbook reference. This may sound a bit trivial, given all that we are here for, but one thing I want to try to make sure — sure of in the future is my friendship with her. She was and is a great person. As to sex, this is not a topic I ever imagined would come up at a judicial confirmation hearing, but I want to give you a full picture of who I was. I never had sexual intercourse, or anything close to it, during high school, or for many years after that. In some crowds, I was probably a little outwardly shy about my inexperience; tried to hide that. At the same time, I was also inwardly proud of it. For me and the girls who I was friends with, that lack of major rampant sexual activity in high school was a matter of faith and respect and caution. The committee has a letter from 65 women who knew me in high school. They said that I always treated them with dignity and respect. That letter came together in one night, 35 years after graduation, while a sexual assault allegation was pending against me in a very fraught (ph) and public situation where they knew — they knew they’d be vilified if they defended me. Think about that. They put theirselves (sic) on the line for me. Those are some awesome women, and I love all of them. You also have a letter from women who knew me in college. Most were varsity athletes, and they described that I treated them as friends and equals, and supported them in their sports at a time when women’s sports was emerging in the wake of Title IX. I thank all of them for all of their texts, and their emails, and their support. One of those women friends from college, a self-described liberal and feminist, sent me a text last night that said, quote, “Deep breaths. You’re a good man, a good man, a good man.” A text yesterday from another of those women friends from college said, quote, “Brett, be strong. Pulling for you to my core.” A third text yesterday from yet another of those women I’m friends with from college said, “I’m holding you in the light of God.” As I said in my opening statement the last time I was with you, cherish your friends, look out for your friends, lift up your friends, love your friends. I’ve felt that love more over the last two weeks than I ever have in my life. I thank all my friends. I love all my friends. Throughout my life, I’ve devoted huge efforts to encouraging and promoting the careers of women. I will put my record up against anyone’s, male or female. I am proud of the letter from 84 women — 84 women — who worked with me at the Bush White House from 2001 to 2006, and described me as, quote, “a man of the highest integrity.” Read the op-ed from Sarah Day (ph) from Yarmouth, Maine. She worked in Oval Office operations, outside of President Bush’s office. Here’s what she recently wrote in centralmaine.com, and today she stands by her comments Quote, “Brett was an advocate for young women like me. He encouraged me to take on more responsibility and to feel confident in my role. In fact, during the 2004 Republican National Convention, Brett gave me the opportunity to help with the preparation and review of the president’s remarks, something I never (ph)… … “something I never would have had the chance to do if he had not included me. And he didn’t just include me in the work. He made sure I was at Madison Square Garden to watch the president’s speech, instead of back at the hotel, watching it on TV.” End quote. As a judge since 2006, I’ve had the privilege of hiring four recent law school graduates to serve as my law clerks each year. The law clerks for federal judges are the best and brightest graduates of American law schools. They work for one-year terms for judges after law school, and then they move on in their careers. For judges, training these young lawyers is an important responsibility. The clerks will become the next generation of American lawyers and leaders, judges and senators. Just after I took the bench in 2006, there was a major New York Times story about the low numbers of women law clerks at the Supreme Court and federal appeals courts. I took notice, and I took action. A majority of my 48 law clerks over the last 12 years have been women.\\\n", | |
| " In a letter to this committee, my women law clerks said I was one of the strongest advocates in the federal judiciary for women lawyers. And they wrote that the legal profession is fairer and more equal because of me. In my time on the bench, no federal judge — not a single one in the country — has sent more women law clerks to clerk on the Supreme Court than I have. Before this allegation arose two weeks ago, I was required to start making certain administrative preparations for my possible transfer to the Supreme Court, just in case I was confirmed. As part of that, I had to, in essence, contingently hire a first group of four law clerks who could be available to clerk at the Supreme Court for me on a moment’s notice. I did so, and contingently hired four law clerks. All four are women. If confirmed, I’ll be the first justice in the history of the Supreme Court to have a group of all-women law clerks. That is who I am. That is who I was. Over the past 12 years, I’ve taught constitutional law to hundreds of students, primarily at Harvard Law School, where (ph) I was hired by then-dean and now-Justice Elena Kagan. One of my former women students, a Democrat, testified to this committee that I was an even-handed professor who treats people fairly and with respect. In a letter to this committee, my former students — male and female alike — wrote that I displayed “a character that impressed us all.” I loved teaching law. But thanks to what some of you on this side of the committee have unleashed, I may never be able to teach again. For the past seven years, I’ve coached my two daughters’ basketball teams. You saw many of those girls when they came to my hearing for a couple of hours. You have a letter from the parents of the girls I coach, that describe my dedication, commitment and character. I coach because I know that a girl’s confidence on the basketball court translates into confidence in other aspects of life. I love coaching more than anything I’ve ever done in my whole life. But thanks to what some of you on this side of the committee have unleashed, I may never be able to coach again. I’ve been a judge for 12 years. I have a long record of service to America and to the Constitution. I revere the Constitution. I am deeply grateful to President Trump for nominating me. He was so gracious to my family and me on the July night he announced my nomination at the White House. I thank him for his steadfast support. When I accepted the president’s nomination, Ashley and I knew this process would be challenging. We never expected that it would devolve into this. Explaining this to our daughters has been about the worst experience of our lives. Ashley has been a rock. I thank God every day for Ashley and my family. We live in a country devoted to due process and the rule of law. That means taking allegations seriously. But if the mere allegation — the mere assertion of an allegation — a refuted allegation from 36 years ago is enough to destroy a person’s life and career, we will have abandoned the basic principles of fairness and due process that define our legal system and our country. I ask you to judge me by the standard that you would want applied to your father, your husband, your brother or your son. My family and I intend no ill will toward Dr. Ford or her family. But I swear today — under oath, before the Senate and the nation; before my family and God — I am innocent of this charge.'\n", | |
| "tone_analysis = tone_analyzer.tone(\n", | |
| " {'text': Kavanaugh_Statement},\n", | |
| " 'application/json'\n", | |
| ").get_result()\n", | |
| "Kavanaugh_results = json.dumps(tone_analysis, indent=2)\n", | |
| "print(Kavanaugh_results)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 229, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "#save outout to external file\n", | |
| "with open('Kavanaugh_results.json', 'w') as outfile:\n", | |
| " json.dump(tone_analysis, outfile, sort_keys = True, indent =4, ensure_ascii = False)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 230, | |
| "metadata": { | |
| "scrolled": true | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "{'document_tone': {'tones': [{'score': 0.595371, 'tone_id': 'joy', 'tone_name': 'Joy'}]}, 'sentences_tone': [{'sentence_id': 0, 'text': 'Mr. Chairman, Ranking Member Feinstein, members of the committee, thank you for allowing me to make my statement.', 'tones': [{'score': 0.747994, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 1, 'text': 'I wrote it myself yesterday afternoon and evening.', 'tones': [{'score': 0.575441, 'tone_id': 'joy', 'tone_name': 'Joy'}]}, {'sentence_id': 2, 'text': 'No one has seen a draft, or it, except for one of my former law clerks.', 'tones': [{'score': 0.506763, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 3, 'text': 'This is my statement.', 'tones': [{'score': 0.920855, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 4, 'text': 'Less than two weeks ago, Dr. Ford publicly accused me of committing wrongdoing at an event more than 36 years ago when we were both in high school.', 'tones': [{'score': 0.510839, 'tone_id': 'sadness', 'tone_name': 'Sadness'}]}, {'sentence_id': 5, 'text': 'I denied the allegation immediately, categorically and unequivocally.', 'tones': [{'score': 0.767794, 'tone_id': 'anger', 'tone_name': 'Anger'}, {'score': 0.920855, 'tone_id': 'analytical', 'tone_name': 'Analytical'}, {'score': 0.898327, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 6, 'text': 'All four people allegedly at the event, including Dr. Ford’s longtime friend, Ms. Keyser, have said they recall no such event.', 'tones': [{'score': 0.670204, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 7, 'text': 'Her longtime friend, Ms. Keyser, said under penalty of felony that she does not know me, and does not believe she ever saw me at a party, ever.', 'tones': []}, {'sentence_id': 8, 'text': 'Here is the quote from Ms. Keyser’s attorney’s letter, quote, “Simply put, Ms. Keyser does not know Mr. Kavanaugh, and she has no recollection of ever being at a party or gathering where he was present, with or without Dr.', 'tones': [{'score': 0.693233, 'tone_id': 'joy', 'tone_name': 'Joy'}, {'score': 0.638807, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 9, 'text': 'Ford,” end quote.', 'tones': [{'score': 0.521804, 'tone_id': 'joy', 'tone_name': 'Joy'}]}, {'sentence_id': 10, 'text': 'Think about that fact.', 'tones': [{'score': 0.998461, 'tone_id': 'analytical', 'tone_name': 'Analytical'}, {'score': 0.989586, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 11, 'text': 'The day after the allegation appeared, I told this committee that I wanted a hearing as soon as possible to clear my name.', 'tones': []}, {'sentence_id': 12, 'text': 'I demanded a hearing for the very next day.', 'tones': [{'score': 0.874372, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 13, 'text': 'Unfortunately, it took the committee 10 days to get to this hearing.', 'tones': [{'score': 0.543112, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 14, 'text': 'In those 10 long days, as was predictable, and as I predicted, my family and my name have been totally and permanently destroyed by vicious and false additional accusations.', 'tones': []}, {'sentence_id': 15, 'text': 'The 10-day delay has been harmful to me and my family, to the Supreme Court and to the country.', 'tones': [{'score': 0.663727, 'tone_id': 'sadness', 'tone_name': 'Sadness'}]}, {'sentence_id': 16, 'text': 'When this allegation first arose, I welcomed any kind of investigation, Senate, FBI or otherwise.', 'tones': [{'score': 0.968123, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 17, 'text': 'The committee now has conducted a thorough investigation, and I’ve cooperated fully.', 'tones': [{'score': 0.543112, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 18, 'text': 'I know that any kind of investigation — Senate, FBI, Montgomery County Police — whatever, will clear me.', 'tones': [{'score': 0.615352, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 19, 'text': 'Listen to the people I know.', 'tones': [{'score': 0.57157, 'tone_id': 'joy', 'tone_name': 'Joy'}, {'score': 0.842108, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 20, 'text': 'Listen to the people who’ve known me my whole life.', 'tones': [{'score': 0.762356, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 21, 'text': 'Listen to the people I’ve grown up with, and worked with, and played with, and coached with, and dated, and taught, and gone to games with, and had beers with.', 'tones': [{'score': 0.666459, 'tone_id': 'joy', 'tone_name': 'Joy'}]}, {'sentence_id': 22, 'text': 'And listen to the witnesses who allegedly were at this event 36 years ago.', 'tones': [{'score': 0.560098, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 23, 'text': 'Listen to Ms. Keyser.', 'tones': [{'score': 0.756919, 'tone_id': 'joy', 'tone_name': 'Joy'}]}, {'sentence_id': 24, 'text': 'She does not know me.', 'tones': [{'score': 0.882284, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 25, 'text': 'I was not at the party described by Dr. Ford.', 'tones': []}, {'sentence_id': 26, 'text': 'This confirmation process has become a national disgrace.', 'tones': [{'score': 0.931038, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 27, 'text': 'The Constitution gives the Senate an important role in the confirmation process, but you have replaced advice and consent with search and destroy.', 'tones': [{'score': 0.736294, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 28, 'text': 'Since my nomination in July, there’s been a frenzy on the left to come up with something, anything to block my confirmation.', 'tones': [{'score': 0.538763, 'tone_id': 'sadness', 'tone_name': 'Sadness'}, {'score': 0.786991, 'tone_id': 'tentative', 'tone_name': 'Tentative'}, {'score': 0.788547, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 29, 'text': 'Shortly after I was nominated, the Democratic Senate leader said he would, quote, “oppose me with everything he’s got.”', 'tones': [{'score': 0.705784, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 30, 'text': 'A Democratic senator on this committee publicly — publicly referred to me as evil — evil.', 'tones': [{'score': 0.560098, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 31, 'text': 'Think about that word.', 'tones': [{'score': 0.982476, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 32, 'text': 'It’s said that those who supported me were, quote, “complicit in evil.”', 'tones': []}, {'sentence_id': 33, 'text': 'Another Democratic senator on this committee said, quote, “Judge Kavanaugh is your worst nightmare.”', 'tones': []}, {'sentence_id': 34, 'text': 'A former head of the Democratic National Committee said, quote, “Judge Kavanaugh will threaten the lives of millions of Americans for decades to come.”', 'tones': [{'score': 0.530052, 'tone_id': 'sadness', 'tone_name': 'Sadness'}]}, {'sentence_id': 35, 'text': 'I understand the passions of the moment, but I would say to those senators, your words have meaning.', 'tones': [{'score': 0.524655, 'tone_id': 'joy', 'tone_name': 'Joy'}, {'score': 0.724236, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 36, 'text': 'Millions of Americans listen carefully to you.', 'tones': []}, {'sentence_id': 37, 'text': 'Given comments like those, is it any surprise that people have been willing to do anything to make any physical threat against my family, to send any violent e-mail to my wife, to make any kind of allegation against me and against my friends.', 'tones': [{'score': 0.926112, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 38, 'text': 'To blow me up and take me down.', 'tones': []}, {'sentence_id': 39, 'text': 'You sowed the wind for decades to come.', 'tones': [{'score': 0.59446, 'tone_id': 'sadness', 'tone_name': 'Sadness'}]}, {'sentence_id': 40, 'text': 'I fear that the whole country will reap the whirlwind.', 'tones': [{'score': 0.95014, 'tone_id': 'fear', 'tone_name': 'Fear'}]}, {'sentence_id': 41, 'text': 'The behavior of several of the Democratic members of this committee at my hearing a few weeks ago was an embarrassment.', 'tones': []}, {'sentence_id': 42, 'text': 'But at least it was just a good old-fashioned attempt at Borking.', 'tones': [{'score': 0.946222, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 43, 'text': 'Those efforts didn’t work.', 'tones': []}, {'sentence_id': 44, 'text': 'When I did at least OK enough at the hearings that it looked like I might actually get confirmed, a new tactic was needed.', 'tones': [{'score': 0.702145, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 45, 'text': 'Some of you were lying in wait and had it ready.', 'tones': [{'score': 0.63121, 'tone_id': 'anger', 'tone_name': 'Anger'}, {'score': 0.786991, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 46, 'text': 'This first allegation was held in secret for weeks by a Democratic member of this committee, and by staff.', 'tones': []}, {'sentence_id': 47, 'text': 'It would be needed only if you couldn’t take me out on the merits.', 'tones': [{'score': 0.73677, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 48, 'text': 'When it was needed, this allegation was unleashed and publicly deployed over Dr. Ford’s wishes.', 'tones': []}, {'sentence_id': 49, 'text': 'And then — and then as no doubt was expected — if not planned — came a long series of false last-minute smears designed to scare me and drive me out of the process before any hearing occurred.', 'tones': [{'score': 0.754562, 'tone_id': 'fear', 'tone_name': 'Fear'}, {'score': 0.855691, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 50, 'text': 'Crazy stuff.', 'tones': []}, {'sentence_id': 51, 'text': 'Gangs, illegitimate children, fights on boats in Rhode Island.', 'tones': []}, {'sentence_id': 52, 'text': 'All nonsense, reported breathlessly and often uncritically by the media.', 'tones': [{'score': 0.618451, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 53, 'text': 'This has destroyed my family and my good name.', 'tones': []}, {'sentence_id': 54, 'text': 'A good name built up through decades of very hard work and public service at the highest levels of the American government.', 'tones': [{'score': 0.571346, 'tone_id': 'sadness', 'tone_name': 'Sadness'}, {'score': 0.579436, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 55, 'text': 'This whole two-week effort has been a calculated and orchestrated political hit, fueled with apparent pent-up anger about President Trump and the 2016 election.', 'tones': [{'score': 0.619422, 'tone_id': 'anger', 'tone_name': 'Anger'}]}, {'sentence_id': 56, 'text': 'Fear that has been unfairly stoked about my judicial record.', 'tones': [{'score': 0.917143, 'tone_id': 'fear', 'tone_name': 'Fear'}]}, {'sentence_id': 57, 'text': 'Revenge on behalf of the Clintons.', 'tones': [{'score': 0.508702, 'tone_id': 'anger', 'tone_name': 'Anger'}]}, {'sentence_id': 58, 'text': 'and millions of dollars in money from outside left-wing opposition groups.', 'tones': [{'score': 0.653099, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 59, 'text': 'This is a circus.', 'tones': []}, {'sentence_id': 60, 'text': 'The consequences will extend long past my nomination.', 'tones': [{'score': 0.920855, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 61, 'text': 'The consequences will be with us for decades.', 'tones': [{'score': 0.677581, 'tone_id': 'sadness', 'tone_name': 'Sadness'}, {'score': 0.920855, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 62, 'text': 'This grotesque and coordinated character assassination will dissuade competent and good people of all political persuasions, from serving our country.', 'tones': [{'score': 0.618451, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 63, 'text': 'And as we all know, in the United States political system of the early 2000s, what goes around comes around.', 'tones': []}, {'sentence_id': 64, 'text': 'I am an optimistic guy.', 'tones': []}, {'sentence_id': 65, 'text': 'I always try to be on the sunrise side of the mountain, to be optimistic about the day that is coming.', 'tones': []}, {'sentence_id': 66, 'text': 'But today, I have to say that I fear for the future.', 'tones': [{'score': 0.980879, 'tone_id': 'fear', 'tone_name': 'Fear'}, {'score': 0.735644, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 67, 'text': 'Last time I was here, I told this committee that a federal judge must be independent, not swayed by public or political pressure.', 'tones': []}, {'sentence_id': 68, 'text': 'I said I was such a judge, and I am.', 'tones': []}, {'sentence_id': 69, 'text': 'I will not be intimidated into withdrawing from this process.', 'tones': []}, {'sentence_id': 70, 'text': 'You’ve tried hard.', 'tones': [{'score': 0.622311, 'tone_id': 'sadness', 'tone_name': 'Sadness'}, {'score': 0.946222, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 71, 'text': 'You’ve given it your all.', 'tones': [{'score': 0.961633, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 72, 'text': 'No one can question your effort, but your coordinated and well-funded effort to destroy my good name and to destroy my family will not drive me out.', 'tones': [{'score': 0.582677, 'tone_id': 'anger', 'tone_name': 'Anger'}, {'score': 0.574477, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 73, 'text': 'The vile threats of violence against my family will not drive me out.', 'tones': [{'score': 0.60827, 'tone_id': 'fear', 'tone_name': 'Fear'}]}, {'sentence_id': 74, 'text': 'You may defeat me in the final vote, but you’ll never get me to quit.', 'tones': []}, {'sentence_id': 75, 'text': 'Never.', 'tones': [{'score': 0.996934, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 76, 'text': 'I’m here today to tell the truth.', 'tones': [{'score': 0.751512, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 77, 'text': 'I’ve never sexually assaulted anyone.', 'tones': [{'score': 0.822231, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 78, 'text': 'Not in high school, not in college, not ever.', 'tones': []}, {'sentence_id': 79, 'text': 'Sexual assault is horrific.', 'tones': []}, {'sentence_id': 80, 'text': 'One of my closest friends to this day is a woman who was sexually abused and who, in the 1990s when we were in our 30s, confided in me about the abuse and sought my advice.', 'tones': []}, {'sentence_id': 81, 'text': 'I was one of the only people she consulted.', 'tones': []}, {'sentence_id': 82, 'text': 'Allegations of sexual assault must always be taken seriously, always.', 'tones': [{'score': 0.986078, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 83, 'text': 'Those who make allegations always deserve to be heard.', 'tones': [{'score': 0.874372, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 84, 'text': 'At the same time, the person who was the subject of the allegations also deserves to be heard.', 'tones': [{'score': 0.72085, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 85, 'text': 'Due process is a foundation of the American rule of law.', 'tones': [{'score': 0.8152, 'tone_id': 'analytical', 'tone_name': 'Analytical'}, {'score': 0.63627, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 86, 'text': 'Due process means listening to both sides.', 'tones': []}, {'sentence_id': 87, 'text': 'As I told you at my hearing three weeks ago, I’m the only child of Martha and Ed Kavanaugh.', 'tones': []}, {'sentence_id': 88, 'text': 'They’re here today.', 'tones': []}, {'sentence_id': 89, 'text': 'When I was 10, my mom went to law school.', 'tones': [{'score': 0.618451, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 90, 'text': 'And as a lawyer, she worked hard and overcame barriers, including the workplace sexual harassment that so many women faced (ph) at that time and still face today.', 'tones': []}, {'sentence_id': 91, 'text': 'She became a trailblazer, one of Maryland’s earliest women prosecutors and trial judges.', 'tones': []}, {'sentence_id': 92, 'text': 'She and my dad taught me the importance of equality and respect for all people, and she inspired me to be a lawyer and a judge.', 'tones': [{'score': 0.787354, 'tone_id': 'joy', 'tone_name': 'Joy'}, {'score': 0.509368, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 93, 'text': 'Last time I was here, I told you that when my mom was a prosecutor and I was in high school, she used to practice her closing arguments at the dining room table, on my dad and me.As I told you, her trademark line was, “Use your common sense.', 'tones': []}, {'sentence_id': 94, 'text': 'What rings true?', 'tones': [{'score': 0.942582, 'tone_id': 'confident', 'tone_name': 'Confident'}]}, {'sentence_id': 95, 'text': 'What rings false?”', 'tones': [{'score': 0.513609, 'tone_id': 'fear', 'tone_name': 'Fear'}, {'score': 0.842108, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 96, 'text': 'Her trademark line is a good reminder, as we sit here today, some 36 years after the alleged event occurred when there is no corroboration and indeed it is refuted by the people allegedly there.', 'tones': [{'score': 0.702543, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 97, 'text': 'After I’ve been in the public arena for 26 years without even a hint — a whiff — of an allegation like this.', 'tones': [{'score': 0.681699, 'tone_id': 'tentative', 'tone_name': 'Tentative'}]}, {'sentence_id': 98, 'text': 'And when my nomination to the Supreme Court was just about to be voted on, at a time when I’m called “evil” by a Democratic member of this committee, while Democratic opponents of my nomination say people will die if I am confirmed.', 'tones': [{'score': 0.570095, 'tone_id': 'analytical', 'tone_name': 'Analytical'}]}, {'sentence_id': 99, 'text': 'This onslaught of last-minute allegations does not ring true.', 'tones': [{'score': 0.520732, 'tone_id': 'sadness', 'tone_name': 'Sadness'}]}]}\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "#openning the file for further Analysis\n", | |
| "# Excellent resource: https://www.youtube.com/watch?v=CUOgrrLXckM\n", | |
| "import json\n", | |
| "Kavanaugh_open_results= open(\"Kavanaugh_results.json\")\n", | |
| "\n", | |
| "Kavanaugh_results = json.load(Kavanaugh_open_results)\n", | |
| "\n", | |
| "print(Kavanaugh_results)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 250, | |
| "metadata": {}, | |
| "outputs": [], | |
| "source": [ | |
| "#Converting to CSV for easier analysis and Pandas application\n", | |
| "import csv\n", | |
| "output_Kavanaugh_open_results = open('output_Kavanaugh_open_results.csv', 'w')\n", | |
| "\n", | |
| "outputWriter = csv.writer(output_Kavanaugh_open_results)\n", | |
| "for sentence in Kavanaugh_results['sentences_tone']:\n", | |
| " row_array= []\n", | |
| " row_array.append(sentence['sentence_id'])\n", | |
| " row_array.append(sentence['text'])\n", | |
| " for tone in sentence['tones']:\n", | |
| " row_array.append(tone['score'])\n", | |
| " row_array.append(tone['tone_id'])\n", | |
| " \n", | |
| " \n", | |
| " outputWriter.writerow(row_array) \n", | |
| " \n", | |
| "\n", | |
| "Kavanaugh_open_results.close()\n", | |
| "output_Kavanaugh_open_results.close()" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "# Further Analysis and data cleanup on Opening Statements\n", | |
| "## Ford" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 401, | |
| "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>sentence_id</th>\n", | |
| " <th>text</th>\n", | |
| " <th>score</th>\n", | |
| " <th>tone_id</th>\n", | |
| " <th>score2</th>\n", | |
| " <th>tone_id2</th>\n", | |
| " <th>score3</th>\n", | |
| " <th>tone_id3</th>\n", | |
| " </tr>\n", | |
| " </thead>\n", | |
| " <tbody>\n", | |
| " <tr>\n", | |
| " <th>0</th>\n", | |
| " <td>0.0</td>\n", | |
| " <td>OK. Thank you, Chairman Grassley and Ranking M...</td>\n", | |
| " <td>0.509368</td>\n", | |
| " <td>confident</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2</th>\n", | |
| " <td>1.0</td>\n", | |
| " <td>My name is Christine Blasey Ford.</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>3</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>4</th>\n", | |
| " <td>2.0</td>\n", | |
| " <td>I am a professor of psychology at Palo Alto Un...</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>5</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>6</th>\n", | |
| " <td>3.0</td>\n", | |
| " <td>I won’t detail my educational background since...</td>\n", | |
| " <td>0.502139</td>\n", | |
| " <td>joy</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>7</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>8</th>\n", | |
| " <td>4.0</td>\n", | |
| " <td>I have been married to Russell Ford since 2002...</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>9</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>10</th>\n", | |
| " <td>5.0</td>\n", | |
| " <td>I am here today not because I want to be.</td>\n", | |
| " <td>0.687768</td>\n", | |
| " <td>analytical</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>11</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>12</th>\n", | |
| " <td>6.0</td>\n", | |
| " <td>I am terrified.</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>13</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>14</th>\n", | |
| " <td>7.0</td>\n", | |
| " <td>I am here because I believe it is my civic dut...</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>15</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>16</th>\n", | |
| " <td>8.0</td>\n", | |
| " <td>I have described the events publicly before.</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>17</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>18</th>\n", | |
| " <td>9.0</td>\n", | |
| " <td>I summarized them in my letter to Ranking Memb...</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>19</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " </tbody>\n", | |
| "</table>\n", | |
| "</div>" | |
| ], | |
| "text/plain": [ | |
| " sentence_id text score \\\n", | |
| "0 0.0 OK. Thank you, Chairman Grassley and Ranking M... 0.509368 \n", | |
| "1 NaN NaN NaN \n", | |
| "2 1.0 My name is Christine Blasey Ford. NaN \n", | |
| "3 NaN NaN NaN \n", | |
| "4 2.0 I am a professor of psychology at Palo Alto Un... NaN \n", | |
| "5 NaN NaN NaN \n", | |
| "6 3.0 I won’t detail my educational background since... 0.502139 \n", | |
| "7 NaN NaN NaN \n", | |
| "8 4.0 I have been married to Russell Ford since 2002... NaN \n", | |
| "9 NaN NaN NaN \n", | |
| "10 5.0 I am here today not because I want to be. 0.687768 \n", | |
| "11 NaN NaN NaN \n", | |
| "12 6.0 I am terrified. NaN \n", | |
| "13 NaN NaN NaN \n", | |
| "14 7.0 I am here because I believe it is my civic dut... NaN \n", | |
| "15 NaN NaN NaN \n", | |
| "16 8.0 I have described the events publicly before. NaN \n", | |
| "17 NaN NaN NaN \n", | |
| "18 9.0 I summarized them in my letter to Ranking Memb... NaN \n", | |
| "19 NaN NaN NaN \n", | |
| "\n", | |
| " tone_id score2 tone_id2 score3 tone_id3 \n", | |
| "0 confident NaN NaN NaN NaN \n", | |
| "1 NaN NaN NaN NaN NaN \n", | |
| "2 NaN NaN NaN NaN NaN \n", | |
| "3 NaN NaN NaN NaN NaN \n", | |
| "4 NaN NaN NaN NaN NaN \n", | |
| "5 NaN NaN NaN NaN NaN \n", | |
| "6 joy NaN NaN NaN NaN \n", | |
| "7 NaN NaN NaN NaN NaN \n", | |
| "8 NaN NaN NaN NaN NaN \n", | |
| "9 NaN NaN NaN NaN NaN \n", | |
| "10 analytical NaN NaN NaN NaN \n", | |
| "11 NaN NaN NaN NaN NaN \n", | |
| "12 NaN NaN NaN NaN NaN \n", | |
| "13 NaN NaN NaN NaN NaN \n", | |
| "14 NaN NaN NaN NaN NaN \n", | |
| "15 NaN NaN NaN NaN NaN \n", | |
| "16 NaN NaN NaN NaN NaN \n", | |
| "17 NaN NaN NaN NaN NaN \n", | |
| "18 NaN NaN NaN NaN NaN \n", | |
| "19 NaN NaN NaN NaN NaN " | |
| ] | |
| }, | |
| "execution_count": 401, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "#Had some trouble here, had to convert\n", | |
| "#comma delimited file to CSV UTF-8 for python to read\n", | |
| "#Unfortunately, did this manually, if you know better way, LMK!\n", | |
| "\n", | |
| "Ford_data = pd.read_csv('output_Ford_open_results8.csv')\n", | |
| "Ford_data.columns = ['sentence_id', 'text', 'score',\n", | |
| " 'tone_id', 'score2', 'tone_id2', \n", | |
| " 'score3', 'tone_id3']\n", | |
| "\n", | |
| "\n", | |
| "Ford_data.head(n=20)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 402, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "sentence_id 100\n", | |
| "text 100\n", | |
| "score 56\n", | |
| "tone_id 56\n", | |
| "score2 18\n", | |
| "tone_id2 18\n", | |
| "score3 2\n", | |
| "tone_id3 2\n", | |
| "dtype: int64" | |
| ] | |
| }, | |
| "execution_count": 402, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "Ford_data.shape\n", | |
| "Ford_data.count()" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 406, | |
| "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>sentence_id</th>\n", | |
| " <th>text</th>\n", | |
| " <th>score</th>\n", | |
| " <th>tone_id</th>\n", | |
| " </tr>\n", | |
| " </thead>\n", | |
| " <tbody>\n", | |
| " <tr>\n", | |
| " <th>0</th>\n", | |
| " <td>0.0</td>\n", | |
| " <td>OK. Thank you, Chairman Grassley and Ranking M...</td>\n", | |
| " <td>0.509368</td>\n", | |
| " <td>confident</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2</th>\n", | |
| " <td>1.0</td>\n", | |
| " <td>My name is Christine Blasey Ford.</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>4</th>\n", | |
| " <td>2.0</td>\n", | |
| " <td>I am a professor of psychology at Palo Alto Un...</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>6</th>\n", | |
| " <td>3.0</td>\n", | |
| " <td>I won’t detail my educational background since...</td>\n", | |
| " <td>0.502139</td>\n", | |
| " <td>joy</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>8</th>\n", | |
| " <td>4.0</td>\n", | |
| " <td>I have been married to Russell Ford since 2002...</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>10</th>\n", | |
| " <td>5.0</td>\n", | |
| " <td>I am here today not because I want to be.</td>\n", | |
| " <td>0.687768</td>\n", | |
| " <td>analytical</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>12</th>\n", | |
| " <td>6.0</td>\n", | |
| " <td>I am terrified.</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>14</th>\n", | |
| " <td>7.0</td>\n", | |
| " <td>I am here because I believe it is my civic dut...</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>16</th>\n", | |
| " <td>8.0</td>\n", | |
| " <td>I have described the events publicly before.</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>18</th>\n", | |
| " <td>9.0</td>\n", | |
| " <td>I summarized them in my letter to Ranking Memb...</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>20</th>\n", | |
| " <td>10.0</td>\n", | |
| " <td>I understand and appreciate the importance of ...</td>\n", | |
| " <td>0.662733</td>\n", | |
| " <td>joy</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>22</th>\n", | |
| " <td>11.0</td>\n", | |
| " <td>I grew up in the suburbs of Washington, D.C.</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>24</th>\n", | |
| " <td>12.0</td>\n", | |
| " <td>I attended the Holton-Arms School in Bethesda,...</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>26</th>\n", | |
| " <td>13.0</td>\n", | |
| " <td>Holton-Arms is an all-girls school that opened...</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>28</th>\n", | |
| " <td>14.0</td>\n", | |
| " <td>During my time at this school, girls at Holton...</td>\n", | |
| " <td>0.640752</td>\n", | |
| " <td>joy</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>30</th>\n", | |
| " <td>15.0</td>\n", | |
| " <td>This is how I met Brett Kavanaugh, the boy who...</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>32</th>\n", | |
| " <td>16.0</td>\n", | |
| " <td>During my freshman and sophomore school years,...</td>\n", | |
| " <td>0.537159</td>\n", | |
| " <td>sadness</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>34</th>\n", | |
| " <td>17.0</td>\n", | |
| " <td>I had been friendly with a classmate of Brett’...</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>36</th>\n", | |
| " <td>18.0</td>\n", | |
| " <td>We did not know each other well, but I knew hi...</td>\n", | |
| " <td>0.882284</td>\n", | |
| " <td>analytical</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>38</th>\n", | |
| " <td>19.0</td>\n", | |
| " <td>In the summer of 1982, like most summers, I sp...</td>\n", | |
| " <td>0.627077</td>\n", | |
| " <td>joy</td>\n", | |
| " </tr>\n", | |
| " </tbody>\n", | |
| "</table>\n", | |
| "</div>" | |
| ], | |
| "text/plain": [ | |
| " sentence_id text score \\\n", | |
| "0 0.0 OK. Thank you, Chairman Grassley and Ranking M... 0.509368 \n", | |
| "2 1.0 My name is Christine Blasey Ford. NaN \n", | |
| "4 2.0 I am a professor of psychology at Palo Alto Un... NaN \n", | |
| "6 3.0 I won’t detail my educational background since... 0.502139 \n", | |
| "8 4.0 I have been married to Russell Ford since 2002... NaN \n", | |
| "10 5.0 I am here today not because I want to be. 0.687768 \n", | |
| "12 6.0 I am terrified. NaN \n", | |
| "14 7.0 I am here because I believe it is my civic dut... NaN \n", | |
| "16 8.0 I have described the events publicly before. NaN \n", | |
| "18 9.0 I summarized them in my letter to Ranking Memb... NaN \n", | |
| "20 10.0 I understand and appreciate the importance of ... 0.662733 \n", | |
| "22 11.0 I grew up in the suburbs of Washington, D.C. NaN \n", | |
| "24 12.0 I attended the Holton-Arms School in Bethesda,... NaN \n", | |
| "26 13.0 Holton-Arms is an all-girls school that opened... NaN \n", | |
| "28 14.0 During my time at this school, girls at Holton... 0.640752 \n", | |
| "30 15.0 This is how I met Brett Kavanaugh, the boy who... NaN \n", | |
| "32 16.0 During my freshman and sophomore school years,... 0.537159 \n", | |
| "34 17.0 I had been friendly with a classmate of Brett’... NaN \n", | |
| "36 18.0 We did not know each other well, but I knew hi... 0.882284 \n", | |
| "38 19.0 In the summer of 1982, like most summers, I sp... 0.627077 \n", | |
| "\n", | |
| " tone_id \n", | |
| "0 confident \n", | |
| "2 NaN \n", | |
| "4 NaN \n", | |
| "6 joy \n", | |
| "8 NaN \n", | |
| "10 analytical \n", | |
| "12 NaN \n", | |
| "14 NaN \n", | |
| "16 NaN \n", | |
| "18 NaN \n", | |
| "20 joy \n", | |
| "22 NaN \n", | |
| "24 NaN \n", | |
| "26 NaN \n", | |
| "28 joy \n", | |
| "30 NaN \n", | |
| "32 sadness \n", | |
| "34 NaN \n", | |
| "36 analytical \n", | |
| "38 joy " | |
| ] | |
| }, | |
| "execution_count": 406, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "# Seeing that score 2 and score 3 especially are really low, \n", | |
| "# I am choose to drop those value. I understand that sometines we have \n", | |
| "# many emotions at once, but for the purposes of this analysis, we'll make do with one.\n", | |
| "\n", | |
| "Ford_data.drop(['score2'], axis=1, inplace =True)\n", | |
| "Ford_data.dropna(how='all', inplace=True)\n", | |
| "Ford_data.head(n=20)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 407, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "(100, 4)" | |
| ] | |
| }, | |
| "execution_count": 407, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "Ford_data.shape" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 408, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "tone_id\n", | |
| "analytical 17\n", | |
| "anger 1\n", | |
| "confident 5\n", | |
| "fear 6\n", | |
| "joy 9\n", | |
| "sadness 9\n", | |
| "tentative 9\n", | |
| "Name: score, dtype: int64\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "Total_Tone = Ford_data.groupby('tone_id').score.count()\n", | |
| "print(Total_Tone)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 409, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "56" | |
| ] | |
| }, | |
| "execution_count": 409, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "Total_Tone.sum()" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 411, | |
| "metadata": { | |
| "scrolled": true | |
| }, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "tone_id\n", | |
| "analytical 30.357143\n", | |
| "anger 1.785714\n", | |
| "confident 8.928571\n", | |
| "fear 10.714286\n", | |
| "joy 16.071429\n", | |
| "sadness 16.071429\n", | |
| "tentative 16.071429\n", | |
| "Name: score, dtype: float64" | |
| ] | |
| }, | |
| "execution_count": 411, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "#Calculating percentage of tone sentences\n", | |
| "Total_Tone/Total_Tone.sum()*100\n" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "# Tone Analysis of Dr. Ford's Opening Statement\n", | |
| "The visualization below measures the total percentage of the invoked emotion per sentence relative to all other other sentences.\n", | |
| "We can see below that 30% of Dr. Ford's Statement were mainly analytical, i.e. logical, and that she was only 1.78% angry during the entire testimony. She was also not confident but sad and tentative. \n" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 412, | |
| "metadata": { | |
| "scrolled": true | |
| }, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/html": [ | |
| "\n", | |
| " <div class=\"bk-root\">\n", | |
| " <a href=\"https://bokeh.pydata.org\" target=\"_blank\" class=\"bk-logo bk-logo-small bk-logo-notebook\"></a>\n", | |
| " <span id=\"a9579831-4ad2-477f-874e-c79d5bb7085a\">Loading BokehJS ...</span>\n", | |
| " </div>" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/javascript": [ | |
| "\n", | |
| "(function(root) {\n", | |
| " function now() {\n", | |
| " return new Date();\n", | |
| " }\n", | |
| "\n", | |
| " var force = true;\n", | |
| "\n", | |
| " if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n", | |
| " root._bokeh_onload_callbacks = [];\n", | |
| " root._bokeh_is_loading = undefined;\n", | |
| " }\n", | |
| "\n", | |
| " var JS_MIME_TYPE = 'application/javascript';\n", | |
| " var HTML_MIME_TYPE = 'text/html';\n", | |
| " var EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", | |
| " var CLASS_NAME = 'output_bokeh rendered_html';\n", | |
| "\n", | |
| " /**\n", | |
| " * Render data to the DOM node\n", | |
| " */\n", | |
| " function render(props, node) {\n", | |
| " var script = document.createElement(\"script\");\n", | |
| " node.appendChild(script);\n", | |
| " }\n", | |
| "\n", | |
| " /**\n", | |
| " * Handle when an output is cleared or removed\n", | |
| " */\n", | |
| " function handleClearOutput(event, handle) {\n", | |
| " var cell = handle.cell;\n", | |
| "\n", | |
| " var id = cell.output_area._bokeh_element_id;\n", | |
| " var server_id = cell.output_area._bokeh_server_id;\n", | |
| " // Clean up Bokeh references\n", | |
| " if (id != null && id in Bokeh.index) {\n", | |
| " Bokeh.index[id].model.document.clear();\n", | |
| " delete Bokeh.index[id];\n", | |
| " }\n", | |
| "\n", | |
| " if (server_id !== undefined) {\n", | |
| " // Clean up Bokeh references\n", | |
| " var cmd = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", | |
| " cell.notebook.kernel.execute(cmd, {\n", | |
| " iopub: {\n", | |
| " output: function(msg) {\n", | |
| " var id = msg.content.text.trim();\n", | |
| " if (id in Bokeh.index) {\n", | |
| " Bokeh.index[id].model.document.clear();\n", | |
| " delete Bokeh.index[id];\n", | |
| " }\n", | |
| " }\n", | |
| " }\n", | |
| " });\n", | |
| " // Destroy server and session\n", | |
| " var cmd = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", | |
| " cell.notebook.kernel.execute(cmd);\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| " /**\n", | |
| " * Handle when a new output is added\n", | |
| " */\n", | |
| " function handleAddOutput(event, handle) {\n", | |
| " var output_area = handle.output_area;\n", | |
| " var output = handle.output;\n", | |
| "\n", | |
| " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", | |
| " if ((output.output_type != \"display_data\") || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n", | |
| " return\n", | |
| " }\n", | |
| "\n", | |
| " var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", | |
| "\n", | |
| " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", | |
| " toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n", | |
| " // store reference to embed id on output_area\n", | |
| " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", | |
| " }\n", | |
| " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", | |
| " var bk_div = document.createElement(\"div\");\n", | |
| " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", | |
| " var script_attrs = bk_div.children[0].attributes;\n", | |
| " for (var i = 0; i < script_attrs.length; i++) {\n", | |
| " toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", | |
| " }\n", | |
| " // store reference to server id on output_area\n", | |
| " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| " function register_renderer(events, OutputArea) {\n", | |
| "\n", | |
| " function append_mime(data, metadata, element) {\n", | |
| " // create a DOM node to render to\n", | |
| " var toinsert = this.create_output_subarea(\n", | |
| " metadata,\n", | |
| " CLASS_NAME,\n", | |
| " EXEC_MIME_TYPE\n", | |
| " );\n", | |
| " this.keyboard_manager.register_events(toinsert);\n", | |
| " // Render to node\n", | |
| " var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", | |
| " render(props, toinsert[toinsert.length - 1]);\n", | |
| " element.append(toinsert);\n", | |
| " return toinsert\n", | |
| " }\n", | |
| "\n", | |
| " /* Handle when an output is cleared or removed */\n", | |
| " events.on('clear_output.CodeCell', handleClearOutput);\n", | |
| " events.on('delete.Cell', handleClearOutput);\n", | |
| "\n", | |
| " /* Handle when a new output is added */\n", | |
| " events.on('output_added.OutputArea', handleAddOutput);\n", | |
| "\n", | |
| " /**\n", | |
| " * Register the mime type and append_mime function with output_area\n", | |
| " */\n", | |
| " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", | |
| " /* Is output safe? */\n", | |
| " safe: true,\n", | |
| " /* Index of renderer in `output_area.display_order` */\n", | |
| " index: 0\n", | |
| " });\n", | |
| " }\n", | |
| "\n", | |
| " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", | |
| " if (root.Jupyter !== undefined) {\n", | |
| " var events = require('base/js/events');\n", | |
| " var OutputArea = require('notebook/js/outputarea').OutputArea;\n", | |
| "\n", | |
| " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", | |
| " register_renderer(events, OutputArea);\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| " \n", | |
| " if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n", | |
| " root._bokeh_timeout = Date.now() + 5000;\n", | |
| " root._bokeh_failed_load = false;\n", | |
| " }\n", | |
| "\n", | |
| " var NB_LOAD_WARNING = {'data': {'text/html':\n", | |
| " \"<div style='background-color: #fdd'>\\n\"+\n", | |
| " \"<p>\\n\"+\n", | |
| " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", | |
| " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", | |
| " \"</p>\\n\"+\n", | |
| " \"<ul>\\n\"+\n", | |
| " \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n", | |
| " \"<li>use INLINE resources instead, as so:</li>\\n\"+\n", | |
| " \"</ul>\\n\"+\n", | |
| " \"<code>\\n\"+\n", | |
| " \"from bokeh.resources import INLINE\\n\"+\n", | |
| " \"output_notebook(resources=INLINE)\\n\"+\n", | |
| " \"</code>\\n\"+\n", | |
| " \"</div>\"}};\n", | |
| "\n", | |
| " function display_loaded() {\n", | |
| " var el = document.getElementById(\"a9579831-4ad2-477f-874e-c79d5bb7085a\");\n", | |
| " if (el != null) {\n", | |
| " el.textContent = \"BokehJS is loading...\";\n", | |
| " }\n", | |
| " if (root.Bokeh !== undefined) {\n", | |
| " if (el != null) {\n", | |
| " el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n", | |
| " }\n", | |
| " } else if (Date.now() < root._bokeh_timeout) {\n", | |
| " setTimeout(display_loaded, 100)\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| "\n", | |
| " function run_callbacks() {\n", | |
| " try {\n", | |
| " root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n", | |
| " }\n", | |
| " finally {\n", | |
| " delete root._bokeh_onload_callbacks\n", | |
| " }\n", | |
| " console.info(\"Bokeh: all callbacks have finished\");\n", | |
| " }\n", | |
| "\n", | |
| " function load_libs(js_urls, callback) {\n", | |
| " root._bokeh_onload_callbacks.push(callback);\n", | |
| " if (root._bokeh_is_loading > 0) {\n", | |
| " console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n", | |
| " return null;\n", | |
| " }\n", | |
| " if (js_urls == null || js_urls.length === 0) {\n", | |
| " run_callbacks();\n", | |
| " return null;\n", | |
| " }\n", | |
| " console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", | |
| " root._bokeh_is_loading = js_urls.length;\n", | |
| " for (var i = 0; i < js_urls.length; i++) {\n", | |
| " var url = js_urls[i];\n", | |
| " var s = document.createElement('script');\n", | |
| " s.src = url;\n", | |
| " s.async = false;\n", | |
| " s.onreadystatechange = s.onload = function() {\n", | |
| " root._bokeh_is_loading--;\n", | |
| " if (root._bokeh_is_loading === 0) {\n", | |
| " console.log(\"Bokeh: all BokehJS libraries loaded\");\n", | |
| " run_callbacks()\n", | |
| " }\n", | |
| " };\n", | |
| " s.onerror = function() {\n", | |
| " console.warn(\"failed to load library \" + url);\n", | |
| " };\n", | |
| " console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", | |
| " document.getElementsByTagName(\"head\")[0].appendChild(s);\n", | |
| " }\n", | |
| " };var element = document.getElementById(\"a9579831-4ad2-477f-874e-c79d5bb7085a\");\n", | |
| " if (element == null) {\n", | |
| " console.log(\"Bokeh: ERROR: autoload.js configured with elementid 'a9579831-4ad2-477f-874e-c79d5bb7085a' but no matching script tag was found. \")\n", | |
| " return false;\n", | |
| " }\n", | |
| "\n", | |
| " var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-0.13.0.min.js\"];\n", | |
| "\n", | |
| " var inline_js = [\n", | |
| " function(Bokeh) {\n", | |
| " Bokeh.set_log_level(\"info\");\n", | |
| " },\n", | |
| " \n", | |
| " function(Bokeh) {\n", | |
| " \n", | |
| " },\n", | |
| " function(Bokeh) {\n", | |
| " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n", | |
| " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n", | |
| " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n", | |
| " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n", | |
| " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n", | |
| " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n", | |
| " }\n", | |
| " ];\n", | |
| "\n", | |
| " function run_inline_js() {\n", | |
| " \n", | |
| " if ((root.Bokeh !== undefined) || (force === true)) {\n", | |
| " for (var i = 0; i < inline_js.length; i++) {\n", | |
| " inline_js[i].call(root, root.Bokeh);\n", | |
| " }if (force === true) {\n", | |
| " display_loaded();\n", | |
| " }} else if (Date.now() < root._bokeh_timeout) {\n", | |
| " setTimeout(run_inline_js, 100);\n", | |
| " } else if (!root._bokeh_failed_load) {\n", | |
| " console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n", | |
| " root._bokeh_failed_load = true;\n", | |
| " } else if (force !== true) {\n", | |
| " var cell = $(document.getElementById(\"a9579831-4ad2-477f-874e-c79d5bb7085a\")).parents('.cell').data().cell;\n", | |
| " cell.output_area.append_execute_result(NB_LOAD_WARNING)\n", | |
| " }\n", | |
| "\n", | |
| " }\n", | |
| "\n", | |
| " if (root._bokeh_is_loading === 0) {\n", | |
| " console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n", | |
| " run_inline_js();\n", | |
| " } else {\n", | |
| " load_libs(js_urls, function() {\n", | |
| " console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n", | |
| " run_inline_js();\n", | |
| " });\n", | |
| " }\n", | |
| "}(window));" | |
| ], | |
| "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n function now() {\n return new Date();\n }\n\n var force = true;\n\n if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\n \n\n \n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n var NB_LOAD_WARNING = {'data': {'text/html':\n \"<div style='background-color: #fdd'>\\n\"+\n \"<p>\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"</p>\\n\"+\n \"<ul>\\n\"+\n \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n \"<li>use INLINE resources instead, as so:</li>\\n\"+\n \"</ul>\\n\"+\n \"<code>\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"</code>\\n\"+\n \"</div>\"}};\n\n function display_loaded() {\n var el = document.getElementById(\"a9579831-4ad2-477f-874e-c79d5bb7085a\");\n if (el != null) {\n el.textContent = \"BokehJS is loading...\";\n }\n if (root.Bokeh !== undefined) {\n if (el != null) {\n el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(display_loaded, 100)\n }\n }\n\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n }\n finally {\n delete root._bokeh_onload_callbacks\n }\n console.info(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(js_urls, callback) {\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = js_urls.length;\n for (var i = 0; i < js_urls.length; i++) {\n var url = js_urls[i];\n var s = document.createElement('script');\n s.src = url;\n s.async = false;\n s.onreadystatechange = s.onload = function() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.log(\"Bokeh: all BokehJS libraries loaded\");\n run_callbacks()\n }\n };\n s.onerror = function() {\n console.warn(\"failed to load library \" + url);\n };\n console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.getElementsByTagName(\"head\")[0].appendChild(s);\n }\n };var element = document.getElementById(\"a9579831-4ad2-477f-874e-c79d5bb7085a\");\n if (element == null) {\n console.log(\"Bokeh: ERROR: autoload.js configured with elementid 'a9579831-4ad2-477f-874e-c79d5bb7085a' but no matching script tag was found. \")\n return false;\n }\n\n var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-0.13.0.min.js\"];\n\n var inline_js = [\n function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\n \n function(Bokeh) {\n \n },\n function(Bokeh) {\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n }\n ];\n\n function run_inline_js() {\n \n if ((root.Bokeh !== undefined) || (force === true)) {\n for (var i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }if (force === true) {\n display_loaded();\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n var cell = $(document.getElementById(\"a9579831-4ad2-477f-874e-c79d5bb7085a\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n\n }\n\n if (root._bokeh_is_loading === 0) {\n console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(js_urls, function() {\n console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));" | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "text/html": [ | |
| "\n", | |
| "\n", | |
| "\n", | |
| "\n", | |
| "\n", | |
| "\n", | |
| " <div class=\"bk-root\" id=\"89c40d1f-335d-4505-81d0-6f2f106bd611\"></div>\n" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/javascript": [ | |
| "(function(root) {\n", | |
| " function embed_document(root) {\n", | |
| " \n", | |
| " var docs_json = {\"b7c907d2-11ea-4723-8976-1452fdad50e0\":{\"roots\":{\"references\":[{\"attributes\":{\"overlay\":{\"id\":\"537f45ec-a86b-45f4-b1e7-e82663a86e0d\",\"type\":\"BoxAnnotation\"}},\"id\":\"4231ab0b-68fc-48fa-b189-62496172c16e\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"b3797f14-a4e0-4b71-8dfc-5c55cf44d27a\",\"type\":\"PanTool\"},{\"id\":\"8e823956-d5bb-4687-a6c1-c3fcf0fc7615\",\"type\":\"WheelZoomTool\"},{\"id\":\"4231ab0b-68fc-48fa-b189-62496172c16e\",\"type\":\"BoxZoomTool\"},{\"id\":\"5701467b-5af3-4b22-8ac8-5eec6c0c4e0b\",\"type\":\"SaveTool\"},{\"id\":\"8c6ac11f-de37-4d85-8dcf-85dcf3d8b9d3\",\"type\":\"ResetTool\"},{\"id\":\"69703bc2-c44b-43f9-acda-e6476acb9332\",\"type\":\"HelpTool\"}]},\"id\":\"93e2a645-7f98-4ee3-9317-71eb31886b08\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"5701467b-5af3-4b22-8ac8-5eec6c0c4e0b\",\"type\":\"SaveTool\"},{\"attributes\":{\"formatter\":{\"id\":\"26db80e6-94c1-4fa9-b3b9-701a6e01e2fa\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"8b94d670-cdc9-4e5c-a1b1-44bee3f7eb8b\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"11d48830-5d0f-49b7-9663-597f041e2dcf\",\"type\":\"BasicTicker\"}},\"id\":\"4ef14a0f-e009-4fd8-bb8d-333597111cde\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"8c6ac11f-de37-4d85-8dcf-85dcf3d8b9d3\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"b3ab5144-0a16-4c21-87de-3436587b3a8b\",\"type\":\"CategoricalScale\"},{\"attributes\":{},\"id\":\"69703bc2-c44b-43f9-acda-e6476acb9332\",\"type\":\"HelpTool\"},{\"attributes\":{\"callback\":null,\"end\":50},\"id\":\"643af671-cdf7-436e-96db-be8f834525c0\",\"type\":\"Range1d\"},{\"attributes\":{},\"id\":\"d7eb9b49-6ae8-4081-963d-909736a3eeb4\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"41d3755e-fced-4490-9417-251734e37117\",\"type\":\"LinearScale\"},{\"attributes\":{},\"id\":\"6a119a20-7258-433a-ac10-9e487e76cec0\",\"type\":\"CategoricalTickFormatter\"},{\"attributes\":{\"plot\":{\"id\":\"8b94d670-cdc9-4e5c-a1b1-44bee3f7eb8b\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"0e56fcb9-298a-4440-9e7e-1db3e320ef84\",\"type\":\"CategoricalTicker\"}},\"id\":\"8a3142ed-762d-4d0d-a74b-a00273acf709\",\"type\":\"Grid\"},{\"attributes\":{\"formatter\":{\"id\":\"6a119a20-7258-433a-ac10-9e487e76cec0\",\"type\":\"CategoricalTickFormatter\"},\"major_label_orientation\":0.7853981633974483,\"major_label_text_font_size\":{\"value\":\"14pt\"},\"plot\":{\"id\":\"8b94d670-cdc9-4e5c-a1b1-44bee3f7eb8b\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"0e56fcb9-298a-4440-9e7e-1db3e320ef84\",\"type\":\"CategoricalTicker\"}},\"id\":\"e94e3acc-5629-436a-a4bf-1138acdffde6\",\"type\":\"CategoricalAxis\"},{\"attributes\":{},\"id\":\"26db80e6-94c1-4fa9-b3b9-701a6e01e2fa\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"0e56fcb9-298a-4440-9e7e-1db3e320ef84\",\"type\":\"CategoricalTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"top\":{\"field\":\"y\"},\"width\":{\"value\":0.5},\"x\":{\"field\":\"x\"}},\"id\":\"f1fde764-310d-4952-af8a-a26d5e1ffe83\",\"type\":\"VBar\"},{\"attributes\":{},\"id\":\"03808738-2d25-45dc-95b9-b0f9c8293a60\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"11d48830-5d0f-49b7-9663-597f041e2dcf\",\"type\":\"BasicTicker\"},{\"attributes\":{\"callback\":null,\"factors\":[\"analytical\",\"anger\",\"confident\",\"fear\",\"joy\",\"sadness\",\"tentative\"]},\"id\":\"577d4d47-f5e0-4cc3-9cfa-535bc5611ff4\",\"type\":\"FactorRange\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"8b94d670-cdc9-4e5c-a1b1-44bee3f7eb8b\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"11d48830-5d0f-49b7-9663-597f041e2dcf\",\"type\":\"BasicTicker\"}},\"id\":\"65ff3ada-7405-4520-afb7-2bf113f64624\",\"type\":\"Grid\"},{\"attributes\":{\"data_source\":{\"id\":\"d1161e7a-db8b-4257-baff-f77179ec7b85\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"29bf8237-d3a1-4391-be4e-a21911f4b068\",\"type\":\"VBar\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"f1fde764-310d-4952-af8a-a26d5e1ffe83\",\"type\":\"VBar\"},\"selection_glyph\":null,\"view\":{\"id\":\"ccda5b73-9dcd-4823-bdd9-4097ce5767c7\",\"type\":\"CDSView\"}},\"id\":\"86d29bf4-07b9-4de9-b0b3-0f91da87be7e\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_color\":{\"field\":\"color\"},\"line_color\":{\"field\":\"color\"},\"top\":{\"field\":\"y\"},\"width\":{\"value\":0.5},\"x\":{\"field\":\"x\"}},\"id\":\"29bf8237-d3a1-4391-be4e-a21911f4b068\",\"type\":\"VBar\"},{\"attributes\":{\"below\":[{\"id\":\"e94e3acc-5629-436a-a4bf-1138acdffde6\",\"type\":\"CategoricalAxis\"}],\"left\":[{\"id\":\"4ef14a0f-e009-4fd8-bb8d-333597111cde\",\"type\":\"LinearAxis\"}],\"renderers\":[{\"id\":\"e94e3acc-5629-436a-a4bf-1138acdffde6\",\"type\":\"CategoricalAxis\"},{\"id\":\"8a3142ed-762d-4d0d-a74b-a00273acf709\",\"type\":\"Grid\"},{\"id\":\"4ef14a0f-e009-4fd8-bb8d-333597111cde\",\"type\":\"LinearAxis\"},{\"id\":\"65ff3ada-7405-4520-afb7-2bf113f64624\",\"type\":\"Grid\"},{\"id\":\"537f45ec-a86b-45f4-b1e7-e82663a86e0d\",\"type\":\"BoxAnnotation\"},{\"id\":\"86d29bf4-07b9-4de9-b0b3-0f91da87be7e\",\"type\":\"GlyphRenderer\"},{\"id\":\"fbad317c-70e7-4693-8bfc-7fcfa7d3466d\",\"type\":\"LabelSet\"}],\"title\":{\"id\":\"861f7bd2-f2ba-40d2-bf37-8c21fd41cf29\",\"type\":\"Title\"},\"toolbar\":{\"id\":\"93e2a645-7f98-4ee3-9317-71eb31886b08\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"577d4d47-f5e0-4cc3-9cfa-535bc5611ff4\",\"type\":\"FactorRange\"},\"x_scale\":{\"id\":\"b3ab5144-0a16-4c21-87de-3436587b3a8b\",\"type\":\"CategoricalScale\"},\"y_range\":{\"id\":\"643af671-cdf7-436e-96db-be8f834525c0\",\"type\":\"Range1d\"},\"y_scale\":{\"id\":\"41d3755e-fced-4490-9417-251734e37117\",\"type\":\"LinearScale\"}},\"id\":\"8b94d670-cdc9-4e5c-a1b1-44bee3f7eb8b\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"callback\":null,\"data\":{\"color\":[\"#3288bd\",\"#99d594\",\"#e6f598\",\"#ffffbf\",\"#fee08b\",\"#fc8d59\",\"#d53e4f\"],\"x\":[\"analytical\",\"anger\",\"confident\",\"fear\",\"joy\",\"sadness\",\"tentative\"],\"y\":[30.35,1.78,8.92,10.71,16.07,16.07,16.07]},\"selected\":{\"id\":\"03808738-2d25-45dc-95b9-b0f9c8293a60\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"d7eb9b49-6ae8-4081-963d-909736a3eeb4\",\"type\":\"UnionRenderers\"}},\"id\":\"d1161e7a-db8b-4257-baff-f77179ec7b85\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"537f45ec-a86b-45f4-b1e7-e82663a86e0d\",\"type\":\"BoxAnnotation\"},{\"attributes\":{},\"id\":\"b3797f14-a4e0-4b71-8dfc-5c55cf44d27a\",\"type\":\"PanTool\"},{\"attributes\":{\"source\":{\"id\":\"d1161e7a-db8b-4257-baff-f77179ec7b85\",\"type\":\"ColumnDataSource\"}},\"id\":\"ccda5b73-9dcd-4823-bdd9-4097ce5767c7\",\"type\":\"CDSView\"},{\"attributes\":{\"plot\":null,\"text\":\"Tone Analysis of Dr. Ford's Openning Statement\",\"text_font_size\":{\"value\":\"14pt\"}},\"id\":\"861f7bd2-f2ba-40d2-bf37-8c21fd41cf29\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"8e823956-d5bb-4687-a6c1-c3fcf0fc7615\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"level\":\"glyph\",\"plot\":{\"id\":\"8b94d670-cdc9-4e5c-a1b1-44bee3f7eb8b\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"source\":{\"id\":\"d1161e7a-db8b-4257-baff-f77179ec7b85\",\"type\":\"ColumnDataSource\"},\"text\":{\"field\":\"y\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":-10.5},\"y\":{\"field\":\"y\"}},\"id\":\"fbad317c-70e7-4693-8bfc-7fcfa7d3466d\",\"type\":\"LabelSet\"}],\"root_ids\":[\"8b94d670-cdc9-4e5c-a1b1-44bee3f7eb8b\"]},\"title\":\"Bokeh Application\",\"version\":\"0.13.0\"}};\n", | |
| " var render_items = [{\"docid\":\"b7c907d2-11ea-4723-8976-1452fdad50e0\",\"roots\":{\"8b94d670-cdc9-4e5c-a1b1-44bee3f7eb8b\":\"89c40d1f-335d-4505-81d0-6f2f106bd611\"}}];\n", | |
| " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", | |
| "\n", | |
| " }\n", | |
| " if (root.Bokeh !== undefined) {\n", | |
| " embed_document(root);\n", | |
| " } else {\n", | |
| " var attempts = 0;\n", | |
| " var timer = setInterval(function(root) {\n", | |
| " if (root.Bokeh !== undefined) {\n", | |
| " embed_document(root);\n", | |
| " clearInterval(timer);\n", | |
| " }\n", | |
| " attempts++;\n", | |
| " if (attempts > 100) {\n", | |
| " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\")\n", | |
| " clearInterval(timer);\n", | |
| " }\n", | |
| " }, 10, root)\n", | |
| " }\n", | |
| "})(window);" | |
| ], | |
| "application/vnd.bokehjs_exec.v0+json": "" | |
| }, | |
| "metadata": { | |
| "application/vnd.bokehjs_exec.v0+json": { | |
| "id": "8b94d670-cdc9-4e5c-a1b1-44bee3f7eb8b" | |
| } | |
| }, | |
| "output_type": "display_data" | |
| } | |
| ], | |
| "source": [ | |
| "from bokeh.palettes import Spectral7\n", | |
| "output_notebook()\n", | |
| "\n", | |
| "x = ['analytical', 'anger', 'confident', 'fear', 'joy', 'sadness', 'tentative']\n", | |
| " \n", | |
| "y = [30.35, 1.78, 8.92, 10.71, 16.07, 16.07, 16.07]\n", | |
| "\n", | |
| "\n", | |
| "source = ColumnDataSource(data=dict(x=x, y=y, color=Spectral7))\n", | |
| "p = figure(x_range=x, y_range=(0, 50), title=\"Tone Analysis of Dr. Ford's Openning Statement\")\n", | |
| "p.title.text_font_size = '14pt'\n", | |
| "p.xaxis.major_label_orientation = np.pi/4 # radians, \"horizontal\", \"vertical\", \"normal\"\n", | |
| "p.xaxis.major_label_text_font_size = '14pt'\n", | |
| "\n", | |
| "p.vbar(x='x', top='y' , width=0.5, color = 'color', source=source)\n", | |
| "\n", | |
| "labels = LabelSet(x='x', y='y', text='y', level='glyph',\n", | |
| " x_offset=-10.5, y_offset=0, source=source, render_mode='canvas')\n", | |
| "p.add_layout(labels)\n", | |
| "\n", | |
| "show(p)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 419, | |
| "metadata": { | |
| "scrolled": true | |
| }, | |
| "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>sentence_id</th>\n", | |
| " <th>score</th>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>tone_id</th>\n", | |
| " <th></th>\n", | |
| " <th></th>\n", | |
| " </tr>\n", | |
| " </thead>\n", | |
| " <tbody>\n", | |
| " <tr>\n", | |
| " <th>analytical</th>\n", | |
| " <td>59.411765</td>\n", | |
| " <td>0.709098</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>anger</th>\n", | |
| " <td>44.000000</td>\n", | |
| " <td>0.529036</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>confident</th>\n", | |
| " <td>45.400000</td>\n", | |
| " <td>0.637499</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>fear</th>\n", | |
| " <td>64.000000</td>\n", | |
| " <td>0.751310</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>joy</th>\n", | |
| " <td>26.888889</td>\n", | |
| " <td>0.599940</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>sadness</th>\n", | |
| " <td>53.111111</td>\n", | |
| " <td>0.558149</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>tentative</th>\n", | |
| " <td>58.888889</td>\n", | |
| " <td>0.740687</td>\n", | |
| " </tr>\n", | |
| " </tbody>\n", | |
| "</table>\n", | |
| "</div>" | |
| ], | |
| "text/plain": [ | |
| " sentence_id score\n", | |
| "tone_id \n", | |
| "analytical 59.411765 0.709098\n", | |
| "anger 44.000000 0.529036\n", | |
| "confident 45.400000 0.637499\n", | |
| "fear 64.000000 0.751310\n", | |
| "joy 26.888889 0.599940\n", | |
| "sadness 53.111111 0.558149\n", | |
| "tentative 58.888889 0.740687" | |
| ] | |
| }, | |
| "execution_count": 419, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "Ford_data.groupby('tone_id').mean()" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 420, | |
| "metadata": { | |
| "scrolled": true | |
| }, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "tone_id\n", | |
| "analytical 70.909782\n", | |
| "anger 52.903600\n", | |
| "confident 63.749880\n", | |
| "fear 75.130983\n", | |
| "joy 59.993989\n", | |
| "sadness 55.814878\n", | |
| "tentative 74.068678\n", | |
| "Name: score, dtype: float64" | |
| ] | |
| }, | |
| "execution_count": 420, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "Ford_data.groupby('tone_id').score.mean()*100" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "# Intensity of Tone in Dr. Ford's Opening Statement\n", | |
| "The visualization below measures the average score (on a scale of 1-100) of all sentences characterized with a specific tone. \n", | |
| "\n", | |
| "Here we can see that she felt intense fear (a score of 75.13 denotes the intensity of all sentences characterized by fear). She also was although she was quite tentative or hesitate, she was still analytical or logical in her delivery. \n", | |
| "\n" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 421, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/html": [ | |
| "\n", | |
| " <div class=\"bk-root\">\n", | |
| " <a href=\"https://bokeh.pydata.org\" target=\"_blank\" class=\"bk-logo bk-logo-small bk-logo-notebook\"></a>\n", | |
| " <span id=\"89ff410e-0a31-44d0-98a5-6d8a435b9f76\">Loading BokehJS ...</span>\n", | |
| " </div>" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/javascript": [ | |
| "\n", | |
| "(function(root) {\n", | |
| " function now() {\n", | |
| " return new Date();\n", | |
| " }\n", | |
| "\n", | |
| " var force = true;\n", | |
| "\n", | |
| " if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n", | |
| " root._bokeh_onload_callbacks = [];\n", | |
| " root._bokeh_is_loading = undefined;\n", | |
| " }\n", | |
| "\n", | |
| " var JS_MIME_TYPE = 'application/javascript';\n", | |
| " var HTML_MIME_TYPE = 'text/html';\n", | |
| " var EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", | |
| " var CLASS_NAME = 'output_bokeh rendered_html';\n", | |
| "\n", | |
| " /**\n", | |
| " * Render data to the DOM node\n", | |
| " */\n", | |
| " function render(props, node) {\n", | |
| " var script = document.createElement(\"script\");\n", | |
| " node.appendChild(script);\n", | |
| " }\n", | |
| "\n", | |
| " /**\n", | |
| " * Handle when an output is cleared or removed\n", | |
| " */\n", | |
| " function handleClearOutput(event, handle) {\n", | |
| " var cell = handle.cell;\n", | |
| "\n", | |
| " var id = cell.output_area._bokeh_element_id;\n", | |
| " var server_id = cell.output_area._bokeh_server_id;\n", | |
| " // Clean up Bokeh references\n", | |
| " if (id != null && id in Bokeh.index) {\n", | |
| " Bokeh.index[id].model.document.clear();\n", | |
| " delete Bokeh.index[id];\n", | |
| " }\n", | |
| "\n", | |
| " if (server_id !== undefined) {\n", | |
| " // Clean up Bokeh references\n", | |
| " var cmd = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", | |
| " cell.notebook.kernel.execute(cmd, {\n", | |
| " iopub: {\n", | |
| " output: function(msg) {\n", | |
| " var id = msg.content.text.trim();\n", | |
| " if (id in Bokeh.index) {\n", | |
| " Bokeh.index[id].model.document.clear();\n", | |
| " delete Bokeh.index[id];\n", | |
| " }\n", | |
| " }\n", | |
| " }\n", | |
| " });\n", | |
| " // Destroy server and session\n", | |
| " var cmd = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", | |
| " cell.notebook.kernel.execute(cmd);\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| " /**\n", | |
| " * Handle when a new output is added\n", | |
| " */\n", | |
| " function handleAddOutput(event, handle) {\n", | |
| " var output_area = handle.output_area;\n", | |
| " var output = handle.output;\n", | |
| "\n", | |
| " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", | |
| " if ((output.output_type != \"display_data\") || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n", | |
| " return\n", | |
| " }\n", | |
| "\n", | |
| " var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", | |
| "\n", | |
| " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", | |
| " toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n", | |
| " // store reference to embed id on output_area\n", | |
| " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", | |
| " }\n", | |
| " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", | |
| " var bk_div = document.createElement(\"div\");\n", | |
| " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", | |
| " var script_attrs = bk_div.children[0].attributes;\n", | |
| " for (var i = 0; i < script_attrs.length; i++) {\n", | |
| " toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", | |
| " }\n", | |
| " // store reference to server id on output_area\n", | |
| " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| " function register_renderer(events, OutputArea) {\n", | |
| "\n", | |
| " function append_mime(data, metadata, element) {\n", | |
| " // create a DOM node to render to\n", | |
| " var toinsert = this.create_output_subarea(\n", | |
| " metadata,\n", | |
| " CLASS_NAME,\n", | |
| " EXEC_MIME_TYPE\n", | |
| " );\n", | |
| " this.keyboard_manager.register_events(toinsert);\n", | |
| " // Render to node\n", | |
| " var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", | |
| " render(props, toinsert[toinsert.length - 1]);\n", | |
| " element.append(toinsert);\n", | |
| " return toinsert\n", | |
| " }\n", | |
| "\n", | |
| " /* Handle when an output is cleared or removed */\n", | |
| " events.on('clear_output.CodeCell', handleClearOutput);\n", | |
| " events.on('delete.Cell', handleClearOutput);\n", | |
| "\n", | |
| " /* Handle when a new output is added */\n", | |
| " events.on('output_added.OutputArea', handleAddOutput);\n", | |
| "\n", | |
| " /**\n", | |
| " * Register the mime type and append_mime function with output_area\n", | |
| " */\n", | |
| " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", | |
| " /* Is output safe? */\n", | |
| " safe: true,\n", | |
| " /* Index of renderer in `output_area.display_order` */\n", | |
| " index: 0\n", | |
| " });\n", | |
| " }\n", | |
| "\n", | |
| " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", | |
| " if (root.Jupyter !== undefined) {\n", | |
| " var events = require('base/js/events');\n", | |
| " var OutputArea = require('notebook/js/outputarea').OutputArea;\n", | |
| "\n", | |
| " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", | |
| " register_renderer(events, OutputArea);\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| " \n", | |
| " if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n", | |
| " root._bokeh_timeout = Date.now() + 5000;\n", | |
| " root._bokeh_failed_load = false;\n", | |
| " }\n", | |
| "\n", | |
| " var NB_LOAD_WARNING = {'data': {'text/html':\n", | |
| " \"<div style='background-color: #fdd'>\\n\"+\n", | |
| " \"<p>\\n\"+\n", | |
| " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", | |
| " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", | |
| " \"</p>\\n\"+\n", | |
| " \"<ul>\\n\"+\n", | |
| " \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n", | |
| " \"<li>use INLINE resources instead, as so:</li>\\n\"+\n", | |
| " \"</ul>\\n\"+\n", | |
| " \"<code>\\n\"+\n", | |
| " \"from bokeh.resources import INLINE\\n\"+\n", | |
| " \"output_notebook(resources=INLINE)\\n\"+\n", | |
| " \"</code>\\n\"+\n", | |
| " \"</div>\"}};\n", | |
| "\n", | |
| " function display_loaded() {\n", | |
| " var el = document.getElementById(\"89ff410e-0a31-44d0-98a5-6d8a435b9f76\");\n", | |
| " if (el != null) {\n", | |
| " el.textContent = \"BokehJS is loading...\";\n", | |
| " }\n", | |
| " if (root.Bokeh !== undefined) {\n", | |
| " if (el != null) {\n", | |
| " el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n", | |
| " }\n", | |
| " } else if (Date.now() < root._bokeh_timeout) {\n", | |
| " setTimeout(display_loaded, 100)\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| "\n", | |
| " function run_callbacks() {\n", | |
| " try {\n", | |
| " root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n", | |
| " }\n", | |
| " finally {\n", | |
| " delete root._bokeh_onload_callbacks\n", | |
| " }\n", | |
| " console.info(\"Bokeh: all callbacks have finished\");\n", | |
| " }\n", | |
| "\n", | |
| " function load_libs(js_urls, callback) {\n", | |
| " root._bokeh_onload_callbacks.push(callback);\n", | |
| " if (root._bokeh_is_loading > 0) {\n", | |
| " console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n", | |
| " return null;\n", | |
| " }\n", | |
| " if (js_urls == null || js_urls.length === 0) {\n", | |
| " run_callbacks();\n", | |
| " return null;\n", | |
| " }\n", | |
| " console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", | |
| " root._bokeh_is_loading = js_urls.length;\n", | |
| " for (var i = 0; i < js_urls.length; i++) {\n", | |
| " var url = js_urls[i];\n", | |
| " var s = document.createElement('script');\n", | |
| " s.src = url;\n", | |
| " s.async = false;\n", | |
| " s.onreadystatechange = s.onload = function() {\n", | |
| " root._bokeh_is_loading--;\n", | |
| " if (root._bokeh_is_loading === 0) {\n", | |
| " console.log(\"Bokeh: all BokehJS libraries loaded\");\n", | |
| " run_callbacks()\n", | |
| " }\n", | |
| " };\n", | |
| " s.onerror = function() {\n", | |
| " console.warn(\"failed to load library \" + url);\n", | |
| " };\n", | |
| " console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", | |
| " document.getElementsByTagName(\"head\")[0].appendChild(s);\n", | |
| " }\n", | |
| " };var element = document.getElementById(\"89ff410e-0a31-44d0-98a5-6d8a435b9f76\");\n", | |
| " if (element == null) {\n", | |
| " console.log(\"Bokeh: ERROR: autoload.js configured with elementid '89ff410e-0a31-44d0-98a5-6d8a435b9f76' but no matching script tag was found. \")\n", | |
| " return false;\n", | |
| " }\n", | |
| "\n", | |
| " var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-0.13.0.min.js\"];\n", | |
| "\n", | |
| " var inline_js = [\n", | |
| " function(Bokeh) {\n", | |
| " Bokeh.set_log_level(\"info\");\n", | |
| " },\n", | |
| " \n", | |
| " function(Bokeh) {\n", | |
| " \n", | |
| " },\n", | |
| " function(Bokeh) {\n", | |
| " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n", | |
| " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n", | |
| " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n", | |
| " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n", | |
| " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n", | |
| " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n", | |
| " }\n", | |
| " ];\n", | |
| "\n", | |
| " function run_inline_js() {\n", | |
| " \n", | |
| " if ((root.Bokeh !== undefined) || (force === true)) {\n", | |
| " for (var i = 0; i < inline_js.length; i++) {\n", | |
| " inline_js[i].call(root, root.Bokeh);\n", | |
| " }if (force === true) {\n", | |
| " display_loaded();\n", | |
| " }} else if (Date.now() < root._bokeh_timeout) {\n", | |
| " setTimeout(run_inline_js, 100);\n", | |
| " } else if (!root._bokeh_failed_load) {\n", | |
| " console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n", | |
| " root._bokeh_failed_load = true;\n", | |
| " } else if (force !== true) {\n", | |
| " var cell = $(document.getElementById(\"89ff410e-0a31-44d0-98a5-6d8a435b9f76\")).parents('.cell').data().cell;\n", | |
| " cell.output_area.append_execute_result(NB_LOAD_WARNING)\n", | |
| " }\n", | |
| "\n", | |
| " }\n", | |
| "\n", | |
| " if (root._bokeh_is_loading === 0) {\n", | |
| " console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n", | |
| " run_inline_js();\n", | |
| " } else {\n", | |
| " load_libs(js_urls, function() {\n", | |
| " console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n", | |
| " run_inline_js();\n", | |
| " });\n", | |
| " }\n", | |
| "}(window));" | |
| ], | |
| "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n function now() {\n return new Date();\n }\n\n var force = true;\n\n if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\n \n\n \n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n var NB_LOAD_WARNING = {'data': {'text/html':\n \"<div style='background-color: #fdd'>\\n\"+\n \"<p>\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"</p>\\n\"+\n \"<ul>\\n\"+\n \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n \"<li>use INLINE resources instead, as so:</li>\\n\"+\n \"</ul>\\n\"+\n \"<code>\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"</code>\\n\"+\n \"</div>\"}};\n\n function display_loaded() {\n var el = document.getElementById(\"89ff410e-0a31-44d0-98a5-6d8a435b9f76\");\n if (el != null) {\n el.textContent = \"BokehJS is loading...\";\n }\n if (root.Bokeh !== undefined) {\n if (el != null) {\n el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(display_loaded, 100)\n }\n }\n\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n }\n finally {\n delete root._bokeh_onload_callbacks\n }\n console.info(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(js_urls, callback) {\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = js_urls.length;\n for (var i = 0; i < js_urls.length; i++) {\n var url = js_urls[i];\n var s = document.createElement('script');\n s.src = url;\n s.async = false;\n s.onreadystatechange = s.onload = function() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.log(\"Bokeh: all BokehJS libraries loaded\");\n run_callbacks()\n }\n };\n s.onerror = function() {\n console.warn(\"failed to load library \" + url);\n };\n console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.getElementsByTagName(\"head\")[0].appendChild(s);\n }\n };var element = document.getElementById(\"89ff410e-0a31-44d0-98a5-6d8a435b9f76\");\n if (element == null) {\n console.log(\"Bokeh: ERROR: autoload.js configured with elementid '89ff410e-0a31-44d0-98a5-6d8a435b9f76' but no matching script tag was found. \")\n return false;\n }\n\n var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-0.13.0.min.js\"];\n\n var inline_js = [\n function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\n \n function(Bokeh) {\n \n },\n function(Bokeh) {\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n }\n ];\n\n function run_inline_js() {\n \n if ((root.Bokeh !== undefined) || (force === true)) {\n for (var i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }if (force === true) {\n display_loaded();\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n var cell = $(document.getElementById(\"89ff410e-0a31-44d0-98a5-6d8a435b9f76\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n\n }\n\n if (root._bokeh_is_loading === 0) {\n console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(js_urls, function() {\n console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));" | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "text/html": [ | |
| "\n", | |
| "\n", | |
| "\n", | |
| "\n", | |
| "\n", | |
| "\n", | |
| " <div class=\"bk-root\" id=\"7b0e056b-9bce-4504-b3f6-1abffd151217\"></div>\n" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/javascript": [ | |
| "(function(root) {\n", | |
| " function embed_document(root) {\n", | |
| " \n", | |
| " var docs_json = {\"5383b3a8-8307-47be-9f7c-1b72e68f092c\":{\"roots\":{\"references\":[{\"attributes\":{},\"id\":\"2e3a0902-6629-45d5-af09-a000047c76b3\",\"type\":\"CategoricalTickFormatter\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"top\":{\"field\":\"y\"},\"width\":{\"value\":0.5},\"x\":{\"field\":\"x\"}},\"id\":\"7ffa7a17-d4d2-4fb7-8b55-61e912246603\",\"type\":\"VBar\"},{\"attributes\":{},\"id\":\"1b987e13-b6b8-44a6-9830-fcaa96ef2259\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"formatter\":{\"id\":\"1b987e13-b6b8-44a6-9830-fcaa96ef2259\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"a0739f37-4dea-46b2-8a0c-939ab6eb692a\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"78726ee4-e535-4ffe-b3d7-7395fb370884\",\"type\":\"BasicTicker\"}},\"id\":\"d35152c6-5aef-4fd4-b401-bd4e5cdc855f\",\"type\":\"LinearAxis\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"1012627a-0692-46dc-9ff6-651d165bbded\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"fill_color\":{\"field\":\"color\"},\"line_color\":{\"field\":\"color\"},\"top\":{\"field\":\"y\"},\"width\":{\"value\":0.5},\"x\":{\"field\":\"x\"}},\"id\":\"547c3d89-458e-46d0-bcf0-d4c46f4e8dbc\",\"type\":\"VBar\"},{\"attributes\":{},\"id\":\"e0fdaad6-915c-41c0-b32b-7ab9c9e776a5\",\"type\":\"PanTool\"},{\"attributes\":{\"below\":[{\"id\":\"2e744aec-024f-4aad-aafe-f8002d698095\",\"type\":\"CategoricalAxis\"}],\"left\":[{\"id\":\"d35152c6-5aef-4fd4-b401-bd4e5cdc855f\",\"type\":\"LinearAxis\"}],\"renderers\":[{\"id\":\"2e744aec-024f-4aad-aafe-f8002d698095\",\"type\":\"CategoricalAxis\"},{\"id\":\"7ecaf982-0ed2-4a2d-b9e7-0ef3fc7df327\",\"type\":\"Grid\"},{\"id\":\"d35152c6-5aef-4fd4-b401-bd4e5cdc855f\",\"type\":\"LinearAxis\"},{\"id\":\"11c86d26-e33a-4526-965e-496ca538ff16\",\"type\":\"Grid\"},{\"id\":\"1012627a-0692-46dc-9ff6-651d165bbded\",\"type\":\"BoxAnnotation\"},{\"id\":\"908b41e5-8c31-464e-bfd5-1a9c013e3c48\",\"type\":\"GlyphRenderer\"},{\"id\":\"18802a7d-c215-4af4-9042-11de57a87ca0\",\"type\":\"LabelSet\"}],\"title\":{\"id\":\"edce59c7-8be0-4f58-9dc8-fdcd6de103f2\",\"type\":\"Title\"},\"toolbar\":{\"id\":\"3b6fbccc-322e-4c24-8c01-28998468c816\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"162587b9-4e32-447c-9512-3df3cf1b56cb\",\"type\":\"FactorRange\"},\"x_scale\":{\"id\":\"3ed7bc19-fcce-48bd-980d-fdf51163d7be\",\"type\":\"CategoricalScale\"},\"y_range\":{\"id\":\"7558d4c6-b9a2-450a-90c2-b4cfac5c075d\",\"type\":\"Range1d\"},\"y_scale\":{\"id\":\"ead80775-3133-4305-a6e0-0e5110ae61e6\",\"type\":\"LinearScale\"}},\"id\":\"a0739f37-4dea-46b2-8a0c-939ab6eb692a\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{\"level\":\"glyph\",\"plot\":{\"id\":\"a0739f37-4dea-46b2-8a0c-939ab6eb692a\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"source\":{\"id\":\"40a3d7f9-64f3-499b-a162-7e8658683757\",\"type\":\"ColumnDataSource\"},\"text\":{\"field\":\"y\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":-10.5},\"y\":{\"field\":\"y\"}},\"id\":\"18802a7d-c215-4af4-9042-11de57a87ca0\",\"type\":\"LabelSet\"},{\"attributes\":{\"data_source\":{\"id\":\"40a3d7f9-64f3-499b-a162-7e8658683757\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"547c3d89-458e-46d0-bcf0-d4c46f4e8dbc\",\"type\":\"VBar\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"7ffa7a17-d4d2-4fb7-8b55-61e912246603\",\"type\":\"VBar\"},\"selection_glyph\":null,\"view\":{\"id\":\"fbd411bc-f37f-48b6-8117-7723c77439a2\",\"type\":\"CDSView\"}},\"id\":\"908b41e5-8c31-464e-bfd5-1a9c013e3c48\",\"type\":\"GlyphRenderer\"},{\"attributes\":{},\"id\":\"2394fad0-926f-4cd3-acfe-21a61f073c4c\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"c4f88337-b9b1-40a0-9364-421b99fcfbba\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"714dae5e-e035-49c6-8e8b-1d46ca0fce89\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"plot\":null,\"text\":\"Intensity of Tone in Dr. Ford's Openning Statement\",\"text_font_size\":{\"value\":\"14pt\"}},\"id\":\"edce59c7-8be0-4f58-9dc8-fdcd6de103f2\",\"type\":\"Title\"},{\"attributes\":{\"overlay\":{\"id\":\"1012627a-0692-46dc-9ff6-651d165bbded\",\"type\":\"BoxAnnotation\"}},\"id\":\"bb65e016-dda2-487b-8698-769dcf7fdc9a\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"callback\":null,\"factors\":[\"analytical\",\"anger\",\"confident\",\"fear\",\"joy\",\"sadness\",\"tentative\"]},\"id\":\"162587b9-4e32-447c-9512-3df3cf1b56cb\",\"type\":\"FactorRange\"},{\"attributes\":{\"source\":{\"id\":\"40a3d7f9-64f3-499b-a162-7e8658683757\",\"type\":\"ColumnDataSource\"}},\"id\":\"fbd411bc-f37f-48b6-8117-7723c77439a2\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"eafa7241-d4a3-49d7-bdaa-2cd976885307\",\"type\":\"SaveTool\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"e0fdaad6-915c-41c0-b32b-7ab9c9e776a5\",\"type\":\"PanTool\"},{\"id\":\"714dae5e-e035-49c6-8e8b-1d46ca0fce89\",\"type\":\"WheelZoomTool\"},{\"id\":\"bb65e016-dda2-487b-8698-769dcf7fdc9a\",\"type\":\"BoxZoomTool\"},{\"id\":\"eafa7241-d4a3-49d7-bdaa-2cd976885307\",\"type\":\"SaveTool\"},{\"id\":\"0a7069b4-5341-4043-a867-888a614fc375\",\"type\":\"ResetTool\"},{\"id\":\"2ead7b38-40e9-43a6-8ae4-ef1b67eed0ab\",\"type\":\"HelpTool\"}]},\"id\":\"3b6fbccc-322e-4c24-8c01-28998468c816\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"0a7069b4-5341-4043-a867-888a614fc375\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"2ead7b38-40e9-43a6-8ae4-ef1b67eed0ab\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"3ed7bc19-fcce-48bd-980d-fdf51163d7be\",\"type\":\"CategoricalScale\"},{\"attributes\":{\"callback\":null,\"end\":100},\"id\":\"7558d4c6-b9a2-450a-90c2-b4cfac5c075d\",\"type\":\"Range1d\"},{\"attributes\":{},\"id\":\"ead80775-3133-4305-a6e0-0e5110ae61e6\",\"type\":\"LinearScale\"},{\"attributes\":{\"plot\":{\"id\":\"a0739f37-4dea-46b2-8a0c-939ab6eb692a\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"53b0ab09-43ad-4116-9973-d93dd63e821a\",\"type\":\"CategoricalTicker\"}},\"id\":\"7ecaf982-0ed2-4a2d-b9e7-0ef3fc7df327\",\"type\":\"Grid\"},{\"attributes\":{\"formatter\":{\"id\":\"2e3a0902-6629-45d5-af09-a000047c76b3\",\"type\":\"CategoricalTickFormatter\"},\"major_label_orientation\":0.7853981633974483,\"major_label_text_font_size\":{\"value\":\"14pt\"},\"plot\":{\"id\":\"a0739f37-4dea-46b2-8a0c-939ab6eb692a\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"53b0ab09-43ad-4116-9973-d93dd63e821a\",\"type\":\"CategoricalTicker\"}},\"id\":\"2e744aec-024f-4aad-aafe-f8002d698095\",\"type\":\"CategoricalAxis\"},{\"attributes\":{},\"id\":\"53b0ab09-43ad-4116-9973-d93dd63e821a\",\"type\":\"CategoricalTicker\"},{\"attributes\":{},\"id\":\"78726ee4-e535-4ffe-b3d7-7395fb370884\",\"type\":\"BasicTicker\"},{\"attributes\":{\"callback\":null,\"data\":{\"color\":[\"#3288bd\",\"#99d594\",\"#e6f598\",\"#ffffbf\",\"#fee08b\",\"#fc8d59\",\"#d53e4f\"],\"x\":[\"analytical\",\"anger\",\"confident\",\"fear\",\"joy\",\"sadness\",\"tentative\"],\"y\":[70.9,52.9,63.74,75.13,59.99,55.81,74.06]},\"selected\":{\"id\":\"2394fad0-926f-4cd3-acfe-21a61f073c4c\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"c4f88337-b9b1-40a0-9364-421b99fcfbba\",\"type\":\"UnionRenderers\"}},\"id\":\"40a3d7f9-64f3-499b-a162-7e8658683757\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"a0739f37-4dea-46b2-8a0c-939ab6eb692a\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"78726ee4-e535-4ffe-b3d7-7395fb370884\",\"type\":\"BasicTicker\"}},\"id\":\"11c86d26-e33a-4526-965e-496ca538ff16\",\"type\":\"Grid\"}],\"root_ids\":[\"a0739f37-4dea-46b2-8a0c-939ab6eb692a\"]},\"title\":\"Bokeh Application\",\"version\":\"0.13.0\"}};\n", | |
| " var render_items = [{\"docid\":\"5383b3a8-8307-47be-9f7c-1b72e68f092c\",\"roots\":{\"a0739f37-4dea-46b2-8a0c-939ab6eb692a\":\"7b0e056b-9bce-4504-b3f6-1abffd151217\"}}];\n", | |
| " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", | |
| "\n", | |
| " }\n", | |
| " if (root.Bokeh !== undefined) {\n", | |
| " embed_document(root);\n", | |
| " } else {\n", | |
| " var attempts = 0;\n", | |
| " var timer = setInterval(function(root) {\n", | |
| " if (root.Bokeh !== undefined) {\n", | |
| " embed_document(root);\n", | |
| " clearInterval(timer);\n", | |
| " }\n", | |
| " attempts++;\n", | |
| " if (attempts > 100) {\n", | |
| " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\")\n", | |
| " clearInterval(timer);\n", | |
| " }\n", | |
| " }, 10, root)\n", | |
| " }\n", | |
| "})(window);" | |
| ], | |
| "application/vnd.bokehjs_exec.v0+json": "" | |
| }, | |
| "metadata": { | |
| "application/vnd.bokehjs_exec.v0+json": { | |
| "id": "a0739f37-4dea-46b2-8a0c-939ab6eb692a" | |
| } | |
| }, | |
| "output_type": "display_data" | |
| } | |
| ], | |
| "source": [ | |
| "from bokeh.palettes import Spectral7\n", | |
| "output_notebook()\n", | |
| "\n", | |
| "x = ['analytical', 'anger', 'confident', 'fear', 'joy', 'sadness', 'tentative']\n", | |
| " \n", | |
| "y = [70.90, 52.90, 63.74, 75.13, 59.99, 55.81, 74.06]\n", | |
| "\n", | |
| "\n", | |
| "source = ColumnDataSource(data=dict(x=x, y=y, color=Spectral7))\n", | |
| "p = figure(x_range=x, y_range=(0, 100), title=\"Intensity of Tone in Dr. Ford's Openning Statement\")\n", | |
| "p.title.text_font_size = '14pt'\n", | |
| "p.xaxis.major_label_orientation = np.pi/4 # radians, \"horizontal\", \"vertical\", \"normal\"\n", | |
| "p.xaxis.major_label_text_font_size = '14pt'\n", | |
| "\n", | |
| "p.vbar(x='x', top='y' , width=0.5, color = 'color', source=source)\n", | |
| "\n", | |
| "labels = LabelSet(x='x', y='y', text='y', level='glyph',\n", | |
| " x_offset=-10.5, y_offset=0, source=source, render_mode='canvas')\n", | |
| "p.add_layout(labels)\n", | |
| "\n", | |
| "show(p)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "\n", | |
| "# Kavanaugh" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 373, | |
| "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>sentence_id</th>\n", | |
| " <th>text</th>\n", | |
| " <th>score</th>\n", | |
| " <th>tone_id</th>\n", | |
| " <th>score2</th>\n", | |
| " <th>tone_id2</th>\n", | |
| " <th>score3</th>\n", | |
| " <th>tone_id3</th>\n", | |
| " </tr>\n", | |
| " </thead>\n", | |
| " <tbody>\n", | |
| " <tr>\n", | |
| " <th>0</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>1</th>\n", | |
| " <td>1.0</td>\n", | |
| " <td>I wrote it myself yesterday afternoon and even...</td>\n", | |
| " <td>0.575441</td>\n", | |
| " <td>joy</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>2</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>3</th>\n", | |
| " <td>2.0</td>\n", | |
| " <td>No one has seen a draft, or it, except for one...</td>\n", | |
| " <td>0.506763</td>\n", | |
| " <td>analytical</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>4</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>5</th>\n", | |
| " <td>3.0</td>\n", | |
| " <td>This is my statement.</td>\n", | |
| " <td>0.920855</td>\n", | |
| " <td>analytical</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>6</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>7</th>\n", | |
| " <td>4.0</td>\n", | |
| " <td>Less than two weeks ago, Dr. Ford publicly acc...</td>\n", | |
| " <td>0.510839</td>\n", | |
| " <td>sadness</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>8</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>9</th>\n", | |
| " <td>5.0</td>\n", | |
| " <td>I denied the allegation immediately, categoric...</td>\n", | |
| " <td>0.767794</td>\n", | |
| " <td>anger</td>\n", | |
| " <td>0.920855</td>\n", | |
| " <td>analytical</td>\n", | |
| " <td>0.898327</td>\n", | |
| " <td>confident</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>10</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>11</th>\n", | |
| " <td>6.0</td>\n", | |
| " <td>All four people allegedly at the event, includ...</td>\n", | |
| " <td>0.670204</td>\n", | |
| " <td>analytical</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>12</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>13</th>\n", | |
| " <td>7.0</td>\n", | |
| " <td>Her longtime friend, Ms. Keyser, said under pe...</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>14</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>15</th>\n", | |
| " <td>8.0</td>\n", | |
| " <td>Here is the quote from Ms. Keyser’s attorney’s...</td>\n", | |
| " <td>0.693233</td>\n", | |
| " <td>joy</td>\n", | |
| " <td>0.638807</td>\n", | |
| " <td>analytical</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>16</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>17</th>\n", | |
| " <td>9.0</td>\n", | |
| " <td>Ford,” end quote.</td>\n", | |
| " <td>0.521804</td>\n", | |
| " <td>joy</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>18</th>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>19</th>\n", | |
| " <td>10.0</td>\n", | |
| " <td>Think about that fact.</td>\n", | |
| " <td>0.998461</td>\n", | |
| " <td>analytical</td>\n", | |
| " <td>0.989586</td>\n", | |
| " <td>confident</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " </tbody>\n", | |
| "</table>\n", | |
| "</div>" | |
| ], | |
| "text/plain": [ | |
| " sentence_id text score \\\n", | |
| "0 NaN NaN NaN \n", | |
| "1 1.0 I wrote it myself yesterday afternoon and even... 0.575441 \n", | |
| "2 NaN NaN NaN \n", | |
| "3 2.0 No one has seen a draft, or it, except for one... 0.506763 \n", | |
| "4 NaN NaN NaN \n", | |
| "5 3.0 This is my statement. 0.920855 \n", | |
| "6 NaN NaN NaN \n", | |
| "7 4.0 Less than two weeks ago, Dr. Ford publicly acc... 0.510839 \n", | |
| "8 NaN NaN NaN \n", | |
| "9 5.0 I denied the allegation immediately, categoric... 0.767794 \n", | |
| "10 NaN NaN NaN \n", | |
| "11 6.0 All four people allegedly at the event, includ... 0.670204 \n", | |
| "12 NaN NaN NaN \n", | |
| "13 7.0 Her longtime friend, Ms. Keyser, said under pe... NaN \n", | |
| "14 NaN NaN NaN \n", | |
| "15 8.0 Here is the quote from Ms. Keyser’s attorney’s... 0.693233 \n", | |
| "16 NaN NaN NaN \n", | |
| "17 9.0 Ford,” end quote. 0.521804 \n", | |
| "18 NaN NaN NaN \n", | |
| "19 10.0 Think about that fact. 0.998461 \n", | |
| "\n", | |
| " tone_id score2 tone_id2 score3 tone_id3 \n", | |
| "0 NaN NaN NaN NaN NaN \n", | |
| "1 joy NaN NaN NaN NaN \n", | |
| "2 NaN NaN NaN NaN NaN \n", | |
| "3 analytical NaN NaN NaN NaN \n", | |
| "4 NaN NaN NaN NaN NaN \n", | |
| "5 analytical NaN NaN NaN NaN \n", | |
| "6 NaN NaN NaN NaN NaN \n", | |
| "7 sadness NaN NaN NaN NaN \n", | |
| "8 NaN NaN NaN NaN NaN \n", | |
| "9 anger 0.920855 analytical 0.898327 confident \n", | |
| "10 NaN NaN NaN NaN NaN \n", | |
| "11 analytical NaN NaN NaN NaN \n", | |
| "12 NaN NaN NaN NaN NaN \n", | |
| "13 NaN NaN NaN NaN NaN \n", | |
| "14 NaN NaN NaN NaN NaN \n", | |
| "15 joy 0.638807 analytical NaN NaN \n", | |
| "16 NaN NaN NaN NaN NaN \n", | |
| "17 joy NaN NaN NaN NaN \n", | |
| "18 NaN NaN NaN NaN NaN \n", | |
| "19 analytical 0.989586 confident NaN NaN " | |
| ] | |
| }, | |
| "execution_count": 373, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "#Had some trouble here, had to convert\n", | |
| "#comma delimited file to CSV UTF-8 for python to read\n", | |
| "#Unfortunately, did this manually, if you know better way, LMK!\n", | |
| "\n", | |
| "Kavanaugh_data = pd.read_csv('output_Kavanaugh_open_results8.csv')\n", | |
| "Kavanaugh_data.columns = ['sentence_id', 'text', 'score',\n", | |
| " 'tone_id', 'score2', 'tone_id2', \n", | |
| " 'score3', 'tone_id3']\n", | |
| "\n", | |
| "\n", | |
| "Kavanaugh_data.head(n=20)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 374, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "sentence_id 99\n", | |
| "text 99\n", | |
| "score 66\n", | |
| "tone_id 66\n", | |
| "score2 16\n", | |
| "tone_id2 16\n", | |
| "score3 2\n", | |
| "tone_id3 2\n", | |
| "dtype: int64" | |
| ] | |
| }, | |
| "execution_count": 374, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "Kavanaugh_data.shape\n", | |
| "Kavanaugh_data.count()" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 375, | |
| "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>sentence_id</th>\n", | |
| " <th>text</th>\n", | |
| " <th>score</th>\n", | |
| " <th>tone_id</th>\n", | |
| " </tr>\n", | |
| " </thead>\n", | |
| " <tbody>\n", | |
| " <tr>\n", | |
| " <th>1</th>\n", | |
| " <td>1.0</td>\n", | |
| " <td>I wrote it myself yesterday afternoon and even...</td>\n", | |
| " <td>0.575441</td>\n", | |
| " <td>joy</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>3</th>\n", | |
| " <td>2.0</td>\n", | |
| " <td>No one has seen a draft, or it, except for one...</td>\n", | |
| " <td>0.506763</td>\n", | |
| " <td>analytical</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>5</th>\n", | |
| " <td>3.0</td>\n", | |
| " <td>This is my statement.</td>\n", | |
| " <td>0.920855</td>\n", | |
| " <td>analytical</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>7</th>\n", | |
| " <td>4.0</td>\n", | |
| " <td>Less than two weeks ago, Dr. Ford publicly acc...</td>\n", | |
| " <td>0.510839</td>\n", | |
| " <td>sadness</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>9</th>\n", | |
| " <td>5.0</td>\n", | |
| " <td>I denied the allegation immediately, categoric...</td>\n", | |
| " <td>0.767794</td>\n", | |
| " <td>anger</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>11</th>\n", | |
| " <td>6.0</td>\n", | |
| " <td>All four people allegedly at the event, includ...</td>\n", | |
| " <td>0.670204</td>\n", | |
| " <td>analytical</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>13</th>\n", | |
| " <td>7.0</td>\n", | |
| " <td>Her longtime friend, Ms. Keyser, said under pe...</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>15</th>\n", | |
| " <td>8.0</td>\n", | |
| " <td>Here is the quote from Ms. Keyser’s attorney’s...</td>\n", | |
| " <td>0.693233</td>\n", | |
| " <td>joy</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>17</th>\n", | |
| " <td>9.0</td>\n", | |
| " <td>Ford,” end quote.</td>\n", | |
| " <td>0.521804</td>\n", | |
| " <td>joy</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>19</th>\n", | |
| " <td>10.0</td>\n", | |
| " <td>Think about that fact.</td>\n", | |
| " <td>0.998461</td>\n", | |
| " <td>analytical</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>21</th>\n", | |
| " <td>11.0</td>\n", | |
| " <td>The day after the allegation appeared, I told ...</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>23</th>\n", | |
| " <td>12.0</td>\n", | |
| " <td>I demanded a hearing for the very next day.</td>\n", | |
| " <td>0.874372</td>\n", | |
| " <td>confident</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>25</th>\n", | |
| " <td>13.0</td>\n", | |
| " <td>Unfortunately, it took the committee 10 days t...</td>\n", | |
| " <td>0.543112</td>\n", | |
| " <td>confident</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>27</th>\n", | |
| " <td>14.0</td>\n", | |
| " <td>In those 10 long days, as was predictable, and...</td>\n", | |
| " <td>NaN</td>\n", | |
| " <td>NaN</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>29</th>\n", | |
| " <td>15.0</td>\n", | |
| " <td>The 10-day delay has been harmful to me and my...</td>\n", | |
| " <td>0.663727</td>\n", | |
| " <td>sadness</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>31</th>\n", | |
| " <td>16.0</td>\n", | |
| " <td>When this allegation first arose, I welcomed a...</td>\n", | |
| " <td>0.968123</td>\n", | |
| " <td>tentative</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>33</th>\n", | |
| " <td>17.0</td>\n", | |
| " <td>The committee now has conducted a thorough inv...</td>\n", | |
| " <td>0.543112</td>\n", | |
| " <td>confident</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>35</th>\n", | |
| " <td>18.0</td>\n", | |
| " <td>I know that any kind of investigation — Senate...</td>\n", | |
| " <td>0.615352</td>\n", | |
| " <td>tentative</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>37</th>\n", | |
| " <td>19.0</td>\n", | |
| " <td>Listen to the people I know.</td>\n", | |
| " <td>0.571570</td>\n", | |
| " <td>joy</td>\n", | |
| " </tr>\n", | |
| " <tr>\n", | |
| " <th>39</th>\n", | |
| " <td>20.0</td>\n", | |
| " <td>Listen to the people who’ve known me my whole ...</td>\n", | |
| " <td>0.762356</td>\n", | |
| " <td>analytical</td>\n", | |
| " </tr>\n", | |
| " </tbody>\n", | |
| "</table>\n", | |
| "</div>" | |
| ], | |
| "text/plain": [ | |
| " sentence_id text score \\\n", | |
| "1 1.0 I wrote it myself yesterday afternoon and even... 0.575441 \n", | |
| "3 2.0 No one has seen a draft, or it, except for one... 0.506763 \n", | |
| "5 3.0 This is my statement. 0.920855 \n", | |
| "7 4.0 Less than two weeks ago, Dr. Ford publicly acc... 0.510839 \n", | |
| "9 5.0 I denied the allegation immediately, categoric... 0.767794 \n", | |
| "11 6.0 All four people allegedly at the event, includ... 0.670204 \n", | |
| "13 7.0 Her longtime friend, Ms. Keyser, said under pe... NaN \n", | |
| "15 8.0 Here is the quote from Ms. Keyser’s attorney’s... 0.693233 \n", | |
| "17 9.0 Ford,” end quote. 0.521804 \n", | |
| "19 10.0 Think about that fact. 0.998461 \n", | |
| "21 11.0 The day after the allegation appeared, I told ... NaN \n", | |
| "23 12.0 I demanded a hearing for the very next day. 0.874372 \n", | |
| "25 13.0 Unfortunately, it took the committee 10 days t... 0.543112 \n", | |
| "27 14.0 In those 10 long days, as was predictable, and... NaN \n", | |
| "29 15.0 The 10-day delay has been harmful to me and my... 0.663727 \n", | |
| "31 16.0 When this allegation first arose, I welcomed a... 0.968123 \n", | |
| "33 17.0 The committee now has conducted a thorough inv... 0.543112 \n", | |
| "35 18.0 I know that any kind of investigation — Senate... 0.615352 \n", | |
| "37 19.0 Listen to the people I know. 0.571570 \n", | |
| "39 20.0 Listen to the people who’ve known me my whole ... 0.762356 \n", | |
| "\n", | |
| " tone_id \n", | |
| "1 joy \n", | |
| "3 analytical \n", | |
| "5 analytical \n", | |
| "7 sadness \n", | |
| "9 anger \n", | |
| "11 analytical \n", | |
| "13 NaN \n", | |
| "15 joy \n", | |
| "17 joy \n", | |
| "19 analytical \n", | |
| "21 NaN \n", | |
| "23 confident \n", | |
| "25 confident \n", | |
| "27 NaN \n", | |
| "29 sadness \n", | |
| "31 tentative \n", | |
| "33 confident \n", | |
| "35 tentative \n", | |
| "37 joy \n", | |
| "39 analytical " | |
| ] | |
| }, | |
| "execution_count": 375, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "# Seeing that score 2 and score 3 especially are really low, \n", | |
| "# I am choose to drop those value. I understand that sometines we have \n", | |
| "# many emotions at once, but for the purposes of this analysis, we'll make do with one.\n", | |
| "\n", | |
| "Kavanaugh_data.drop(['score2', 'tone_id2','score3', 'tone_id3'], axis=1, inplace =True)\n", | |
| "Kavanaugh_data.dropna(how='all', inplace=True)\n", | |
| "Kavanaugh_data.head(n=20)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 386, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "(99, 4)" | |
| ] | |
| }, | |
| "execution_count": 386, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "Kavanaugh_data.shape" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 387, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "tone_id\n", | |
| "analytical 20\n", | |
| "anger 5\n", | |
| "confident 12\n", | |
| "fear 6\n", | |
| "joy 8\n", | |
| "sadness 9\n", | |
| "tentative 6\n", | |
| "Name: score, dtype: int64" | |
| ] | |
| }, | |
| "execution_count": 387, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "Kavanaugh_data.groupby('tone_id').score.count()" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 388, | |
| "metadata": { | |
| "scrolled": true | |
| }, | |
| "outputs": [ | |
| { | |
| "name": "stdout", | |
| "output_type": "stream", | |
| "text": [ | |
| "tone_id\n", | |
| "analytical 20\n", | |
| "anger 5\n", | |
| "confident 12\n", | |
| "fear 6\n", | |
| "joy 8\n", | |
| "sadness 9\n", | |
| "tentative 6\n", | |
| "Name: score, dtype: int64\n" | |
| ] | |
| } | |
| ], | |
| "source": [ | |
| "K_Total_Tone = Kavanaugh_data.groupby('tone_id').score.count()\n", | |
| "print(K_Total_Tone)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 389, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "tone_id\n", | |
| "analytical 30.303030\n", | |
| "anger 7.575758\n", | |
| "confident 18.181818\n", | |
| "fear 9.090909\n", | |
| "joy 12.121212\n", | |
| "sadness 13.636364\n", | |
| "tentative 9.090909\n", | |
| "Name: score, dtype: float64" | |
| ] | |
| }, | |
| "execution_count": 389, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "#Calculating percentage of tone sentences\n", | |
| "K_Total_Tone/K_Total_Tone.sum()*100" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "# Tone Analysis of Judge Kavanaugh's Opening Statement\n", | |
| "\n", | |
| "The visualization below measures the total percentage of the invoked emotion per sentence relative to all other other sentences.\n", | |
| "\n", | |
| "\n", | |
| "We can see below that Judge Kavanaugh was also largely analytical and confident in his delivery. His third most exhibited emotion according to the analysis is sadness. Although Anger is the lowest overall, it is significantly larger than the amount of anger exhibited by Dr. Ford (1.78%)." | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 392, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/html": [ | |
| "\n", | |
| " <div class=\"bk-root\">\n", | |
| " <a href=\"https://bokeh.pydata.org\" target=\"_blank\" class=\"bk-logo bk-logo-small bk-logo-notebook\"></a>\n", | |
| " <span id=\"5dd22c56-38cd-47cd-9ff3-b67db0e1fe50\">Loading BokehJS ...</span>\n", | |
| " </div>" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/javascript": [ | |
| "\n", | |
| "(function(root) {\n", | |
| " function now() {\n", | |
| " return new Date();\n", | |
| " }\n", | |
| "\n", | |
| " var force = true;\n", | |
| "\n", | |
| " if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n", | |
| " root._bokeh_onload_callbacks = [];\n", | |
| " root._bokeh_is_loading = undefined;\n", | |
| " }\n", | |
| "\n", | |
| " var JS_MIME_TYPE = 'application/javascript';\n", | |
| " var HTML_MIME_TYPE = 'text/html';\n", | |
| " var EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", | |
| " var CLASS_NAME = 'output_bokeh rendered_html';\n", | |
| "\n", | |
| " /**\n", | |
| " * Render data to the DOM node\n", | |
| " */\n", | |
| " function render(props, node) {\n", | |
| " var script = document.createElement(\"script\");\n", | |
| " node.appendChild(script);\n", | |
| " }\n", | |
| "\n", | |
| " /**\n", | |
| " * Handle when an output is cleared or removed\n", | |
| " */\n", | |
| " function handleClearOutput(event, handle) {\n", | |
| " var cell = handle.cell;\n", | |
| "\n", | |
| " var id = cell.output_area._bokeh_element_id;\n", | |
| " var server_id = cell.output_area._bokeh_server_id;\n", | |
| " // Clean up Bokeh references\n", | |
| " if (id != null && id in Bokeh.index) {\n", | |
| " Bokeh.index[id].model.document.clear();\n", | |
| " delete Bokeh.index[id];\n", | |
| " }\n", | |
| "\n", | |
| " if (server_id !== undefined) {\n", | |
| " // Clean up Bokeh references\n", | |
| " var cmd = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", | |
| " cell.notebook.kernel.execute(cmd, {\n", | |
| " iopub: {\n", | |
| " output: function(msg) {\n", | |
| " var id = msg.content.text.trim();\n", | |
| " if (id in Bokeh.index) {\n", | |
| " Bokeh.index[id].model.document.clear();\n", | |
| " delete Bokeh.index[id];\n", | |
| " }\n", | |
| " }\n", | |
| " }\n", | |
| " });\n", | |
| " // Destroy server and session\n", | |
| " var cmd = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", | |
| " cell.notebook.kernel.execute(cmd);\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| " /**\n", | |
| " * Handle when a new output is added\n", | |
| " */\n", | |
| " function handleAddOutput(event, handle) {\n", | |
| " var output_area = handle.output_area;\n", | |
| " var output = handle.output;\n", | |
| "\n", | |
| " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", | |
| " if ((output.output_type != \"display_data\") || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n", | |
| " return\n", | |
| " }\n", | |
| "\n", | |
| " var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", | |
| "\n", | |
| " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", | |
| " toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n", | |
| " // store reference to embed id on output_area\n", | |
| " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", | |
| " }\n", | |
| " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", | |
| " var bk_div = document.createElement(\"div\");\n", | |
| " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", | |
| " var script_attrs = bk_div.children[0].attributes;\n", | |
| " for (var i = 0; i < script_attrs.length; i++) {\n", | |
| " toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", | |
| " }\n", | |
| " // store reference to server id on output_area\n", | |
| " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| " function register_renderer(events, OutputArea) {\n", | |
| "\n", | |
| " function append_mime(data, metadata, element) {\n", | |
| " // create a DOM node to render to\n", | |
| " var toinsert = this.create_output_subarea(\n", | |
| " metadata,\n", | |
| " CLASS_NAME,\n", | |
| " EXEC_MIME_TYPE\n", | |
| " );\n", | |
| " this.keyboard_manager.register_events(toinsert);\n", | |
| " // Render to node\n", | |
| " var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", | |
| " render(props, toinsert[toinsert.length - 1]);\n", | |
| " element.append(toinsert);\n", | |
| " return toinsert\n", | |
| " }\n", | |
| "\n", | |
| " /* Handle when an output is cleared or removed */\n", | |
| " events.on('clear_output.CodeCell', handleClearOutput);\n", | |
| " events.on('delete.Cell', handleClearOutput);\n", | |
| "\n", | |
| " /* Handle when a new output is added */\n", | |
| " events.on('output_added.OutputArea', handleAddOutput);\n", | |
| "\n", | |
| " /**\n", | |
| " * Register the mime type and append_mime function with output_area\n", | |
| " */\n", | |
| " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", | |
| " /* Is output safe? */\n", | |
| " safe: true,\n", | |
| " /* Index of renderer in `output_area.display_order` */\n", | |
| " index: 0\n", | |
| " });\n", | |
| " }\n", | |
| "\n", | |
| " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", | |
| " if (root.Jupyter !== undefined) {\n", | |
| " var events = require('base/js/events');\n", | |
| " var OutputArea = require('notebook/js/outputarea').OutputArea;\n", | |
| "\n", | |
| " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", | |
| " register_renderer(events, OutputArea);\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| " \n", | |
| " if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n", | |
| " root._bokeh_timeout = Date.now() + 5000;\n", | |
| " root._bokeh_failed_load = false;\n", | |
| " }\n", | |
| "\n", | |
| " var NB_LOAD_WARNING = {'data': {'text/html':\n", | |
| " \"<div style='background-color: #fdd'>\\n\"+\n", | |
| " \"<p>\\n\"+\n", | |
| " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", | |
| " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", | |
| " \"</p>\\n\"+\n", | |
| " \"<ul>\\n\"+\n", | |
| " \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n", | |
| " \"<li>use INLINE resources instead, as so:</li>\\n\"+\n", | |
| " \"</ul>\\n\"+\n", | |
| " \"<code>\\n\"+\n", | |
| " \"from bokeh.resources import INLINE\\n\"+\n", | |
| " \"output_notebook(resources=INLINE)\\n\"+\n", | |
| " \"</code>\\n\"+\n", | |
| " \"</div>\"}};\n", | |
| "\n", | |
| " function display_loaded() {\n", | |
| " var el = document.getElementById(\"5dd22c56-38cd-47cd-9ff3-b67db0e1fe50\");\n", | |
| " if (el != null) {\n", | |
| " el.textContent = \"BokehJS is loading...\";\n", | |
| " }\n", | |
| " if (root.Bokeh !== undefined) {\n", | |
| " if (el != null) {\n", | |
| " el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n", | |
| " }\n", | |
| " } else if (Date.now() < root._bokeh_timeout) {\n", | |
| " setTimeout(display_loaded, 100)\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| "\n", | |
| " function run_callbacks() {\n", | |
| " try {\n", | |
| " root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n", | |
| " }\n", | |
| " finally {\n", | |
| " delete root._bokeh_onload_callbacks\n", | |
| " }\n", | |
| " console.info(\"Bokeh: all callbacks have finished\");\n", | |
| " }\n", | |
| "\n", | |
| " function load_libs(js_urls, callback) {\n", | |
| " root._bokeh_onload_callbacks.push(callback);\n", | |
| " if (root._bokeh_is_loading > 0) {\n", | |
| " console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n", | |
| " return null;\n", | |
| " }\n", | |
| " if (js_urls == null || js_urls.length === 0) {\n", | |
| " run_callbacks();\n", | |
| " return null;\n", | |
| " }\n", | |
| " console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", | |
| " root._bokeh_is_loading = js_urls.length;\n", | |
| " for (var i = 0; i < js_urls.length; i++) {\n", | |
| " var url = js_urls[i];\n", | |
| " var s = document.createElement('script');\n", | |
| " s.src = url;\n", | |
| " s.async = false;\n", | |
| " s.onreadystatechange = s.onload = function() {\n", | |
| " root._bokeh_is_loading--;\n", | |
| " if (root._bokeh_is_loading === 0) {\n", | |
| " console.log(\"Bokeh: all BokehJS libraries loaded\");\n", | |
| " run_callbacks()\n", | |
| " }\n", | |
| " };\n", | |
| " s.onerror = function() {\n", | |
| " console.warn(\"failed to load library \" + url);\n", | |
| " };\n", | |
| " console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", | |
| " document.getElementsByTagName(\"head\")[0].appendChild(s);\n", | |
| " }\n", | |
| " };var element = document.getElementById(\"5dd22c56-38cd-47cd-9ff3-b67db0e1fe50\");\n", | |
| " if (element == null) {\n", | |
| " console.log(\"Bokeh: ERROR: autoload.js configured with elementid '5dd22c56-38cd-47cd-9ff3-b67db0e1fe50' but no matching script tag was found. \")\n", | |
| " return false;\n", | |
| " }\n", | |
| "\n", | |
| " var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-0.13.0.min.js\"];\n", | |
| "\n", | |
| " var inline_js = [\n", | |
| " function(Bokeh) {\n", | |
| " Bokeh.set_log_level(\"info\");\n", | |
| " },\n", | |
| " \n", | |
| " function(Bokeh) {\n", | |
| " \n", | |
| " },\n", | |
| " function(Bokeh) {\n", | |
| " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n", | |
| " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n", | |
| " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n", | |
| " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n", | |
| " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n", | |
| " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n", | |
| " }\n", | |
| " ];\n", | |
| "\n", | |
| " function run_inline_js() {\n", | |
| " \n", | |
| " if ((root.Bokeh !== undefined) || (force === true)) {\n", | |
| " for (var i = 0; i < inline_js.length; i++) {\n", | |
| " inline_js[i].call(root, root.Bokeh);\n", | |
| " }if (force === true) {\n", | |
| " display_loaded();\n", | |
| " }} else if (Date.now() < root._bokeh_timeout) {\n", | |
| " setTimeout(run_inline_js, 100);\n", | |
| " } else if (!root._bokeh_failed_load) {\n", | |
| " console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n", | |
| " root._bokeh_failed_load = true;\n", | |
| " } else if (force !== true) {\n", | |
| " var cell = $(document.getElementById(\"5dd22c56-38cd-47cd-9ff3-b67db0e1fe50\")).parents('.cell').data().cell;\n", | |
| " cell.output_area.append_execute_result(NB_LOAD_WARNING)\n", | |
| " }\n", | |
| "\n", | |
| " }\n", | |
| "\n", | |
| " if (root._bokeh_is_loading === 0) {\n", | |
| " console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n", | |
| " run_inline_js();\n", | |
| " } else {\n", | |
| " load_libs(js_urls, function() {\n", | |
| " console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n", | |
| " run_inline_js();\n", | |
| " });\n", | |
| " }\n", | |
| "}(window));" | |
| ], | |
| "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n function now() {\n return new Date();\n }\n\n var force = true;\n\n if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\n \n\n \n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n var NB_LOAD_WARNING = {'data': {'text/html':\n \"<div style='background-color: #fdd'>\\n\"+\n \"<p>\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"</p>\\n\"+\n \"<ul>\\n\"+\n \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n \"<li>use INLINE resources instead, as so:</li>\\n\"+\n \"</ul>\\n\"+\n \"<code>\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"</code>\\n\"+\n \"</div>\"}};\n\n function display_loaded() {\n var el = document.getElementById(\"5dd22c56-38cd-47cd-9ff3-b67db0e1fe50\");\n if (el != null) {\n el.textContent = \"BokehJS is loading...\";\n }\n if (root.Bokeh !== undefined) {\n if (el != null) {\n el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(display_loaded, 100)\n }\n }\n\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n }\n finally {\n delete root._bokeh_onload_callbacks\n }\n console.info(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(js_urls, callback) {\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = js_urls.length;\n for (var i = 0; i < js_urls.length; i++) {\n var url = js_urls[i];\n var s = document.createElement('script');\n s.src = url;\n s.async = false;\n s.onreadystatechange = s.onload = function() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.log(\"Bokeh: all BokehJS libraries loaded\");\n run_callbacks()\n }\n };\n s.onerror = function() {\n console.warn(\"failed to load library \" + url);\n };\n console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.getElementsByTagName(\"head\")[0].appendChild(s);\n }\n };var element = document.getElementById(\"5dd22c56-38cd-47cd-9ff3-b67db0e1fe50\");\n if (element == null) {\n console.log(\"Bokeh: ERROR: autoload.js configured with elementid '5dd22c56-38cd-47cd-9ff3-b67db0e1fe50' but no matching script tag was found. \")\n return false;\n }\n\n var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-0.13.0.min.js\"];\n\n var inline_js = [\n function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\n \n function(Bokeh) {\n \n },\n function(Bokeh) {\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n }\n ];\n\n function run_inline_js() {\n \n if ((root.Bokeh !== undefined) || (force === true)) {\n for (var i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }if (force === true) {\n display_loaded();\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n var cell = $(document.getElementById(\"5dd22c56-38cd-47cd-9ff3-b67db0e1fe50\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n\n }\n\n if (root._bokeh_is_loading === 0) {\n console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(js_urls, function() {\n console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));" | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "text/html": [ | |
| "\n", | |
| "\n", | |
| "\n", | |
| "\n", | |
| "\n", | |
| "\n", | |
| " <div class=\"bk-root\" id=\"388abebd-c6e6-4b07-bc23-d6192f2490fd\"></div>\n" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/javascript": [ | |
| "(function(root) {\n", | |
| " function embed_document(root) {\n", | |
| " \n", | |
| " var docs_json = {\"b6893206-0782-4221-a958-b2e4d25f6ae9\":{\"roots\":{\"references\":[{\"attributes\":{\"formatter\":{\"id\":\"0ffc1b79-a3d4-43db-b6b9-90da83566a32\",\"type\":\"CategoricalTickFormatter\"},\"major_label_orientation\":0.7853981633974483,\"major_label_text_font_size\":{\"value\":\"14pt\"},\"plot\":{\"id\":\"777fd60b-fe57-4fa5-85cd-28b9e5251b01\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"33eb133c-77ae-4e4d-be9d-8651ee7c784c\",\"type\":\"CategoricalTicker\"}},\"id\":\"2a732112-c43a-4838-a194-e5343c710d1e\",\"type\":\"CategoricalAxis\"},{\"attributes\":{},\"id\":\"21ddcd50-29b8-44bb-8e53-42758e52cf43\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{},\"id\":\"5f440de8-e82f-46b1-9559-b66e3d139d39\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"33eb133c-77ae-4e4d-be9d-8651ee7c784c\",\"type\":\"CategoricalTicker\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"top\":{\"field\":\"y\"},\"width\":{\"value\":0.5},\"x\":{\"field\":\"x\"}},\"id\":\"84a88d84-ca1c-407d-9ad1-2df6cfba7d04\",\"type\":\"VBar\"},{\"attributes\":{\"below\":[{\"id\":\"2a732112-c43a-4838-a194-e5343c710d1e\",\"type\":\"CategoricalAxis\"}],\"left\":[{\"id\":\"828a35fb-c7e6-4b5b-862e-3b504614cfb6\",\"type\":\"LinearAxis\"}],\"renderers\":[{\"id\":\"2a732112-c43a-4838-a194-e5343c710d1e\",\"type\":\"CategoricalAxis\"},{\"id\":\"9dd5e513-ab28-4226-ace3-00207b19b3d4\",\"type\":\"Grid\"},{\"id\":\"828a35fb-c7e6-4b5b-862e-3b504614cfb6\",\"type\":\"LinearAxis\"},{\"id\":\"fe42f836-990c-4dca-964f-5b305002e7d4\",\"type\":\"Grid\"},{\"id\":\"3af863cd-9038-4133-9b38-3305b4778c7f\",\"type\":\"BoxAnnotation\"},{\"id\":\"6df794bb-00fa-453d-83b5-640572b32d74\",\"type\":\"GlyphRenderer\"},{\"id\":\"7b4f99dc-a26b-4fad-8acf-d20e9aa4bb87\",\"type\":\"LabelSet\"}],\"title\":{\"id\":\"ed5a1627-a398-4f65-bfd6-5b897bbddb9c\",\"type\":\"Title\"},\"toolbar\":{\"id\":\"cb4195a5-6916-47ea-936d-a7216de1afce\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"16ee6ee3-1d35-4ae8-8b84-6e502aac8e50\",\"type\":\"FactorRange\"},\"x_scale\":{\"id\":\"bc9caec5-722e-4bc5-9dfa-66758ba80930\",\"type\":\"CategoricalScale\"},\"y_range\":{\"id\":\"57f6d1c7-4161-4a66-b9c4-f386dc8f2290\",\"type\":\"Range1d\"},\"y_scale\":{\"id\":\"7a15531f-41db-47ee-86a7-1697a52b3248\",\"type\":\"LinearScale\"}},\"id\":\"777fd60b-fe57-4fa5-85cd-28b9e5251b01\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"aa7023cf-1da9-4d6f-b593-fe33f6360956\",\"type\":\"BasicTicker\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"777fd60b-fe57-4fa5-85cd-28b9e5251b01\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"aa7023cf-1da9-4d6f-b593-fe33f6360956\",\"type\":\"BasicTicker\"}},\"id\":\"fe42f836-990c-4dca-964f-5b305002e7d4\",\"type\":\"Grid\"},{\"attributes\":{\"data_source\":{\"id\":\"29548db1-29c1-4bfb-be48-71f6277034a4\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"527c2f09-617b-4ba5-8fe5-34d0d2e756d3\",\"type\":\"VBar\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"84a88d84-ca1c-407d-9ad1-2df6cfba7d04\",\"type\":\"VBar\"},\"selection_glyph\":null,\"view\":{\"id\":\"98533e98-f72d-4061-aeaa-65ba77a0bcea\",\"type\":\"CDSView\"}},\"id\":\"6df794bb-00fa-453d-83b5-640572b32d74\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"fill_color\":{\"field\":\"color\"},\"line_color\":{\"field\":\"color\"},\"top\":{\"field\":\"y\"},\"width\":{\"value\":0.5},\"x\":{\"field\":\"x\"}},\"id\":\"527c2f09-617b-4ba5-8fe5-34d0d2e756d3\",\"type\":\"VBar\"},{\"attributes\":{\"callback\":null,\"data\":{\"color\":[\"#3288bd\",\"#99d594\",\"#e6f598\",\"#ffffbf\",\"#fee08b\",\"#fc8d59\",\"#d53e4f\"],\"x\":[\"analytical\",\"anger\",\"confident\",\"fear\",\"joy\",\"sadness\",\"tentative\"],\"y\":[30.3,7.57,18.18,9.09,12.12,13.63,9.09]},\"selected\":{\"id\":\"5f440de8-e82f-46b1-9559-b66e3d139d39\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"e94811e2-99c4-4b2a-b82a-4d61b82fd11d\",\"type\":\"UnionRenderers\"}},\"id\":\"29548db1-29c1-4bfb-be48-71f6277034a4\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"3af863cd-9038-4133-9b38-3305b4778c7f\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"level\":\"glyph\",\"plot\":{\"id\":\"777fd60b-fe57-4fa5-85cd-28b9e5251b01\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"source\":{\"id\":\"29548db1-29c1-4bfb-be48-71f6277034a4\",\"type\":\"ColumnDataSource\"},\"text\":{\"field\":\"y\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":-10.5},\"y\":{\"field\":\"y\"}},\"id\":\"7b4f99dc-a26b-4fad-8acf-d20e9aa4bb87\",\"type\":\"LabelSet\"},{\"attributes\":{},\"id\":\"80ecb2f4-9b95-4c2d-a700-df9d6e503cc3\",\"type\":\"PanTool\"},{\"attributes\":{\"source\":{\"id\":\"29548db1-29c1-4bfb-be48-71f6277034a4\",\"type\":\"ColumnDataSource\"}},\"id\":\"98533e98-f72d-4061-aeaa-65ba77a0bcea\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"0ffc1b79-a3d4-43db-b6b9-90da83566a32\",\"type\":\"CategoricalTickFormatter\"},{\"attributes\":{\"plot\":null,\"text\":\"Tone Analysis of Judge Kavanaugh's Openning Statement\",\"text_font_size\":{\"value\":\"14pt\"}},\"id\":\"ed5a1627-a398-4f65-bfd6-5b897bbddb9c\",\"type\":\"Title\"},{\"attributes\":{},\"id\":\"ff8556c0-73c1-4e39-93b0-bc601b222800\",\"type\":\"WheelZoomTool\"},{\"attributes\":{\"callback\":null,\"factors\":[\"analytical\",\"anger\",\"confident\",\"fear\",\"joy\",\"sadness\",\"tentative\"]},\"id\":\"16ee6ee3-1d35-4ae8-8b84-6e502aac8e50\",\"type\":\"FactorRange\"},{\"attributes\":{\"overlay\":{\"id\":\"3af863cd-9038-4133-9b38-3305b4778c7f\",\"type\":\"BoxAnnotation\"}},\"id\":\"9413827b-f816-4881-bc8c-98c0aca00219\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"80ecb2f4-9b95-4c2d-a700-df9d6e503cc3\",\"type\":\"PanTool\"},{\"id\":\"ff8556c0-73c1-4e39-93b0-bc601b222800\",\"type\":\"WheelZoomTool\"},{\"id\":\"9413827b-f816-4881-bc8c-98c0aca00219\",\"type\":\"BoxZoomTool\"},{\"id\":\"d95b9500-fad1-4ed8-824f-1f8aaf12ed61\",\"type\":\"SaveTool\"},{\"id\":\"c95eed6d-8773-432e-a777-63019a68c2f2\",\"type\":\"ResetTool\"},{\"id\":\"ae27d949-c58c-43f0-a41c-1d02f3ea12af\",\"type\":\"HelpTool\"}]},\"id\":\"cb4195a5-6916-47ea-936d-a7216de1afce\",\"type\":\"Toolbar\"},{\"attributes\":{},\"id\":\"d95b9500-fad1-4ed8-824f-1f8aaf12ed61\",\"type\":\"SaveTool\"},{\"attributes\":{\"formatter\":{\"id\":\"21ddcd50-29b8-44bb-8e53-42758e52cf43\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"777fd60b-fe57-4fa5-85cd-28b9e5251b01\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"aa7023cf-1da9-4d6f-b593-fe33f6360956\",\"type\":\"BasicTicker\"}},\"id\":\"828a35fb-c7e6-4b5b-862e-3b504614cfb6\",\"type\":\"LinearAxis\"},{\"attributes\":{},\"id\":\"c95eed6d-8773-432e-a777-63019a68c2f2\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"bc9caec5-722e-4bc5-9dfa-66758ba80930\",\"type\":\"CategoricalScale\"},{\"attributes\":{},\"id\":\"ae27d949-c58c-43f0-a41c-1d02f3ea12af\",\"type\":\"HelpTool\"},{\"attributes\":{\"callback\":null,\"end\":50},\"id\":\"57f6d1c7-4161-4a66-b9c4-f386dc8f2290\",\"type\":\"Range1d\"},{\"attributes\":{},\"id\":\"e94811e2-99c4-4b2a-b82a-4d61b82fd11d\",\"type\":\"UnionRenderers\"},{\"attributes\":{},\"id\":\"7a15531f-41db-47ee-86a7-1697a52b3248\",\"type\":\"LinearScale\"},{\"attributes\":{\"plot\":{\"id\":\"777fd60b-fe57-4fa5-85cd-28b9e5251b01\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"33eb133c-77ae-4e4d-be9d-8651ee7c784c\",\"type\":\"CategoricalTicker\"}},\"id\":\"9dd5e513-ab28-4226-ace3-00207b19b3d4\",\"type\":\"Grid\"}],\"root_ids\":[\"777fd60b-fe57-4fa5-85cd-28b9e5251b01\"]},\"title\":\"Bokeh Application\",\"version\":\"0.13.0\"}};\n", | |
| " var render_items = [{\"docid\":\"b6893206-0782-4221-a958-b2e4d25f6ae9\",\"roots\":{\"777fd60b-fe57-4fa5-85cd-28b9e5251b01\":\"388abebd-c6e6-4b07-bc23-d6192f2490fd\"}}];\n", | |
| " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", | |
| "\n", | |
| " }\n", | |
| " if (root.Bokeh !== undefined) {\n", | |
| " embed_document(root);\n", | |
| " } else {\n", | |
| " var attempts = 0;\n", | |
| " var timer = setInterval(function(root) {\n", | |
| " if (root.Bokeh !== undefined) {\n", | |
| " embed_document(root);\n", | |
| " clearInterval(timer);\n", | |
| " }\n", | |
| " attempts++;\n", | |
| " if (attempts > 100) {\n", | |
| " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\")\n", | |
| " clearInterval(timer);\n", | |
| " }\n", | |
| " }, 10, root)\n", | |
| " }\n", | |
| "})(window);" | |
| ], | |
| "application/vnd.bokehjs_exec.v0+json": "" | |
| }, | |
| "metadata": { | |
| "application/vnd.bokehjs_exec.v0+json": { | |
| "id": "777fd60b-fe57-4fa5-85cd-28b9e5251b01" | |
| } | |
| }, | |
| "output_type": "display_data" | |
| } | |
| ], | |
| "source": [ | |
| "from bokeh.palettes import Spectral7\n", | |
| "output_notebook()\n", | |
| "\n", | |
| "x = ['analytical', 'anger', 'confident', 'fear', 'joy', 'sadness', 'tentative']\n", | |
| " \n", | |
| "y = [30.30, 7.57, 18.18, 9.09, 12.12, 13.63, 9.09]\n", | |
| "\n", | |
| "\n", | |
| "source = ColumnDataSource(data=dict(x=x, y=y, color=Spectral7))\n", | |
| "p = figure(x_range=x, y_range=(0, 50), title=\"Tone Analysis of Judge Kavanaugh's Openning Statement\")\n", | |
| "p.title.text_font_size = '14pt'\n", | |
| "p.xaxis.major_label_orientation = np.pi/4 # radians, \"horizontal\", \"vertical\", \"normal\"\n", | |
| "p.xaxis.major_label_text_font_size = '14pt'\n", | |
| "\n", | |
| "p.vbar(x='x', top='y' , width=0.5, color = 'color', source=source)\n", | |
| "\n", | |
| "labels = LabelSet(x='x', y='y', text='y', level='glyph',\n", | |
| " x_offset=-10.5, y_offset=0, source=source, render_mode='canvas')\n", | |
| "p.add_layout(labels)\n", | |
| "\n", | |
| "show(p)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 390, | |
| "metadata": {}, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/plain": [ | |
| "tone_id\n", | |
| "analytical 75.191340\n", | |
| "anger 62.196100\n", | |
| "confident 77.742167\n", | |
| "fear 78.743383\n", | |
| "joy 63.717937\n", | |
| "sadness 58.109011\n", | |
| "tentative 82.662317\n", | |
| "Name: score, dtype: float64" | |
| ] | |
| }, | |
| "execution_count": 390, | |
| "metadata": {}, | |
| "output_type": "execute_result" | |
| } | |
| ], | |
| "source": [ | |
| "Kavanaugh_data.groupby('tone_id').score.mean()*100" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "# Intensity of Tone in Judge Kavanaugh's Opening Statement\n", | |
| "\n", | |
| "The visualization below measures the average score (on a scale of 1-100) of all sentences characterized with a specific tone.\n", | |
| "\n", | |
| "Judge Kavanaugh felt almost every sentence very intensely, he was certainly emotive. He felt incredibly tentative (a score of 82.66.13 denotes the intensity of all sentences characterized as tentative), and his most significant tone was provisional and hesitant. his second ad third most intense emotions, according to the analysis, were fear and confidence. Additionally, he was significantly more angry in his statement, \n", | |
| "at 62% intensity, than Dr. Ford, whose anger registered an average of 53% intensity. " | |
| ] | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": 327, | |
| "metadata": { | |
| "scrolled": true | |
| }, | |
| "outputs": [ | |
| { | |
| "data": { | |
| "text/html": [ | |
| "\n", | |
| " <div class=\"bk-root\">\n", | |
| " <a href=\"https://bokeh.pydata.org\" target=\"_blank\" class=\"bk-logo bk-logo-small bk-logo-notebook\"></a>\n", | |
| " <span id=\"9317f49c-5d2d-4ef2-9332-2bc0f2bda536\">Loading BokehJS ...</span>\n", | |
| " </div>" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/javascript": [ | |
| "\n", | |
| "(function(root) {\n", | |
| " function now() {\n", | |
| " return new Date();\n", | |
| " }\n", | |
| "\n", | |
| " var force = true;\n", | |
| "\n", | |
| " if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n", | |
| " root._bokeh_onload_callbacks = [];\n", | |
| " root._bokeh_is_loading = undefined;\n", | |
| " }\n", | |
| "\n", | |
| " var JS_MIME_TYPE = 'application/javascript';\n", | |
| " var HTML_MIME_TYPE = 'text/html';\n", | |
| " var EXEC_MIME_TYPE = 'application/vnd.bokehjs_exec.v0+json';\n", | |
| " var CLASS_NAME = 'output_bokeh rendered_html';\n", | |
| "\n", | |
| " /**\n", | |
| " * Render data to the DOM node\n", | |
| " */\n", | |
| " function render(props, node) {\n", | |
| " var script = document.createElement(\"script\");\n", | |
| " node.appendChild(script);\n", | |
| " }\n", | |
| "\n", | |
| " /**\n", | |
| " * Handle when an output is cleared or removed\n", | |
| " */\n", | |
| " function handleClearOutput(event, handle) {\n", | |
| " var cell = handle.cell;\n", | |
| "\n", | |
| " var id = cell.output_area._bokeh_element_id;\n", | |
| " var server_id = cell.output_area._bokeh_server_id;\n", | |
| " // Clean up Bokeh references\n", | |
| " if (id != null && id in Bokeh.index) {\n", | |
| " Bokeh.index[id].model.document.clear();\n", | |
| " delete Bokeh.index[id];\n", | |
| " }\n", | |
| "\n", | |
| " if (server_id !== undefined) {\n", | |
| " // Clean up Bokeh references\n", | |
| " var cmd = \"from bokeh.io.state import curstate; print(curstate().uuid_to_server['\" + server_id + \"'].get_sessions()[0].document.roots[0]._id)\";\n", | |
| " cell.notebook.kernel.execute(cmd, {\n", | |
| " iopub: {\n", | |
| " output: function(msg) {\n", | |
| " var id = msg.content.text.trim();\n", | |
| " if (id in Bokeh.index) {\n", | |
| " Bokeh.index[id].model.document.clear();\n", | |
| " delete Bokeh.index[id];\n", | |
| " }\n", | |
| " }\n", | |
| " }\n", | |
| " });\n", | |
| " // Destroy server and session\n", | |
| " var cmd = \"import bokeh.io.notebook as ion; ion.destroy_server('\" + server_id + \"')\";\n", | |
| " cell.notebook.kernel.execute(cmd);\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| " /**\n", | |
| " * Handle when a new output is added\n", | |
| " */\n", | |
| " function handleAddOutput(event, handle) {\n", | |
| " var output_area = handle.output_area;\n", | |
| " var output = handle.output;\n", | |
| "\n", | |
| " // limit handleAddOutput to display_data with EXEC_MIME_TYPE content only\n", | |
| " if ((output.output_type != \"display_data\") || (!output.data.hasOwnProperty(EXEC_MIME_TYPE))) {\n", | |
| " return\n", | |
| " }\n", | |
| "\n", | |
| " var toinsert = output_area.element.find(\".\" + CLASS_NAME.split(' ')[0]);\n", | |
| "\n", | |
| " if (output.metadata[EXEC_MIME_TYPE][\"id\"] !== undefined) {\n", | |
| " toinsert[toinsert.length - 1].firstChild.textContent = output.data[JS_MIME_TYPE];\n", | |
| " // store reference to embed id on output_area\n", | |
| " output_area._bokeh_element_id = output.metadata[EXEC_MIME_TYPE][\"id\"];\n", | |
| " }\n", | |
| " if (output.metadata[EXEC_MIME_TYPE][\"server_id\"] !== undefined) {\n", | |
| " var bk_div = document.createElement(\"div\");\n", | |
| " bk_div.innerHTML = output.data[HTML_MIME_TYPE];\n", | |
| " var script_attrs = bk_div.children[0].attributes;\n", | |
| " for (var i = 0; i < script_attrs.length; i++) {\n", | |
| " toinsert[toinsert.length - 1].firstChild.setAttribute(script_attrs[i].name, script_attrs[i].value);\n", | |
| " }\n", | |
| " // store reference to server id on output_area\n", | |
| " output_area._bokeh_server_id = output.metadata[EXEC_MIME_TYPE][\"server_id\"];\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| " function register_renderer(events, OutputArea) {\n", | |
| "\n", | |
| " function append_mime(data, metadata, element) {\n", | |
| " // create a DOM node to render to\n", | |
| " var toinsert = this.create_output_subarea(\n", | |
| " metadata,\n", | |
| " CLASS_NAME,\n", | |
| " EXEC_MIME_TYPE\n", | |
| " );\n", | |
| " this.keyboard_manager.register_events(toinsert);\n", | |
| " // Render to node\n", | |
| " var props = {data: data, metadata: metadata[EXEC_MIME_TYPE]};\n", | |
| " render(props, toinsert[toinsert.length - 1]);\n", | |
| " element.append(toinsert);\n", | |
| " return toinsert\n", | |
| " }\n", | |
| "\n", | |
| " /* Handle when an output is cleared or removed */\n", | |
| " events.on('clear_output.CodeCell', handleClearOutput);\n", | |
| " events.on('delete.Cell', handleClearOutput);\n", | |
| "\n", | |
| " /* Handle when a new output is added */\n", | |
| " events.on('output_added.OutputArea', handleAddOutput);\n", | |
| "\n", | |
| " /**\n", | |
| " * Register the mime type and append_mime function with output_area\n", | |
| " */\n", | |
| " OutputArea.prototype.register_mime_type(EXEC_MIME_TYPE, append_mime, {\n", | |
| " /* Is output safe? */\n", | |
| " safe: true,\n", | |
| " /* Index of renderer in `output_area.display_order` */\n", | |
| " index: 0\n", | |
| " });\n", | |
| " }\n", | |
| "\n", | |
| " // register the mime type if in Jupyter Notebook environment and previously unregistered\n", | |
| " if (root.Jupyter !== undefined) {\n", | |
| " var events = require('base/js/events');\n", | |
| " var OutputArea = require('notebook/js/outputarea').OutputArea;\n", | |
| "\n", | |
| " if (OutputArea.prototype.mime_types().indexOf(EXEC_MIME_TYPE) == -1) {\n", | |
| " register_renderer(events, OutputArea);\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| " \n", | |
| " if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n", | |
| " root._bokeh_timeout = Date.now() + 5000;\n", | |
| " root._bokeh_failed_load = false;\n", | |
| " }\n", | |
| "\n", | |
| " var NB_LOAD_WARNING = {'data': {'text/html':\n", | |
| " \"<div style='background-color: #fdd'>\\n\"+\n", | |
| " \"<p>\\n\"+\n", | |
| " \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n", | |
| " \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n", | |
| " \"</p>\\n\"+\n", | |
| " \"<ul>\\n\"+\n", | |
| " \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n", | |
| " \"<li>use INLINE resources instead, as so:</li>\\n\"+\n", | |
| " \"</ul>\\n\"+\n", | |
| " \"<code>\\n\"+\n", | |
| " \"from bokeh.resources import INLINE\\n\"+\n", | |
| " \"output_notebook(resources=INLINE)\\n\"+\n", | |
| " \"</code>\\n\"+\n", | |
| " \"</div>\"}};\n", | |
| "\n", | |
| " function display_loaded() {\n", | |
| " var el = document.getElementById(\"9317f49c-5d2d-4ef2-9332-2bc0f2bda536\");\n", | |
| " if (el != null) {\n", | |
| " el.textContent = \"BokehJS is loading...\";\n", | |
| " }\n", | |
| " if (root.Bokeh !== undefined) {\n", | |
| " if (el != null) {\n", | |
| " el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n", | |
| " }\n", | |
| " } else if (Date.now() < root._bokeh_timeout) {\n", | |
| " setTimeout(display_loaded, 100)\n", | |
| " }\n", | |
| " }\n", | |
| "\n", | |
| "\n", | |
| " function run_callbacks() {\n", | |
| " try {\n", | |
| " root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n", | |
| " }\n", | |
| " finally {\n", | |
| " delete root._bokeh_onload_callbacks\n", | |
| " }\n", | |
| " console.info(\"Bokeh: all callbacks have finished\");\n", | |
| " }\n", | |
| "\n", | |
| " function load_libs(js_urls, callback) {\n", | |
| " root._bokeh_onload_callbacks.push(callback);\n", | |
| " if (root._bokeh_is_loading > 0) {\n", | |
| " console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n", | |
| " return null;\n", | |
| " }\n", | |
| " if (js_urls == null || js_urls.length === 0) {\n", | |
| " run_callbacks();\n", | |
| " return null;\n", | |
| " }\n", | |
| " console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n", | |
| " root._bokeh_is_loading = js_urls.length;\n", | |
| " for (var i = 0; i < js_urls.length; i++) {\n", | |
| " var url = js_urls[i];\n", | |
| " var s = document.createElement('script');\n", | |
| " s.src = url;\n", | |
| " s.async = false;\n", | |
| " s.onreadystatechange = s.onload = function() {\n", | |
| " root._bokeh_is_loading--;\n", | |
| " if (root._bokeh_is_loading === 0) {\n", | |
| " console.log(\"Bokeh: all BokehJS libraries loaded\");\n", | |
| " run_callbacks()\n", | |
| " }\n", | |
| " };\n", | |
| " s.onerror = function() {\n", | |
| " console.warn(\"failed to load library \" + url);\n", | |
| " };\n", | |
| " console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n", | |
| " document.getElementsByTagName(\"head\")[0].appendChild(s);\n", | |
| " }\n", | |
| " };var element = document.getElementById(\"9317f49c-5d2d-4ef2-9332-2bc0f2bda536\");\n", | |
| " if (element == null) {\n", | |
| " console.log(\"Bokeh: ERROR: autoload.js configured with elementid '9317f49c-5d2d-4ef2-9332-2bc0f2bda536' but no matching script tag was found. \")\n", | |
| " return false;\n", | |
| " }\n", | |
| "\n", | |
| " var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-0.13.0.min.js\"];\n", | |
| "\n", | |
| " var inline_js = [\n", | |
| " function(Bokeh) {\n", | |
| " Bokeh.set_log_level(\"info\");\n", | |
| " },\n", | |
| " \n", | |
| " function(Bokeh) {\n", | |
| " \n", | |
| " },\n", | |
| " function(Bokeh) {\n", | |
| " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n", | |
| " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n", | |
| " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n", | |
| " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n", | |
| " console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n", | |
| " Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n", | |
| " }\n", | |
| " ];\n", | |
| "\n", | |
| " function run_inline_js() {\n", | |
| " \n", | |
| " if ((root.Bokeh !== undefined) || (force === true)) {\n", | |
| " for (var i = 0; i < inline_js.length; i++) {\n", | |
| " inline_js[i].call(root, root.Bokeh);\n", | |
| " }if (force === true) {\n", | |
| " display_loaded();\n", | |
| " }} else if (Date.now() < root._bokeh_timeout) {\n", | |
| " setTimeout(run_inline_js, 100);\n", | |
| " } else if (!root._bokeh_failed_load) {\n", | |
| " console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n", | |
| " root._bokeh_failed_load = true;\n", | |
| " } else if (force !== true) {\n", | |
| " var cell = $(document.getElementById(\"9317f49c-5d2d-4ef2-9332-2bc0f2bda536\")).parents('.cell').data().cell;\n", | |
| " cell.output_area.append_execute_result(NB_LOAD_WARNING)\n", | |
| " }\n", | |
| "\n", | |
| " }\n", | |
| "\n", | |
| " if (root._bokeh_is_loading === 0) {\n", | |
| " console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n", | |
| " run_inline_js();\n", | |
| " } else {\n", | |
| " load_libs(js_urls, function() {\n", | |
| " console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n", | |
| " run_inline_js();\n", | |
| " });\n", | |
| " }\n", | |
| "}(window));" | |
| ], | |
| "application/vnd.bokehjs_load.v0+json": "\n(function(root) {\n function now() {\n return new Date();\n }\n\n var force = true;\n\n if (typeof (root._bokeh_onload_callbacks) === \"undefined\" || force === true) {\n root._bokeh_onload_callbacks = [];\n root._bokeh_is_loading = undefined;\n }\n\n \n\n \n if (typeof (root._bokeh_timeout) === \"undefined\" || force === true) {\n root._bokeh_timeout = Date.now() + 5000;\n root._bokeh_failed_load = false;\n }\n\n var NB_LOAD_WARNING = {'data': {'text/html':\n \"<div style='background-color: #fdd'>\\n\"+\n \"<p>\\n\"+\n \"BokehJS does not appear to have successfully loaded. If loading BokehJS from CDN, this \\n\"+\n \"may be due to a slow or bad network connection. Possible fixes:\\n\"+\n \"</p>\\n\"+\n \"<ul>\\n\"+\n \"<li>re-rerun `output_notebook()` to attempt to load from CDN again, or</li>\\n\"+\n \"<li>use INLINE resources instead, as so:</li>\\n\"+\n \"</ul>\\n\"+\n \"<code>\\n\"+\n \"from bokeh.resources import INLINE\\n\"+\n \"output_notebook(resources=INLINE)\\n\"+\n \"</code>\\n\"+\n \"</div>\"}};\n\n function display_loaded() {\n var el = document.getElementById(\"9317f49c-5d2d-4ef2-9332-2bc0f2bda536\");\n if (el != null) {\n el.textContent = \"BokehJS is loading...\";\n }\n if (root.Bokeh !== undefined) {\n if (el != null) {\n el.textContent = \"BokehJS \" + root.Bokeh.version + \" successfully loaded.\";\n }\n } else if (Date.now() < root._bokeh_timeout) {\n setTimeout(display_loaded, 100)\n }\n }\n\n\n function run_callbacks() {\n try {\n root._bokeh_onload_callbacks.forEach(function(callback) { callback() });\n }\n finally {\n delete root._bokeh_onload_callbacks\n }\n console.info(\"Bokeh: all callbacks have finished\");\n }\n\n function load_libs(js_urls, callback) {\n root._bokeh_onload_callbacks.push(callback);\n if (root._bokeh_is_loading > 0) {\n console.log(\"Bokeh: BokehJS is being loaded, scheduling callback at\", now());\n return null;\n }\n if (js_urls == null || js_urls.length === 0) {\n run_callbacks();\n return null;\n }\n console.log(\"Bokeh: BokehJS not loaded, scheduling load and callback at\", now());\n root._bokeh_is_loading = js_urls.length;\n for (var i = 0; i < js_urls.length; i++) {\n var url = js_urls[i];\n var s = document.createElement('script');\n s.src = url;\n s.async = false;\n s.onreadystatechange = s.onload = function() {\n root._bokeh_is_loading--;\n if (root._bokeh_is_loading === 0) {\n console.log(\"Bokeh: all BokehJS libraries loaded\");\n run_callbacks()\n }\n };\n s.onerror = function() {\n console.warn(\"failed to load library \" + url);\n };\n console.log(\"Bokeh: injecting script tag for BokehJS library: \", url);\n document.getElementsByTagName(\"head\")[0].appendChild(s);\n }\n };var element = document.getElementById(\"9317f49c-5d2d-4ef2-9332-2bc0f2bda536\");\n if (element == null) {\n console.log(\"Bokeh: ERROR: autoload.js configured with elementid '9317f49c-5d2d-4ef2-9332-2bc0f2bda536' but no matching script tag was found. \")\n return false;\n }\n\n var js_urls = [\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.js\", \"https://cdn.pydata.org/bokeh/release/bokeh-gl-0.13.0.min.js\"];\n\n var inline_js = [\n function(Bokeh) {\n Bokeh.set_log_level(\"info\");\n },\n \n function(Bokeh) {\n \n },\n function(Bokeh) {\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-0.13.0.min.css\");\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.13.0.min.css\");\n console.log(\"Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n Bokeh.embed.inject_css(\"https://cdn.pydata.org/bokeh/release/bokeh-tables-0.13.0.min.css\");\n }\n ];\n\n function run_inline_js() {\n \n if ((root.Bokeh !== undefined) || (force === true)) {\n for (var i = 0; i < inline_js.length; i++) {\n inline_js[i].call(root, root.Bokeh);\n }if (force === true) {\n display_loaded();\n }} else if (Date.now() < root._bokeh_timeout) {\n setTimeout(run_inline_js, 100);\n } else if (!root._bokeh_failed_load) {\n console.log(\"Bokeh: BokehJS failed to load within specified timeout.\");\n root._bokeh_failed_load = true;\n } else if (force !== true) {\n var cell = $(document.getElementById(\"9317f49c-5d2d-4ef2-9332-2bc0f2bda536\")).parents('.cell').data().cell;\n cell.output_area.append_execute_result(NB_LOAD_WARNING)\n }\n\n }\n\n if (root._bokeh_is_loading === 0) {\n console.log(\"Bokeh: BokehJS loaded, going straight to plotting\");\n run_inline_js();\n } else {\n load_libs(js_urls, function() {\n console.log(\"Bokeh: BokehJS plotting callback run at\", now());\n run_inline_js();\n });\n }\n}(window));" | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "text/html": [ | |
| "\n", | |
| "\n", | |
| "\n", | |
| "\n", | |
| "\n", | |
| "\n", | |
| " <div class=\"bk-root\" id=\"d2547d91-b9c0-44bc-807a-2e805c1f9194\"></div>\n" | |
| ] | |
| }, | |
| "metadata": {}, | |
| "output_type": "display_data" | |
| }, | |
| { | |
| "data": { | |
| "application/javascript": [ | |
| "(function(root) {\n", | |
| " function embed_document(root) {\n", | |
| " \n", | |
| " var docs_json = {\"6810f401-00cd-4a2a-9c8a-c5c3585aff1a\":{\"roots\":{\"references\":[{\"attributes\":{\"plot\":{\"id\":\"c08a7bad-77bd-4d71-aa5b-10eb2f26651f\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"b49c0e24-32b0-4d57-b27c-8b89a47c0bf5\",\"type\":\"CategoricalTicker\"}},\"id\":\"9e4bcc3b-b55a-45b1-a6cc-67e3dd1668bb\",\"type\":\"Grid\"},{\"attributes\":{},\"id\":\"680b2b2d-b263-422f-aab2-1109be7364d9\",\"type\":\"PanTool\"},{\"attributes\":{\"callback\":null,\"end\":100},\"id\":\"d20b88de-e2c9-48c1-bfe4-b6573e07e59f\",\"type\":\"Range1d\"},{\"attributes\":{\"bottom_units\":\"screen\",\"fill_alpha\":{\"value\":0.5},\"fill_color\":{\"value\":\"lightgrey\"},\"left_units\":\"screen\",\"level\":\"overlay\",\"line_alpha\":{\"value\":1.0},\"line_color\":{\"value\":\"black\"},\"line_dash\":[4,4],\"line_width\":{\"value\":2},\"plot\":null,\"render_mode\":\"css\",\"right_units\":\"screen\",\"top_units\":\"screen\"},\"id\":\"72c46b68-168b-4834-a322-fab2fab1dd33\",\"type\":\"BoxAnnotation\"},{\"attributes\":{\"fill_alpha\":{\"value\":0.1},\"fill_color\":{\"value\":\"#1f77b4\"},\"line_alpha\":{\"value\":0.1},\"line_color\":{\"value\":\"#1f77b4\"},\"top\":{\"field\":\"y\"},\"width\":{\"value\":0.5},\"x\":{\"field\":\"x\"}},\"id\":\"df062e24-1640-4718-baea-30ec2b5d4c83\",\"type\":\"VBar\"},{\"attributes\":{},\"id\":\"b49c0e24-32b0-4d57-b27c-8b89a47c0bf5\",\"type\":\"CategoricalTicker\"},{\"attributes\":{},\"id\":\"e6a0bc0d-822e-4b49-baf9-716d71dd20c2\",\"type\":\"WheelZoomTool\"},{\"attributes\":{},\"id\":\"ac9e16d4-e106-439a-892c-a0c115bb998f\",\"type\":\"BasicTicker\"},{\"attributes\":{\"overlay\":{\"id\":\"72c46b68-168b-4834-a322-fab2fab1dd33\",\"type\":\"BoxAnnotation\"}},\"id\":\"89947253-338d-4d63-86af-91a6f4159279\",\"type\":\"BoxZoomTool\"},{\"attributes\":{\"fill_color\":{\"field\":\"color\"},\"line_color\":{\"field\":\"color\"},\"top\":{\"field\":\"y\"},\"width\":{\"value\":0.5},\"x\":{\"field\":\"x\"}},\"id\":\"b698b08f-5d46-46f1-915d-d62b8ca9e394\",\"type\":\"VBar\"},{\"attributes\":{\"formatter\":{\"id\":\"26530a84-d577-43c8-9773-a255c7a485b0\",\"type\":\"CategoricalTickFormatter\"},\"major_label_orientation\":0.7853981633974483,\"major_label_text_font_size\":{\"value\":\"14pt\"},\"plot\":{\"id\":\"c08a7bad-77bd-4d71-aa5b-10eb2f26651f\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"b49c0e24-32b0-4d57-b27c-8b89a47c0bf5\",\"type\":\"CategoricalTicker\"}},\"id\":\"c4e6bd94-c795-4884-8657-84375676e6d6\",\"type\":\"CategoricalAxis\"},{\"attributes\":{},\"id\":\"9866a8db-70ed-4921-a3ea-bc3000880f17\",\"type\":\"SaveTool\"},{\"attributes\":{\"data_source\":{\"id\":\"3aaabb57-df05-438f-8018-be51a9ceae68\",\"type\":\"ColumnDataSource\"},\"glyph\":{\"id\":\"b698b08f-5d46-46f1-915d-d62b8ca9e394\",\"type\":\"VBar\"},\"hover_glyph\":null,\"muted_glyph\":null,\"nonselection_glyph\":{\"id\":\"df062e24-1640-4718-baea-30ec2b5d4c83\",\"type\":\"VBar\"},\"selection_glyph\":null,\"view\":{\"id\":\"b80e955a-978c-4836-ad04-38587771387d\",\"type\":\"CDSView\"}},\"id\":\"62f30792-8a36-484c-965d-60596f03f475\",\"type\":\"GlyphRenderer\"},{\"attributes\":{\"source\":{\"id\":\"3aaabb57-df05-438f-8018-be51a9ceae68\",\"type\":\"ColumnDataSource\"}},\"id\":\"b80e955a-978c-4836-ad04-38587771387d\",\"type\":\"CDSView\"},{\"attributes\":{},\"id\":\"d0d49df5-f693-4bc9-a41b-c9e871f7dfd8\",\"type\":\"ResetTool\"},{\"attributes\":{},\"id\":\"efa886fd-affe-4846-8f34-48f8a57b3059\",\"type\":\"HelpTool\"},{\"attributes\":{},\"id\":\"ed96d77a-7bfd-4796-93f9-637cfe8c659e\",\"type\":\"UnionRenderers\"},{\"attributes\":{\"below\":[{\"id\":\"c4e6bd94-c795-4884-8657-84375676e6d6\",\"type\":\"CategoricalAxis\"}],\"left\":[{\"id\":\"cdebc0ac-8ee1-43d5-822f-3eabad60c870\",\"type\":\"LinearAxis\"}],\"renderers\":[{\"id\":\"c4e6bd94-c795-4884-8657-84375676e6d6\",\"type\":\"CategoricalAxis\"},{\"id\":\"9e4bcc3b-b55a-45b1-a6cc-67e3dd1668bb\",\"type\":\"Grid\"},{\"id\":\"cdebc0ac-8ee1-43d5-822f-3eabad60c870\",\"type\":\"LinearAxis\"},{\"id\":\"528f99ec-8418-4b94-b2a4-39f13d013066\",\"type\":\"Grid\"},{\"id\":\"72c46b68-168b-4834-a322-fab2fab1dd33\",\"type\":\"BoxAnnotation\"},{\"id\":\"62f30792-8a36-484c-965d-60596f03f475\",\"type\":\"GlyphRenderer\"},{\"id\":\"ebcc5d28-2e24-4939-abbb-2b8a16a48a92\",\"type\":\"LabelSet\"}],\"title\":{\"id\":\"b48d39c8-c123-45f7-8937-2f7bd992453b\",\"type\":\"Title\"},\"toolbar\":{\"id\":\"7cfedd6b-c201-4ab0-b207-ce8ddc62c048\",\"type\":\"Toolbar\"},\"x_range\":{\"id\":\"ae3c7ee9-9e4f-43ab-9e78-5490d6746268\",\"type\":\"FactorRange\"},\"x_scale\":{\"id\":\"0fe118bf-e390-49db-800a-9dbb567711f0\",\"type\":\"CategoricalScale\"},\"y_range\":{\"id\":\"d20b88de-e2c9-48c1-bfe4-b6573e07e59f\",\"type\":\"Range1d\"},\"y_scale\":{\"id\":\"122c1c26-70aa-4583-b0b2-f80d646eff62\",\"type\":\"LinearScale\"}},\"id\":\"c08a7bad-77bd-4d71-aa5b-10eb2f26651f\",\"subtype\":\"Figure\",\"type\":\"Plot\"},{\"attributes\":{},\"id\":\"9ab8f956-452a-4994-b4fe-a5d76e4285ed\",\"type\":\"BasicTickFormatter\"},{\"attributes\":{\"level\":\"glyph\",\"plot\":{\"id\":\"c08a7bad-77bd-4d71-aa5b-10eb2f26651f\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"source\":{\"id\":\"3aaabb57-df05-438f-8018-be51a9ceae68\",\"type\":\"ColumnDataSource\"},\"text\":{\"field\":\"y\"},\"x\":{\"field\":\"x\"},\"x_offset\":{\"value\":-10.5},\"y\":{\"field\":\"y\"}},\"id\":\"ebcc5d28-2e24-4939-abbb-2b8a16a48a92\",\"type\":\"LabelSet\"},{\"attributes\":{},\"id\":\"16fae62f-be64-4567-a267-34918531ff32\",\"type\":\"Selection\"},{\"attributes\":{},\"id\":\"26530a84-d577-43c8-9773-a255c7a485b0\",\"type\":\"CategoricalTickFormatter\"},{\"attributes\":{\"callback\":null,\"data\":{\"color\":[\"#3288bd\",\"#99d594\",\"#e6f598\",\"#ffffbf\",\"#fee08b\",\"#fc8d59\",\"#d53e4f\"],\"x\":[\"analytical\",\"anger\",\"confident\",\"fear\",\"joy\",\"sadness\",\"tentative\"],\"y\":[75.19,62.19,77.74,78.74,63.71,58.1,82.66]},\"selected\":{\"id\":\"16fae62f-be64-4567-a267-34918531ff32\",\"type\":\"Selection\"},\"selection_policy\":{\"id\":\"ed96d77a-7bfd-4796-93f9-637cfe8c659e\",\"type\":\"UnionRenderers\"}},\"id\":\"3aaabb57-df05-438f-8018-be51a9ceae68\",\"type\":\"ColumnDataSource\"},{\"attributes\":{\"dimension\":1,\"plot\":{\"id\":\"c08a7bad-77bd-4d71-aa5b-10eb2f26651f\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"ac9e16d4-e106-439a-892c-a0c115bb998f\",\"type\":\"BasicTicker\"}},\"id\":\"528f99ec-8418-4b94-b2a4-39f13d013066\",\"type\":\"Grid\"},{\"attributes\":{\"plot\":null,\"text\":\"Tone Analysis of Judge Kavanaugh's Openning Statement\",\"text_font_size\":{\"value\":\"14pt\"}},\"id\":\"b48d39c8-c123-45f7-8937-2f7bd992453b\",\"type\":\"Title\"},{\"attributes\":{\"active_drag\":\"auto\",\"active_inspect\":\"auto\",\"active_multi\":null,\"active_scroll\":\"auto\",\"active_tap\":\"auto\",\"tools\":[{\"id\":\"680b2b2d-b263-422f-aab2-1109be7364d9\",\"type\":\"PanTool\"},{\"id\":\"e6a0bc0d-822e-4b49-baf9-716d71dd20c2\",\"type\":\"WheelZoomTool\"},{\"id\":\"89947253-338d-4d63-86af-91a6f4159279\",\"type\":\"BoxZoomTool\"},{\"id\":\"9866a8db-70ed-4921-a3ea-bc3000880f17\",\"type\":\"SaveTool\"},{\"id\":\"d0d49df5-f693-4bc9-a41b-c9e871f7dfd8\",\"type\":\"ResetTool\"},{\"id\":\"efa886fd-affe-4846-8f34-48f8a57b3059\",\"type\":\"HelpTool\"}]},\"id\":\"7cfedd6b-c201-4ab0-b207-ce8ddc62c048\",\"type\":\"Toolbar\"},{\"attributes\":{\"formatter\":{\"id\":\"9ab8f956-452a-4994-b4fe-a5d76e4285ed\",\"type\":\"BasicTickFormatter\"},\"plot\":{\"id\":\"c08a7bad-77bd-4d71-aa5b-10eb2f26651f\",\"subtype\":\"Figure\",\"type\":\"Plot\"},\"ticker\":{\"id\":\"ac9e16d4-e106-439a-892c-a0c115bb998f\",\"type\":\"BasicTicker\"}},\"id\":\"cdebc0ac-8ee1-43d5-822f-3eabad60c870\",\"type\":\"LinearAxis\"},{\"attributes\":{\"callback\":null,\"factors\":[\"analytical\",\"anger\",\"confident\",\"fear\",\"joy\",\"sadness\",\"tentative\"]},\"id\":\"ae3c7ee9-9e4f-43ab-9e78-5490d6746268\",\"type\":\"FactorRange\"},{\"attributes\":{},\"id\":\"0fe118bf-e390-49db-800a-9dbb567711f0\",\"type\":\"CategoricalScale\"},{\"attributes\":{},\"id\":\"122c1c26-70aa-4583-b0b2-f80d646eff62\",\"type\":\"LinearScale\"}],\"root_ids\":[\"c08a7bad-77bd-4d71-aa5b-10eb2f26651f\"]},\"title\":\"Bokeh Application\",\"version\":\"0.13.0\"}};\n", | |
| " var render_items = [{\"docid\":\"6810f401-00cd-4a2a-9c8a-c5c3585aff1a\",\"roots\":{\"c08a7bad-77bd-4d71-aa5b-10eb2f26651f\":\"d2547d91-b9c0-44bc-807a-2e805c1f9194\"}}];\n", | |
| " root.Bokeh.embed.embed_items_notebook(docs_json, render_items);\n", | |
| "\n", | |
| " }\n", | |
| " if (root.Bokeh !== undefined) {\n", | |
| " embed_document(root);\n", | |
| " } else {\n", | |
| " var attempts = 0;\n", | |
| " var timer = setInterval(function(root) {\n", | |
| " if (root.Bokeh !== undefined) {\n", | |
| " embed_document(root);\n", | |
| " clearInterval(timer);\n", | |
| " }\n", | |
| " attempts++;\n", | |
| " if (attempts > 100) {\n", | |
| " console.log(\"Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing\")\n", | |
| " clearInterval(timer);\n", | |
| " }\n", | |
| " }, 10, root)\n", | |
| " }\n", | |
| "})(window);" | |
| ], | |
| "application/vnd.bokehjs_exec.v0+json": "" | |
| }, | |
| "metadata": { | |
| "application/vnd.bokehjs_exec.v0+json": { | |
| "id": "c08a7bad-77bd-4d71-aa5b-10eb2f26651f" | |
| } | |
| }, | |
| "output_type": "display_data" | |
| } | |
| ], | |
| "source": [ | |
| "from bokeh.palettes import Spectral7\n", | |
| "output_notebook()\n", | |
| "\n", | |
| "x = ['analytical', 'anger', 'confident', 'fear', 'joy', 'sadness', 'tentative']\n", | |
| " \n", | |
| "y = [75.19, 62.19, 77.74, 78.74, 63.71, 58.10, 82.66]\n", | |
| "\n", | |
| "\n", | |
| "source = ColumnDataSource(data=dict(x=x, y=y, color=Spectral7))\n", | |
| "p = figure(x_range=x, y_range=(0, 100), title=\"Intensity of Tone in Judge Kavanaugh's Openning Statement\")\n", | |
| "p.title.text_font_size = '14pt'\n", | |
| "p.xaxis.major_label_orientation = np.pi/4 # radians, \"horizontal\", \"vertical\", \"normal\"\n", | |
| "p.xaxis.major_label_text_font_size = '14pt'\n", | |
| "\n", | |
| "p.vbar(x='x', top='y' , width=0.5, color = 'color', source=source)\n", | |
| "\n", | |
| "labels = LabelSet(x='x', y='y', text='y', level='glyph',\n", | |
| " x_offset=-10.5, y_offset=0, source=source, render_mode='canvas')\n", | |
| "p.add_layout(labels)\n", | |
| "\n", | |
| "show(p)" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "metadata": {}, | |
| "source": [ | |
| "This analysis once again is not complete, as it is based on text data solely. It would certainly bolster the analysis to conduct this on phonetic data. I also only specified every sentence to have only one emotion for clarity of the results, however, I would recommend further analyses to account for multiple emotion sentences." | |
| ] | |
| } | |
| ], | |
| "metadata": { | |
| "kernelspec": { | |
| "display_name": "Python [conda root]", | |
| "language": "python", | |
| "name": "conda-root-py" | |
| }, | |
| "language_info": { | |
| "codemirror_mode": { | |
| "name": "ipython", | |
| "version": 3 | |
| }, | |
| "file_extension": ".py", | |
| "mimetype": "text/x-python", | |
| "name": "python", | |
| "nbconvert_exporter": "python", | |
| "pygments_lexer": "ipython3", | |
| "version": "3.6.4" | |
| } | |
| }, | |
| "nbformat": 4, | |
| "nbformat_minor": 2 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment