{ "cells": [ { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2019-11-24T16:01:56.598199Z", "start_time": "2019-11-24T16:01:56.589985Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [ { "data": { "text/html": [ "\n", "
" ], "text/plain": [ "" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "from IPython.display import HTML\n", "\n", "HTML('''\n", "
''')" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "#
Small World Effect on Twitter
\n", "\n", "###
Final Report
\n", "\n", "---\n", "\n", "####
by Kristóf Furuglyás
\n", "#####
2019. 11. 24.
\n" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "skip" } }, "source": [ "_Disclaimer: if you do not see the raw code, consider toggling them at the top of the page_" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Introduction\n", "\n", "This short report is made to summarize my overall work with twitter data and to give a handful insight for those who want to recreate it. The task and the prerequisites can be found on the [lecture's private Github repo](https://github.com/sdam-elte/dslab2019/tree/master/projects/09-twitter_small_world). If one wants to hide the raw codes, they shall consider toggling them on or off at the top of the page. The format of this report is an $\\textit{ipynb}$ file which can be shown using [$\\texttt{Jupyter Nbviewer}$](https://nbviewer.jupyter.org/). Most of the packages that have been used here, had already been explored during the [Data exploration and vizalization](https://github.com/sdam-elte/data-exp-vis-2019) course. All the work was done in Python3.\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "[Twitter](https://twitter.com) is an open social media platform where users are free to share their thoughts, opinions in a so-called $\\textit{tweet}$. These tweets contain many information apart from the raw text. It can contain images, locations, links to websites, etc. However, in this particular report, the text is in focus. A network created from these words occurring in tweets, could give a help in the observation of the contemporary online languge through natural language processing (NLP). Our main suggestion is that this network is a small-world network -- see scale-free networks by Barabási et al. [here](https://science.sciencemag.org/content/286/5439/509.full) and small-world effect by Watts & Storgratz [here](https://www.nature.com/articles/30918.). Both topics will be discussed later, also." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "During this semester, the plan was the following:\n", "\n", "1. __Set up Twitter API:__ to access tweets smoothly, numerous python packages are available, nonetheless, all do require the user to be a developer granted developer rights to create a Twitter application programming interface (API).\n", "\n", "2. __Gather tweets:__ once one has every legal right, next step is to obtain plenty of tweets. This means regularizing a stream of tweets by applying different filters (location, hashtags, etc.).\n", "\n", "3. __Clean the tweets:__ since a word can appear in many format (e.g.: run, running, runner), it is indispensable to clear the unnecessary things off the words.\n", "\n", "4. __Creating word-graph:__ a word-graph is such a network that has words as nodes and weighted edges by the number of co-occurrences of two words.\n", "\n", "5. __Exploring small-world properties:__ as it has been mentioned before, many interesting features of nowadays' language can be shown with the help of network science.\n", "\n" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## __Setting up an API__\n", "\n", "GDPR is the European regulation about handling online personal data. Since I would be working with many of that, I was required to fill in a form, stating that I am never going to give any information to any governmental institution nor publish any personal data. Furthermore, I had to consent that I am not a terrorist and my work is purely for educational purposes. After this procedure, I was granted developer rights, which meant authentication mostly. Below one can see a snapshot of the login screen.\n", "\n", "
\n", "\n", "\n", "
\n", " \"tw_api\"\n", "
\n", "
\n", " The login screen of the Twitter developer API.\n", "
\n", "
" ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2019-12-10T12:02:27.041657Z", "start_time": "2019-12-10T12:02:26.779380Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Populating the interactive namespace from numpy and matplotlib\n" ] } ], "source": [ "%pylab inline" ] }, { "cell_type": "code", "execution_count": 12, "metadata": { "ExecuteTime": { "end_time": "2019-12-10T12:06:07.180422Z", "start_time": "2019-12-10T12:06:07.173202Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "# Yes, I am going to need all of these.\n", "\n", "import sys\n", "import pandas as pd\n", "import json\n", "import re\n", "import nltk\n", "import numpy as np\n", "import networkx as nx\n", "import operator\n", "import plotly.graph_objects as go\n", "import plotly\n", "import folium\n", "import collections\n", "from collections import Counter\n", "from nltk.stem import SnowballStemmer\n", "import matplotlib.pyplot as plt\n", "from scipy.optimize import curve_fit\n", "import itertools\n", "import pickle\n", "from tweepy.streaming import StreamListener\n", "from tweepy import OAuthHandler\n", "from tweepy import Stream\n", "\n", "sys.path.insert(1, '/home/workdir/')\n", "import twitter_credentials # Here are the credentials stored" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Gathering tweets\n", "\n", "Gather the tweets was done using the $\\texttt{tweepy}$ package. The restriction was about the location of the tweets; I only streamed those tweets, which are located in a square around England. The codes below are from [vprusso's tutorial](https://github.com/vprusso/youtube_tutorials/blob/master/twitter_python/part_1_streaming_tweets/tweepy_streamer.py). The output of the stream was multiple $\\textit{.json}$ files. The handling for this filetypes had also been discussed at the $\\texttt{dataexp}$ course, therefore I am not explaining here the details. This means that it is basically a nested dict with different types of keys. For the main project I streamed $\\sim 8500$ tweets, that took about an hour." ] }, { "cell_type": "code", "execution_count": 13, "metadata": { "ExecuteTime": { "end_time": "2019-12-10T12:06:08.177054Z", "start_time": "2019-12-10T12:06:08.172804Z" }, "cell_style": "center", "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "# # # # TWITTER STREAMER # # # #\n", "class TwitterStreamer():\n", " \"\"\"\n", " Class for streaming and processing live tweets.\n", " \"\"\"\n", " def __init__(self):\n", " pass\n", "\n", " def stream_tweets(self, fetched_tweets_filename, hash_tag_list):\n", " # This handles Twitter authetification and the connection to Twitter Streaming API\n", " listener = StdOutListener(fetched_tweets_filename)\n", " auth = OAuthHandler(twitter_credentials.CONSUMER_KEY, twitter_credentials.CONSUMER_SECRET)\n", " auth.set_access_token(twitter_credentials.ACCESS_TOKEN, twitter_credentials.ACCESS_TOKEN_SECRET)\n", " stream = Stream(auth, listener)\n", "\n", " # This line filter Twitter Streams to capture data by the keywords: \n", " stream.filter(track=hash_tag_list)" ] }, { "cell_type": "code", "execution_count": 14, "metadata": { "ExecuteTime": { "end_time": "2019-12-10T12:06:08.421136Z", "start_time": "2019-12-10T12:06:08.411266Z" }, "cell_style": "center", "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "# # # # TWITTER STREAM LISTENER # # # #\n", "class StdOutListener(StreamListener):\n", " \"\"\"\n", " This is a basic listener that just prints received tweets to stdout.\n", " \"\"\"\n", " def __init__(self, fetched_tweets_filename):\n", " self.fetched_tweets_filename = fetched_tweets_filename\n", " self.counter = 0\n", " self.limit = 10\n", "\n", " def on_status(self, status):\n", " try:\n", " userid = status.user.id_str\n", " geo = str(status.coordinates)\n", " if geo != \"None\":\n", " print(userid + ',' + geo)\n", " else:\n", " print(\"No coordinates\")\n", " self.counter += 1\n", " if self.counter < self.limit:\n", " return True\n", " else:\n", " twitterStream.disconnect()\n", " except BaseException as e:\n", " print('failed on_status,',str(e))\n", " time.sleep(5)\n", " \n", " def on_data(self, data):\n", " try:\n", " if self.counter <= self.limit:\n", " print(data)\n", " with open(self.fetched_tweets_filename, 'a') as tf:\n", " tf.write(data)\n", " self.limit += 1\n", " return True\n", " except BaseException as e:\n", " print(\"Error on_data %s\" % str(e))\n", " return True\n", " \n", "\n", " def on_error(self, status):\n", " print(status)" ] }, { "cell_type": "code", "execution_count": 15, "metadata": { "ExecuteTime": { "end_time": "2019-12-10T12:06:18.778374Z", "start_time": "2019-12-10T12:06:08.644049Z" }, "cell_style": "center", "slideshow": { "slide_type": "fragment" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "{\"created_at\":\"Tue Dec 10 12:06:04 +0000 2019\",\"id\":1204371700722348037,\"id_str\":\"1204371700722348037\",\"text\":\"Seen.\",\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/android\\\" rel=\\\"nofollow\\\"\\u003eTwitter for Android\\u003c\\/a\\u003e\",\"truncated\":false,\"in_reply_to_status_id\":null,\"in_reply_to_status_id_str\":null,\"in_reply_to_user_id\":null,\"in_reply_to_user_id_str\":null,\"in_reply_to_screen_name\":null,\"user\":{\"id\":910222392898834435,\"id_str\":\"910222392898834435\",\"name\":\"Alison\",\"screen_name\":\"alisonjbryan\",\"location\":\"Dublin\\/Meath\",\"url\":null,\"description\":\"@SYPIreland - publishing - culture vulture - probably remind you of someone else - big oule nerd\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":214,\"friends_count\":367,\"listed_count\":0,\"favourites_count\":11879,\"statuses_count\":3722,\"created_at\":\"Tue Sep 19 19:21:44 +0000 2017\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"000000\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_tile\":false,\"profile_link_color\":\"19CF86\",\"profile_sidebar_border_color\":\"000000\",\"profile_sidebar_fill_color\":\"000000\",\"profile_text_color\":\"000000\",\"profile_use_background_image\":false,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1134098380857184257\\/ICU7Ar2u_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1134098380857184257\\/ICU7Ar2u_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/910222392898834435\\/1557245722\",\"default_profile\":false,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"e59069aafae0aa25\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/e59069aafae0aa25.json\",\"place_type\":\"city\",\"name\":\"South Dublin\",\"full_name\":\"South Dublin, Ireland\",\"country_code\":\"IE\",\"country\":\"Ireland\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[-6.546814,53.178753],[-6.546814,53.368252],[-6.252228,53.368252],[-6.252228,53.178753]]]},\"attributes\":{}},\"contributors\":null,\"quoted_status_id\":1204231592283119623,\"quoted_status_id_str\":\"1204231592283119623\",\"quoted_status\":{\"created_at\":\"Tue Dec 10 02:49:19 +0000 2019\",\"id\":1204231592283119623,\"id_str\":\"1204231592283119623\",\"text\":\"i don't want to \\\"do things\\\" or \\\"take care of myself\\\" i want to \\\"sit very still\\\" and \\\"eat noodles\\\"\",\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/android\\\" rel=\\\"nofollow\\\"\\u003eTwitter for Android\\u003c\\/a\\u003e\",\"truncated\":false,\"in_reply_to_status_id\":null,\"in_reply_to_status_id_str\":null,\"in_reply_to_user_id\":null,\"in_reply_to_user_id_str\":null,\"in_reply_to_screen_name\":null,\"user\":{\"id\":105503107,\"id_str\":\"105503107\",\"name\":\"Matt.\",\"screen_name\":\"MattTheBrand\",\"location\":\"tiffany pollard\",\"url\":\"http:\\/\\/instagram.com\\/mattthebrand\",\"description\":\"i will not rest until i am tired \\u2022 top tweets http:\\/\\/bit.ly\\/2VpwR2C \\u2022 off-brand content @mattthealt\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":17883,\"friends_count\":419,\"listed_count\":55,\"favourites_count\":29931,\"statuses_count\":7991,\"created_at\":\"Sat Jan 16 15:03:35 +0000 2010\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"022330\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme15\\/bg.png\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme15\\/bg.png\",\"profile_background_tile\":false,\"profile_link_color\":\"0084B4\",\"profile_sidebar_border_color\":\"A8C7F7\",\"profile_sidebar_fill_color\":\"C0DFEC\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1201005894261186560\\/IfTX3pVx_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1201005894261186560\\/IfTX3pVx_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/105503107\\/1574225369\",\"default_profile\":false,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":null,\"contributors\":null,\"is_quote_status\":false,\"quote_count\":59,\"reply_count\":37,\"retweet_count\":3378,\"favorite_count\":14333,\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"en\"},\"quoted_status_permalink\":{\"url\":\"https:\\/\\/t.co\\/aio721ilbo\",\"expanded\":\"https:\\/\\/twitter.com\\/MattTheBrand\\/status\\/1204231592283119623\",\"display\":\"twitter.com\\/MattTheBrand\\/s\\u2026\"},\"is_quote_status\":true,\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"en\",\"timestamp_ms\":\"1575979564253\"}\n", "\n", "{\"created_at\":\"Tue Dec 10 12:06:04 +0000 2019\",\"id\":1204371703041810432,\"id_str\":\"1204371703041810432\",\"text\":\"Let there be love... #painting #spraylove #sprayart #stencilart #gift #art #artgift #giftideas #graffiti #basquiat\\u2026 https:\\/\\/t.co\\/4US4JbAVpv\",\"source\":\"\\u003ca href=\\\"http:\\/\\/instagram.com\\\" rel=\\\"nofollow\\\"\\u003eInstagram\\u003c\\/a\\u003e\",\"truncated\":true,\"in_reply_to_status_id\":null,\"in_reply_to_status_id_str\":null,\"in_reply_to_user_id\":null,\"in_reply_to_user_id_str\":null,\"in_reply_to_screen_name\":null,\"user\":{\"id\":303895045,\"id_str\":\"303895045\",\"name\":\"Walton Fine Arts\",\"screen_name\":\"Waltonfinearts\",\"location\":\"London, UK\",\"url\":\"http:\\/\\/www.waltonfinearts.com\",\"description\":\"Largest Gallery for #BlueChip #Art & #EmergingTalent #StreetArt #PopArt #London Representing #Bambi #Escobar #VanDonna #neonart.. #Banksy #Warhol\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":2636,\"friends_count\":746,\"listed_count\":97,\"favourites_count\":1248,\"statuses_count\":2727,\"created_at\":\"Mon May 23 16:00:53 +0000 2011\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"C0DEED\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_tile\":true,\"profile_link_color\":\"0084B4\",\"profile_sidebar_border_color\":\"FFFFFF\",\"profile_sidebar_fill_color\":\"DDEEF6\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":false,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/477473946032287745\\/EnePFb_L_normal.jpeg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/477473946032287745\\/EnePFb_L_normal.jpeg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/303895045\\/1431521016\",\"default_profile\":false,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":{\"type\":\"Point\",\"coordinates\":[51.4946295,-0.167411]},\"coordinates\":{\"type\":\"Point\",\"coordinates\":[-0.167411,51.4946295]},\"place\":{\"id\":\"01c7ed8caf11e8b2\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/01c7ed8caf11e8b2.json\",\"place_type\":\"city\",\"name\":\"Kensington\",\"full_name\":\"Kensington, London\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[-0.228589,51.477225],[-0.228589,51.530348],[-0.149791,51.530348],[-0.149791,51.477225]]]},\"attributes\":{}},\"contributors\":null,\"is_quote_status\":false,\"extended_tweet\":{\"full_text\":\"Let there be love... #painting #spraylove #sprayart #stencilart #gift #art #artgift #giftideas #graffiti #basquiat #notbanksy @ Walton Fine Arts https:\\/\\/t.co\\/sUvGOZnh6f\",\"display_text_range\":[0,168],\"entities\":{\"hashtags\":[{\"text\":\"painting\",\"indices\":[21,30]},{\"text\":\"spraylove\",\"indices\":[31,41]},{\"text\":\"sprayart\",\"indices\":[42,51]},{\"text\":\"stencilart\",\"indices\":[52,63]},{\"text\":\"gift\",\"indices\":[64,69]},{\"text\":\"art\",\"indices\":[70,74]},{\"text\":\"artgift\",\"indices\":[75,83]},{\"text\":\"giftideas\",\"indices\":[84,94]},{\"text\":\"graffiti\",\"indices\":[95,104]},{\"text\":\"basquiat\",\"indices\":[105,114]},{\"text\":\"notbanksy\",\"indices\":[115,125]}],\"urls\":[{\"url\":\"https:\\/\\/t.co\\/sUvGOZnh6f\",\"expanded_url\":\"https:\\/\\/www.instagram.com\\/p\\/B55CUVngkcF\\/?igshid=xd3byltmpa6e\",\"display_url\":\"instagram.com\\/p\\/B55CUVngkcF\\/\\u2026\",\"indices\":[145,168]}],\"user_mentions\":[],\"symbols\":[]}},\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[{\"text\":\"painting\",\"indices\":[21,30]},{\"text\":\"spraylove\",\"indices\":[31,41]},{\"text\":\"sprayart\",\"indices\":[42,51]},{\"text\":\"stencilart\",\"indices\":[52,63]},{\"text\":\"gift\",\"indices\":[64,69]},{\"text\":\"art\",\"indices\":[70,74]},{\"text\":\"artgift\",\"indices\":[75,83]},{\"text\":\"giftideas\",\"indices\":[84,94]},{\"text\":\"graffiti\",\"indices\":[95,104]},{\"text\":\"basquiat\",\"indices\":[105,114]}],\"urls\":[{\"url\":\"https:\\/\\/t.co\\/4US4JbAVpv\",\"expanded_url\":\"https:\\/\\/twitter.com\\/i\\/web\\/status\\/1204371703041810432\",\"display_url\":\"twitter.com\\/i\\/web\\/status\\/1\\u2026\",\"indices\":[116,139]}],\"user_mentions\":[],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"possibly_sensitive\":false,\"filter_level\":\"low\",\"lang\":\"en\",\"timestamp_ms\":\"1575979564806\"}\n", "\n", "{\"created_at\":\"Tue Dec 10 12:06:04 +0000 2019\",\"id\":1204371703297724416,\"id_str\":\"1204371703297724416\",\"text\":\"@SFORZANTO2711 @ParaDemonX @JokerFleck2 @TaskForcePrice @grayghost84 @dts1186 @LordSmarmyPants @MisterJonDoe297\\u2026 https:\\/\\/t.co\\/pl1qvjs99d\",\"display_text_range\":[117,140],\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/android\\\" rel=\\\"nofollow\\\"\\u003eTwitter for Android\\u003c\\/a\\u003e\",\"truncated\":true,\"in_reply_to_status_id\":1204370664578146305,\"in_reply_to_status_id_str\":\"1204370664578146305\",\"in_reply_to_user_id\":163670222,\"in_reply_to_user_id_str\":\"163670222\",\"in_reply_to_screen_name\":\"SFORZANTO2711\",\"user\":{\"id\":1202552911651323909,\"id_str\":\"1202552911651323909\",\"name\":\"Return Of The Mack\",\"screen_name\":\"JustinO54092729\",\"location\":null,\"url\":null,\"description\":\"#ReleaseTheSnyderCut 214\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":33,\"friends_count\":179,\"listed_count\":0,\"favourites_count\":219,\"statuses_count\":80,\"created_at\":\"Thu Dec 05 11:39:05 +0000 2019\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"F5F8FA\",\"profile_background_image_url\":\"\",\"profile_background_image_url_https\":\"\",\"profile_background_tile\":false,\"profile_link_color\":\"1DA1F2\",\"profile_sidebar_border_color\":\"C0DEED\",\"profile_sidebar_fill_color\":\"DDEEF6\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1203087934917955585\\/x-OVcAOC_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1203087934917955585\\/x-OVcAOC_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/1202552911651323909\\/1575548432\",\"default_profile\":true,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"42b23fa9d1cdfb5b\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/42b23fa9d1cdfb5b.json\",\"place_type\":\"city\",\"name\":\"Bangor\",\"full_name\":\"Bangor, Northern Ireland\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[-5.718275,54.624394],[-5.718275,54.670947],[-5.616927,54.670947],[-5.616927,54.624394]]]},\"attributes\":{}},\"contributors\":null,\"is_quote_status\":false,\"extended_tweet\":{\"full_text\":\"@SFORZANTO2711 @ParaDemonX @JokerFleck2 @TaskForcePrice @grayghost84 @dts1186 @LordSmarmyPants @MisterJonDoe297 @HarukoHitomi @AbsolutSuperman \\ud83e\\udd1c\\ud83d\\udca5#ReleaseTheSnyderCut\\ud83d\\udca5\\ud83e\\udd1b\",\"display_text_range\":[143,167],\"entities\":{\"hashtags\":[{\"text\":\"ReleaseTheSnyderCut\",\"indices\":[145,165]}],\"urls\":[],\"user_mentions\":[{\"screen_name\":\"SFORZANTO2711\",\"name\":\"SFORZANTO2711~ReleaseTheSnyderCut\",\"id\":163670222,\"id_str\":\"163670222\",\"indices\":[0,14]},{\"screen_name\":\"ParaDemonX\",\"name\":\"-\\u03a9- JOKER -\\u03a9-\",\"id\":1158107755565240320,\"id_str\":\"1158107755565240320\",\"indices\":[15,26]},{\"screen_name\":\"JokerFleck2\",\"name\":\"\\u2615 JokerFleck - Having A Tea Party\",\"id\":1188714930939277312,\"id_str\":\"1188714930939277312\",\"indices\":[27,39]},{\"screen_name\":\"TaskForcePrice\",\"name\":\"Captain Price [RTSC]\",\"id\":1189600113427189765,\"id_str\":\"1189600113427189765\",\"indices\":[40,55]},{\"screen_name\":\"grayghost84\",\"name\":\"Chris \\ud83e\\udd87I\\u2764\\ufe0fZS\\ud83e\\udd87 #ReleaseTheSnyderCut\",\"id\":701193079798177792,\"id_str\":\"701193079798177792\",\"indices\":[56,68]},{\"screen_name\":\"dts1186\",\"name\":\"dts1186\",\"id\":238833147,\"id_str\":\"238833147\",\"indices\":[69,77]},{\"screen_name\":\"LordSmarmyPants\",\"name\":\"Lord SmarmyPants #ReleaseTheSnyderCut\",\"id\":1145482317189865472,\"id_str\":\"1145482317189865472\",\"indices\":[78,94]},{\"screen_name\":\"MisterJonDoe297\",\"name\":\"Bruce Wayne #ReleaseTheSnyderCut\",\"id\":1189438023433216000,\"id_str\":\"1189438023433216000\",\"indices\":[95,111]},{\"screen_name\":\"HarukoHitomi\",\"name\":\"\\u30cf\\u30c3\\u30d4\\u30fc #CYBERPUNKAPRIL2020\",\"id\":1028097188331704320,\"id_str\":\"1028097188331704320\",\"indices\":[112,125]},{\"screen_name\":\"AbsolutSuperman\",\"name\":\"Kal-El of Krypton #ReleaseTheSnyderCut\",\"id\":901448569567289345,\"id_str\":\"901448569567289345\",\"indices\":[126,142]}],\"symbols\":[]}},\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[],\"urls\":[{\"url\":\"https:\\/\\/t.co\\/pl1qvjs99d\",\"expanded_url\":\"https:\\/\\/twitter.com\\/i\\/web\\/status\\/1204371703297724416\",\"display_url\":\"twitter.com\\/i\\/web\\/status\\/1\\u2026\",\"indices\":[113,136]}],\"user_mentions\":[{\"screen_name\":\"SFORZANTO2711\",\"name\":\"SFORZANTO2711~ReleaseTheSnyderCut\",\"id\":163670222,\"id_str\":\"163670222\",\"indices\":[0,14]},{\"screen_name\":\"ParaDemonX\",\"name\":\"-\\u03a9- JOKER -\\u03a9-\",\"id\":1158107755565240320,\"id_str\":\"1158107755565240320\",\"indices\":[15,26]},{\"screen_name\":\"JokerFleck2\",\"name\":\"\\u2615 JokerFleck - Having A Tea Party\",\"id\":1188714930939277312,\"id_str\":\"1188714930939277312\",\"indices\":[27,39]},{\"screen_name\":\"TaskForcePrice\",\"name\":\"Captain Price [RTSC]\",\"id\":1189600113427189765,\"id_str\":\"1189600113427189765\",\"indices\":[40,55]},{\"screen_name\":\"grayghost84\",\"name\":\"Chris \\ud83e\\udd87I\\u2764\\ufe0fZS\\ud83e\\udd87 #ReleaseTheSnyderCut\",\"id\":701193079798177792,\"id_str\":\"701193079798177792\",\"indices\":[56,68]},{\"screen_name\":\"dts1186\",\"name\":\"dts1186\",\"id\":238833147,\"id_str\":\"238833147\",\"indices\":[69,77]},{\"screen_name\":\"LordSmarmyPants\",\"name\":\"Lord SmarmyPants #ReleaseTheSnyderCut\",\"id\":1145482317189865472,\"id_str\":\"1145482317189865472\",\"indices\":[78,94]},{\"screen_name\":\"MisterJonDoe297\",\"name\":\"Bruce Wayne #ReleaseTheSnyderCut\",\"id\":1189438023433216000,\"id_str\":\"1189438023433216000\",\"indices\":[95,111]}],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"und\",\"timestamp_ms\":\"1575979564867\"}\n", "\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{\"created_at\":\"Tue Dec 10 12:06:05 +0000 2019\",\"id\":1204371705721962499,\"id_str\":\"1204371705721962499\",\"text\":\"@BillyKilby @Arsenal I've never seen him play well. I'd rather Upamecano\",\"display_text_range\":[21,72],\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/android\\\" rel=\\\"nofollow\\\"\\u003eTwitter for Android\\u003c\\/a\\u003e\",\"truncated\":false,\"in_reply_to_status_id\":1204087547644788737,\"in_reply_to_status_id_str\":\"1204087547644788737\",\"in_reply_to_user_id\":599992465,\"in_reply_to_user_id_str\":\"599992465\",\"in_reply_to_screen_name\":\"BillyKilby\",\"user\":{\"id\":438632479,\"id_str\":\"438632479\",\"name\":\"Tom RH\",\"screen_name\":\"Tomrh1988\",\"location\":\"Maidstone, Kent\",\"url\":null,\"description\":null,\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":357,\"friends_count\":446,\"listed_count\":6,\"favourites_count\":2380,\"statuses_count\":19666,\"created_at\":\"Fri Dec 16 20:41:34 +0000 2011\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"C0DEED\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_tile\":false,\"profile_link_color\":\"0084B4\",\"profile_sidebar_border_color\":\"FFFFFF\",\"profile_sidebar_fill_color\":\"DDEEF6\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1150438047181418496\\/F-JJ5zNS_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1150438047181418496\\/F-JJ5zNS_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/438632479\\/1559324632\",\"default_profile\":false,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"4cb7ff8db49dfaa0\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/4cb7ff8db49dfaa0.json\",\"place_type\":\"city\",\"name\":\"Ashford\",\"full_name\":\"Ashford, England\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[0.825135,51.118763],[0.825135,51.165088],[0.921108,51.165088],[0.921108,51.118763]]]},\"attributes\":{}},\"contributors\":null,\"is_quote_status\":false,\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[{\"screen_name\":\"BillyKilby\",\"name\":\"CRAZYGOONER\",\"id\":599992465,\"id_str\":\"599992465\",\"indices\":[0,11]},{\"screen_name\":\"Arsenal\",\"name\":\"Arsenal\",\"id\":34613288,\"id_str\":\"34613288\",\"indices\":[12,20]}],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"en\",\"timestamp_ms\":\"1575979565445\"}\n", "\n", "{\"created_at\":\"Tue Dec 10 12:06:05 +0000 2019\",\"id\":1204371707953369088,\"id_str\":\"1204371707953369088\",\"text\":\"@SmithChristian4 happy birthday big man \\ud83c\\udf7a\\ud83c\\udf7a\",\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/iphone\\\" rel=\\\"nofollow\\\"\\u003eTwitter for iPhone\\u003c\\/a\\u003e\",\"truncated\":false,\"in_reply_to_status_id\":null,\"in_reply_to_status_id_str\":null,\"in_reply_to_user_id\":70197125,\"in_reply_to_user_id_str\":\"70197125\",\"in_reply_to_screen_name\":\"SmithChristian4\",\"user\":{\"id\":2562009760,\"id_str\":\"2562009760\",\"name\":\"Hawksey\",\"screen_name\":\"sportmademe\",\"location\":\"maldon essex\",\"url\":null,\"description\":\"Ex Heybridge Swifts and Chelmsford City manager , current Willingale cc all rounder. currently assistant manager of saffron Walden\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":613,\"friends_count\":1213,\"listed_count\":4,\"favourites_count\":1073,\"statuses_count\":2272,\"created_at\":\"Sat May 24 14:03:10 +0000 2014\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"C0DEED\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_tile\":false,\"profile_link_color\":\"1DA1F2\",\"profile_sidebar_border_color\":\"C0DEED\",\"profile_sidebar_fill_color\":\"DDEEF6\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/993587168177197056\\/WMpajpYi_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/993587168177197056\\/WMpajpYi_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/2562009760\\/1492801288\",\"default_profile\":true,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"56d89a0e1a53343b\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/56d89a0e1a53343b.json\",\"place_type\":\"city\",\"name\":\"Aingers Green\",\"full_name\":\"Aingers Green, England\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[1.068255,51.838190],[1.068255,51.844067],[1.077043,51.844067],[1.077043,51.838190]]]},\"attributes\":{}},\"contributors\":null,\"is_quote_status\":false,\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[{\"screen_name\":\"SmithChristian4\",\"name\":\"Christian Smith\",\"id\":70197125,\"id_str\":\"70197125\",\"indices\":[0,16]}],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"en\",\"timestamp_ms\":\"1575979565977\"}\n", "\n", "{\"created_at\":\"Tue Dec 10 12:06:07 +0000 2019\",\"id\":1204371712424529920,\"id_str\":\"1204371712424529920\",\"text\":\"Such a shame to see her like this, wired up to that IVA tube .....\",\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/iphone\\\" rel=\\\"nofollow\\\"\\u003eTwitter for iPhone\\u003c\\/a\\u003e\",\"truncated\":false,\"in_reply_to_status_id\":null,\"in_reply_to_status_id_str\":null,\"in_reply_to_user_id\":null,\"in_reply_to_user_id_str\":null,\"in_reply_to_screen_name\":null,\"user\":{\"id\":226555114,\"id_str\":\"226555114\",\"name\":\"Rockcliffe Files\",\"screen_name\":\"RockcliffeFiles\",\"location\":\"Whitley Bay, Tyne & Wear\",\"url\":\"http:\\/\\/www.shacknet.co.uk\",\"description\":\"Music, coats, shoes, Stoke City, The Rockcliffe, Michael Head, The Labour Party, Lorraine Kelly, me cats and the bairn ....\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":2948,\"friends_count\":2113,\"listed_count\":36,\"favourites_count\":21855,\"statuses_count\":79703,\"created_at\":\"Tue Dec 14 13:27:01 +0000 2010\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"8B542B\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme8\\/bg.gif\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme8\\/bg.gif\",\"profile_background_tile\":false,\"profile_link_color\":\"9D582E\",\"profile_sidebar_border_color\":\"D9B17E\",\"profile_sidebar_fill_color\":\"EADEAA\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1189840115197259782\\/sDu9OkxM_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1189840115197259782\\/sDu9OkxM_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/226555114\\/1567753910\",\"default_profile\":false,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"6dd4aeb802da9f28\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/6dd4aeb802da9f28.json\",\"place_type\":\"city\",\"name\":\"Newcastle Upon Tyne\",\"full_name\":\"Newcastle Upon Tyne, England\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[-1.693792,54.960055],[-1.693792,55.024056],[-1.596931,55.024056],[-1.596931,54.960055]]]},\"attributes\":{}},\"contributors\":null,\"quoted_status_id\":1204337944657645568,\"quoted_status_id_str\":\"1204337944657645568\",\"quoted_status\":{\"created_at\":\"Tue Dec 10 09:51:56 +0000 2019\",\"id\":1204337944657645568,\"id_str\":\"1204337944657645568\",\"text\":\"I was left like this on a stairwell for 3.5 years waiting for Brexit. NO BEDS!\\n\\nThank you to the homeless man who c\\u2026 https:\\/\\/t.co\\/Q70FzDKRip\",\"display_text_range\":[0,140],\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/iphone\\\" rel=\\\"nofollow\\\"\\u003eTwitter for iPhone\\u003c\\/a\\u003e\",\"truncated\":true,\"in_reply_to_status_id\":null,\"in_reply_to_status_id_str\":null,\"in_reply_to_user_id\":null,\"in_reply_to_user_id_str\":null,\"in_reply_to_screen_name\":null,\"user\":{\"id\":21439144,\"id_str\":\"21439144\",\"name\":\"Katie Hopkins\",\"screen_name\":\"KTHopkins\",\"location\":null,\"url\":null,\"description\":\"Milo\\u2019s Mum. The Female Farage. Angry Ellen de Generes. The Biggest Bitch in Britain. katie@katiehopkins.co.uk\",\"translator_type\":\"none\",\"protected\":false,\"verified\":true,\"followers_count\":1053986,\"friends_count\":78,\"listed_count\":3685,\"favourites_count\":89,\"statuses_count\":35996,\"created_at\":\"Fri Feb 20 22:01:54 +0000 2009\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":false,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"FF33CC\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_tile\":false,\"profile_link_color\":\"0004FA\",\"profile_sidebar_border_color\":\"FFFFFF\",\"profile_sidebar_fill_color\":\"00CCFF\",\"profile_text_color\":\"050505\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/915081489573974016\\/esP5WVn-_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/915081489573974016\\/esP5WVn-_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/21439144\\/1565370706\",\"default_profile\":false,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":null,\"contributors\":null,\"is_quote_status\":false,\"extended_tweet\":{\"full_text\":\"I was left like this on a stairwell for 3.5 years waiting for Brexit. NO BEDS!\\n\\nThank you to the homeless man who covered my foof with a flag #FloorPics https:\\/\\/t.co\\/n66dUBTb8N\",\"display_text_range\":[0,152],\"entities\":{\"hashtags\":[{\"text\":\"FloorPics\",\"indices\":[142,152]}],\"urls\":[],\"user_mentions\":[],\"symbols\":[],\"media\":[{\"id\":1204337739065438208,\"id_str\":\"1204337739065438208\",\"indices\":[153,176],\"media_url\":\"http:\\/\\/pbs.twimg.com\\/media\\/ELaqyvaXsAAQdU4.jpg\",\"media_url_https\":\"https:\\/\\/pbs.twimg.com\\/media\\/ELaqyvaXsAAQdU4.jpg\",\"url\":\"https:\\/\\/t.co\\/n66dUBTb8N\",\"display_url\":\"pic.twitter.com\\/n66dUBTb8N\",\"expanded_url\":\"https:\\/\\/twitter.com\\/KTHopkins\\/status\\/1204337944657645568\\/photo\\/1\",\"type\":\"photo\",\"sizes\":{\"thumb\":{\"w\":150,\"h\":150,\"resize\":\"crop\"},\"small\":{\"w\":510,\"h\":680,\"resize\":\"fit\"},\"large\":{\"w\":1536,\"h\":2048,\"resize\":\"fit\"},\"medium\":{\"w\":900,\"h\":1200,\"resize\":\"fit\"}}}]},\"extended_entities\":{\"media\":[{\"id\":1204337739065438208,\"id_str\":\"1204337739065438208\",\"indices\":[153,176],\"media_url\":\"http:\\/\\/pbs.twimg.com\\/media\\/ELaqyvaXsAAQdU4.jpg\",\"media_url_https\":\"https:\\/\\/pbs.twimg.com\\/media\\/ELaqyvaXsAAQdU4.jpg\",\"url\":\"https:\\/\\/t.co\\/n66dUBTb8N\",\"display_url\":\"pic.twitter.com\\/n66dUBTb8N\",\"expanded_url\":\"https:\\/\\/twitter.com\\/KTHopkins\\/status\\/1204337944657645568\\/photo\\/1\",\"type\":\"photo\",\"sizes\":{\"thumb\":{\"w\":150,\"h\":150,\"resize\":\"crop\"},\"small\":{\"w\":510,\"h\":680,\"resize\":\"fit\"},\"large\":{\"w\":1536,\"h\":2048,\"resize\":\"fit\"},\"medium\":{\"w\":900,\"h\":1200,\"resize\":\"fit\"}}}]}},\"quote_count\":83,\"reply_count\":244,\"retweet_count\":483,\"favorite_count\":2135,\"entities\":{\"hashtags\":[],\"urls\":[{\"url\":\"https:\\/\\/t.co\\/Q70FzDKRip\",\"expanded_url\":\"https:\\/\\/twitter.com\\/i\\/web\\/status\\/1204337944657645568\",\"display_url\":\"twitter.com\\/i\\/web\\/status\\/1\\u2026\",\"indices\":[117,140]}],\"user_mentions\":[],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"possibly_sensitive\":false,\"filter_level\":\"low\",\"lang\":\"en\"},\"quoted_status_permalink\":{\"url\":\"https:\\/\\/t.co\\/lGHhRXYMi0\",\"expanded\":\"https:\\/\\/twitter.com\\/kthopkins\\/status\\/1204337944657645568\",\"display\":\"twitter.com\\/kthopkins\\/stat\\u2026\"},\"is_quote_status\":true,\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"en\",\"timestamp_ms\":\"1575979567043\"}\n", "\n", "{\"created_at\":\"Tue Dec 10 12:06:07 +0000 2019\",\"id\":1204371712579493888,\"id_str\":\"1204371712579493888\",\"text\":\"Friday night is Christmas party night! Santa crawl will be popping in too theprinceharrypubwindsor\\u2026 https:\\/\\/t.co\\/e8feoxe2MW\",\"source\":\"\\u003ca href=\\\"http:\\/\\/instagram.com\\\" rel=\\\"nofollow\\\"\\u003eInstagram\\u003c\\/a\\u003e\",\"truncated\":true,\"in_reply_to_status_id\":null,\"in_reply_to_status_id_str\":null,\"in_reply_to_user_id\":null,\"in_reply_to_user_id_str\":null,\"in_reply_to_screen_name\":null,\"user\":{\"id\":740607984460541952,\"id_str\":\"740607984460541952\",\"name\":\"Skin&BlisterSisters\",\"screen_name\":\"SkinBlisterSis\",\"location\":\"Windsor, South East\",\"url\":\"https:\\/\\/www.youtube.com\\/channel\\/UCp4VESTUTgd5NGaIKd9ZWbA\",\"description\":\"We are #windsor #singingsisters, @Avrilappleyard & @Rosiemakeup01 who enjoy performing, entertaining, travel and good food. Also famous for Happy Birthday \\ud83c\\udfb5\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":520,\"friends_count\":1924,\"listed_count\":21,\"favourites_count\":2417,\"statuses_count\":1064,\"created_at\":\"Wed Jun 08 18:14:38 +0000 2016\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"000000\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_tile\":false,\"profile_link_color\":\"ABB8C2\",\"profile_sidebar_border_color\":\"000000\",\"profile_sidebar_fill_color\":\"000000\",\"profile_text_color\":\"000000\",\"profile_use_background_image\":false,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/802186185003122689\\/zAm_CVK-_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/802186185003122689\\/zAm_CVK-_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/740607984460541952\\/1531382011\",\"default_profile\":false,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":{\"type\":\"Point\",\"coordinates\":[51.48212400,-0.60677239]},\"coordinates\":{\"type\":\"Point\",\"coordinates\":[-0.60677239,51.48212400]},\"place\":{\"id\":\"51e226ba12571f40\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/51e226ba12571f40.json\",\"place_type\":\"city\",\"name\":\"Windsor\",\"full_name\":\"Windsor, South East\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[-0.662994,51.440818],[-0.662994,51.496320],[-0.600029,51.496320],[-0.600029,51.440818]]]},\"attributes\":{}},\"contributors\":null,\"is_quote_status\":false,\"extended_tweet\":{\"full_text\":\"Friday night is Christmas party night! Santa crawl will be popping in too theprinceharrypubwindsor #12pubsofchristmas #windsor #christmas @simonbaxendale #princeharry @ The Prince Harry Pub Windsor https:\\/\\/t.co\\/dau6b94w2A\",\"display_text_range\":[0,221],\"entities\":{\"hashtags\":[{\"text\":\"12pubsofchristmas\",\"indices\":[99,117]},{\"text\":\"windsor\",\"indices\":[118,126]},{\"text\":\"christmas\",\"indices\":[127,137]},{\"text\":\"princeharry\",\"indices\":[154,166]}],\"urls\":[{\"url\":\"https:\\/\\/t.co\\/dau6b94w2A\",\"expanded_url\":\"https:\\/\\/www.instagram.com\\/p\\/B55CtPQF374\\/?igshid=118ay56wyfk6z\",\"display_url\":\"instagram.com\\/p\\/B55CtPQF374\\/\\u2026\",\"indices\":[198,221]}],\"user_mentions\":[{\"screen_name\":\"simonbaxendale\",\"name\":\"Simon Baxendale\",\"id\":32588465,\"id_str\":\"32588465\",\"indices\":[138,153]}],\"symbols\":[]}},\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[],\"urls\":[{\"url\":\"https:\\/\\/t.co\\/e8feoxe2MW\",\"expanded_url\":\"https:\\/\\/twitter.com\\/i\\/web\\/status\\/1204371712579493888\",\"display_url\":\"twitter.com\\/i\\/web\\/status\\/1\\u2026\",\"indices\":[100,123]}],\"user_mentions\":[],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"possibly_sensitive\":false,\"filter_level\":\"low\",\"lang\":\"en\",\"timestamp_ms\":\"1575979567080\"}\n", "\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{\"created_at\":\"Tue Dec 10 12:06:08 +0000 2019\",\"id\":1204371720351748096,\"id_str\":\"1204371720351748096\",\"text\":\"@singuIaravery have fun today :)\",\"display_text_range\":[15,32],\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/iphone\\\" rel=\\\"nofollow\\\"\\u003eTwitter for iPhone\\u003c\\/a\\u003e\",\"truncated\":false,\"in_reply_to_status_id\":1204361881743441921,\"in_reply_to_status_id_str\":\"1204361881743441921\",\"in_reply_to_user_id\":967449349952364547,\"in_reply_to_user_id_str\":\"967449349952364547\",\"in_reply_to_screen_name\":\"singuIaravery\",\"user\":{\"id\":1160357073038848000,\"id_str\":\"1160357073038848000\",\"name\":\"\\ud83c\\udf52\\u22c6\\u2727 kennedy \\u2727\\u22c6\\ud83c\\udf52\",\"screen_name\":\"corbynvc\",\"location\":\"idk\",\"url\":\"http:\\/\\/instagram.com\\/astrxcqrbyn\",\"description\":\"v indecisive but thats ok\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":197,\"friends_count\":241,\"listed_count\":15,\"favourites_count\":5290,\"statuses_count\":646,\"created_at\":\"Sun Aug 11 01:07:39 +0000 2019\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"F5F8FA\",\"profile_background_image_url\":\"\",\"profile_background_image_url_https\":\"\",\"profile_background_tile\":false,\"profile_link_color\":\"1DA1F2\",\"profile_sidebar_border_color\":\"C0DEED\",\"profile_sidebar_fill_color\":\"DDEEF6\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1200109338356015104\\/3ATFZL2H_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1200109338356015104\\/3ATFZL2H_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/1160357073038848000\\/1575568009\",\"default_profile\":true,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"1cf09e5c15607669\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/1cf09e5c15607669.json\",\"place_type\":\"city\",\"name\":\"Newry\",\"full_name\":\"Newry, Northern Ireland\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[-6.382723,54.144154],[-6.382723,54.206117],[-6.305613,54.206117],[-6.305613,54.144154]]]},\"attributes\":{}},\"contributors\":null,\"is_quote_status\":false,\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[{\"screen_name\":\"singuIaravery\",\"name\":\"alyia TODAY\",\"id\":967449349952364547,\"id_str\":\"967449349952364547\",\"indices\":[0,14]}],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"en\",\"timestamp_ms\":\"1575979568933\"}\n", "\n", "{\"created_at\":\"Tue Dec 10 12:06:09 +0000 2019\",\"id\":1204371722545315840,\"id_str\":\"1204371722545315840\",\"text\":\"LOV my national anthem\",\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/iphone\\\" rel=\\\"nofollow\\\"\\u003eTwitter for iPhone\\u003c\\/a\\u003e\",\"truncated\":false,\"in_reply_to_status_id\":null,\"in_reply_to_status_id_str\":null,\"in_reply_to_user_id\":null,\"in_reply_to_user_id_str\":null,\"in_reply_to_screen_name\":null,\"user\":{\"id\":933318827177324544,\"id_str\":\"933318827177324544\",\"name\":\"rachel69\",\"screen_name\":\"rachelviegas69\",\"location\":null,\"url\":null,\"description\":\"what happens in viegas stays in viegas https:\\/\\/www.paypal.me\\/rviegas6\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":112,\"friends_count\":112,\"listed_count\":0,\"favourites_count\":8443,\"statuses_count\":814,\"created_at\":\"Wed Nov 22 12:58:43 +0000 2017\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"F5F8FA\",\"profile_background_image_url\":\"\",\"profile_background_image_url_https\":\"\",\"profile_background_tile\":false,\"profile_link_color\":\"1DA1F2\",\"profile_sidebar_border_color\":\"C0DEED\",\"profile_sidebar_fill_color\":\"DDEEF6\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1191051780156723200\\/KQZeXUq5_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1191051780156723200\\/KQZeXUq5_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/933318827177324544\\/1537373110\",\"default_profile\":true,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"6dd4aeb802da9f28\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/6dd4aeb802da9f28.json\",\"place_type\":\"city\",\"name\":\"Newcastle Upon Tyne\",\"full_name\":\"Newcastle Upon Tyne, England\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[-1.693792,54.960055],[-1.693792,55.024056],[-1.596931,55.024056],[-1.596931,54.960055]]]},\"attributes\":{}},\"contributors\":null,\"quoted_status_id\":1201269948254961666,\"quoted_status_id_str\":\"1201269948254961666\",\"quoted_status\":{\"created_at\":\"Sun Dec 01 22:40:48 +0000 2019\",\"id\":1201269948254961666,\"id_str\":\"1201269948254961666\",\"text\":\"14. One Pound Fish - in a league of its own bc it's not even a TV moment https:\\/\\/t.co\\/nsglZSbWlL\",\"display_text_range\":[0,72],\"source\":\"\\u003ca href=\\\"https:\\/\\/mobile.twitter.com\\\" rel=\\\"nofollow\\\"\\u003eTwitter Web App\\u003c\\/a\\u003e\",\"truncated\":false,\"in_reply_to_status_id\":1201266466139582466,\"in_reply_to_status_id_str\":\"1201266466139582466\",\"in_reply_to_user_id\":458303488,\"in_reply_to_user_id_str\":\"458303488\",\"in_reply_to_screen_name\":\"thediyora\",\"user\":{\"id\":458303488,\"id_str\":\"458303488\",\"name\":\"diyora shadijanova\",\"screen_name\":\"thediyora\",\"location\":\"London, England\",\"url\":null,\"description\":\"journalist\\/culture writer\\/artist\\/art historian\\/trash tv fan\\/first gen uzbek immigrant\\/medieval enthusiast (she\\/her) [commissions - diyora.shadijanova@gmail.com]\",\"translator_type\":\"regular\",\"protected\":false,\"verified\":false,\"followers_count\":14662,\"friends_count\":2708,\"listed_count\":365,\"favourites_count\":32999,\"statuses_count\":23651,\"created_at\":\"Sun Jan 08 12:06:38 +0000 2012\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"709397\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme6\\/bg.gif\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme6\\/bg.gif\",\"profile_background_tile\":false,\"profile_link_color\":\"1B95E0\",\"profile_sidebar_border_color\":\"FFFFFF\",\"profile_sidebar_fill_color\":\"A0C5C7\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1202294888122990593\\/1eK4I8zl_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1202294888122990593\\/1eK4I8zl_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/458303488\\/1568301246\",\"default_profile\":false,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":null,\"contributors\":null,\"is_quote_status\":false,\"quote_count\":928,\"reply_count\":271,\"retweet_count\":4914,\"favorite_count\":24761,\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[],\"symbols\":[],\"media\":[{\"id\":1201269659317739520,\"id_str\":\"1201269659317739520\",\"indices\":[73,96],\"additional_media_info\":{\"monetizable\":false},\"media_url\":\"http:\\/\\/pbs.twimg.com\\/ext_tw_video_thumb\\/1201269659317739520\\/pu\\/img\\/K73XgloyqPLGMZtX.jpg\",\"media_url_https\":\"https:\\/\\/pbs.twimg.com\\/ext_tw_video_thumb\\/1201269659317739520\\/pu\\/img\\/K73XgloyqPLGMZtX.jpg\",\"url\":\"https:\\/\\/t.co\\/nsglZSbWlL\",\"display_url\":\"pic.twitter.com\\/nsglZSbWlL\",\"expanded_url\":\"https:\\/\\/twitter.com\\/thediyora\\/status\\/1201269948254961666\\/video\\/1\",\"type\":\"photo\",\"sizes\":{\"thumb\":{\"w\":150,\"h\":150,\"resize\":\"crop\"},\"medium\":{\"w\":1200,\"h\":675,\"resize\":\"fit\"},\"small\":{\"w\":680,\"h\":383,\"resize\":\"fit\"},\"large\":{\"w\":1280,\"h\":720,\"resize\":\"fit\"}}}]},\"extended_entities\":{\"media\":[{\"id\":1201269659317739520,\"id_str\":\"1201269659317739520\",\"indices\":[73,96],\"additional_media_info\":{\"monetizable\":false},\"media_url\":\"http:\\/\\/pbs.twimg.com\\/ext_tw_video_thumb\\/1201269659317739520\\/pu\\/img\\/K73XgloyqPLGMZtX.jpg\",\"media_url_https\":\"https:\\/\\/pbs.twimg.com\\/ext_tw_video_thumb\\/1201269659317739520\\/pu\\/img\\/K73XgloyqPLGMZtX.jpg\",\"url\":\"https:\\/\\/t.co\\/nsglZSbWlL\",\"display_url\":\"pic.twitter.com\\/nsglZSbWlL\",\"expanded_url\":\"https:\\/\\/twitter.com\\/thediyora\\/status\\/1201269948254961666\\/video\\/1\",\"type\":\"video\",\"video_info\":{\"aspect_ratio\":[16,9],\"duration_millis\":100734,\"variants\":[{\"bitrate\":2176000,\"content_type\":\"video\\/mp4\",\"url\":\"https:\\/\\/video.twimg.com\\/ext_tw_video\\/1201269659317739520\\/pu\\/vid\\/1280x720\\/Ad2LT6q1zzaFxH8l.mp4?tag=10\"},{\"bitrate\":256000,\"content_type\":\"video\\/mp4\",\"url\":\"https:\\/\\/video.twimg.com\\/ext_tw_video\\/1201269659317739520\\/pu\\/vid\\/480x270\\/BV2XPgRkooMmVq-L.mp4?tag=10\"},{\"content_type\":\"application\\/x-mpegURL\",\"url\":\"https:\\/\\/video.twimg.com\\/ext_tw_video\\/1201269659317739520\\/pu\\/pl\\/pKTToLILBBJRWqEA.m3u8?tag=10\"},{\"bitrate\":832000,\"content_type\":\"video\\/mp4\",\"url\":\"https:\\/\\/video.twimg.com\\/ext_tw_video\\/1201269659317739520\\/pu\\/vid\\/640x360\\/DEe_U-TmZDplD9n1.mp4?tag=10\"}]},\"sizes\":{\"thumb\":{\"w\":150,\"h\":150,\"resize\":\"crop\"},\"medium\":{\"w\":1200,\"h\":675,\"resize\":\"fit\"},\"small\":{\"w\":680,\"h\":383,\"resize\":\"fit\"},\"large\":{\"w\":1280,\"h\":720,\"resize\":\"fit\"}}}]},\"favorited\":false,\"retweeted\":false,\"possibly_sensitive\":false,\"filter_level\":\"low\",\"lang\":\"en\"},\"quoted_status_permalink\":{\"url\":\"https:\\/\\/t.co\\/AF4WB51SCu\",\"expanded\":\"https:\\/\\/twitter.com\\/thediyora\\/status\\/1201269948254961666\",\"display\":\"twitter.com\\/thediyora\\/stat\\u2026\"},\"is_quote_status\":true,\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"en\",\"timestamp_ms\":\"1575979569456\"}\n", "\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{\"created_at\":\"Tue Dec 10 12:06:09 +0000 2019\",\"id\":1204371723631702017,\"id_str\":\"1204371723631702017\",\"text\":\"@timminchin Yep brilliant ending when it all falls together. And you start balling. Well done Timbo.\",\"display_text_range\":[12,100],\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/android\\\" rel=\\\"nofollow\\\"\\u003eTwitter for Android\\u003c\\/a\\u003e\",\"truncated\":false,\"in_reply_to_status_id\":1204332463838781440,\"in_reply_to_status_id_str\":\"1204332463838781440\",\"in_reply_to_user_id\":18980276,\"in_reply_to_user_id_str\":\"18980276\",\"in_reply_to_screen_name\":\"timminchin\",\"user\":{\"id\":1202537975961280517,\"id_str\":\"1202537975961280517\",\"name\":\"Joe Dack\",\"screen_name\":\"JoeDack11\",\"location\":null,\"url\":null,\"description\":null,\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":1,\"friends_count\":29,\"listed_count\":0,\"favourites_count\":52,\"statuses_count\":14,\"created_at\":\"Thu Dec 05 10:39:53 +0000 2019\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"F5F8FA\",\"profile_background_image_url\":\"\",\"profile_background_image_url_https\":\"\",\"profile_background_tile\":false,\"profile_link_color\":\"1DA1F2\",\"profile_sidebar_border_color\":\"C0DEED\",\"profile_sidebar_fill_color\":\"DDEEF6\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1202538191225532416\\/DykF5Zlr_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1202538191225532416\\/DykF5Zlr_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/1202537975961280517\\/1575543191\",\"default_profile\":true,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"3543bf640a1a5db9\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/3543bf640a1a5db9.json\",\"place_type\":\"city\",\"name\":\"Tilbury\",\"full_name\":\"Tilbury, East\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[0.327950,51.451823],[0.327950,51.472020],[0.393177,51.472020],[0.393177,51.451823]]]},\"attributes\":{}},\"contributors\":null,\"is_quote_status\":false,\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[{\"screen_name\":\"timminchin\",\"name\":\"Tim Minchin\",\"id\":18980276,\"id_str\":\"18980276\",\"indices\":[0,11]}],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"en\",\"timestamp_ms\":\"1575979569715\"}\n", "\n", "{\"created_at\":\"Tue Dec 10 12:06:10 +0000 2019\",\"id\":1204371725842038785,\"id_str\":\"1204371725842038785\",\"text\":\"@Wayne_adams83 It could be worse you could be jon ashworth\",\"display_text_range\":[15,58],\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/iphone\\\" rel=\\\"nofollow\\\"\\u003eTwitter for iPhone\\u003c\\/a\\u003e\",\"truncated\":false,\"in_reply_to_status_id\":1204370760422363137,\"in_reply_to_status_id_str\":\"1204370760422363137\",\"in_reply_to_user_id\":1186987974199775232,\"in_reply_to_user_id_str\":\"1186987974199775232\",\"in_reply_to_screen_name\":\"Wayne_adams83\",\"user\":{\"id\":1189556019220889603,\"id_str\":\"1189556019220889603\",\"name\":\"stoke4brexit\",\"screen_name\":\"stoke4brexit\",\"location\":null,\"url\":null,\"description\":\"Make sure we elect a majority conservative government to enact brexit. follow me I follow back\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":95,\"friends_count\":145,\"listed_count\":0,\"favourites_count\":11,\"statuses_count\":1567,\"created_at\":\"Wed Oct 30 14:54:03 +0000 2019\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"F5F8FA\",\"profile_background_image_url\":\"\",\"profile_background_image_url_https\":\"\",\"profile_background_tile\":false,\"profile_link_color\":\"1DA1F2\",\"profile_sidebar_border_color\":\"C0DEED\",\"profile_sidebar_fill_color\":\"DDEEF6\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1189558459848646658\\/7PqPNXLP_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1189558459848646658\\/7PqPNXLP_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/1189556019220889603\\/1572447566\",\"default_profile\":true,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"69027b204b9c5c9b\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/69027b204b9c5c9b.json\",\"place_type\":\"city\",\"name\":\"Newcastle-under-Lyme\",\"full_name\":\"Newcastle-under-Lyme, England\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[-2.291933,52.976945],[-2.291933,53.059366],[-2.202540,53.059366],[-2.202540,52.976945]]]},\"attributes\":{}},\"contributors\":null,\"is_quote_status\":false,\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[{\"screen_name\":\"Wayne_adams83\",\"name\":\"Wayne Adams\",\"id\":1186987974199775232,\"id_str\":\"1186987974199775232\",\"indices\":[0,14]}],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"en\",\"timestamp_ms\":\"1575979570242\"}\n", "\n", "{\"created_at\":\"Tue Dec 10 12:06:10 +0000 2019\",\"id\":1204371726362140672,\"id_str\":\"1204371726362140672\",\"text\":\"@DarrenReay007 @BritBoxingBlog Here's hoping as its fascinating for everyone.\",\"display_text_range\":[31,77],\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/android\\\" rel=\\\"nofollow\\\"\\u003eTwitter for Android\\u003c\\/a\\u003e\",\"truncated\":false,\"in_reply_to_status_id\":1204362271369170944,\"in_reply_to_status_id_str\":\"1204362271369170944\",\"in_reply_to_user_id\":408691498,\"in_reply_to_user_id_str\":\"408691498\",\"in_reply_to_screen_name\":\"DarrenReay007\",\"user\":{\"id\":32478767,\"id_str\":\"32478767\",\"name\":\"Steven White\",\"screen_name\":\"ImagesBySW\",\"location\":\"Northumberland, England\",\"url\":\"https:\\/\\/www.fineanddandi.co.uk\",\"description\":\"IT Technician, #Photographer and passionate about #MentalHealth. All views are my own :-)\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":1237,\"friends_count\":1375,\"listed_count\":32,\"favourites_count\":479,\"statuses_count\":34870,\"created_at\":\"Fri Apr 17 16:59:15 +0000 2009\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"000000\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme14\\/bg.gif\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme14\\/bg.gif\",\"profile_background_tile\":true,\"profile_link_color\":\"40403B\",\"profile_sidebar_border_color\":\"000000\",\"profile_sidebar_fill_color\":\"FFFFFF\",\"profile_text_color\":\"000000\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/454358298959937536\\/QLB85IRA_normal.png\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/454358298959937536\\/QLB85IRA_normal.png\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/32478767\\/1394226559\",\"default_profile\":false,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"3862855830ff6e32\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/3862855830ff6e32.json\",\"place_type\":\"city\",\"name\":\"Castletown\",\"full_name\":\"Castletown, England\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[-1.482502,54.899687],[-1.482502,54.935375],[-1.386305,54.935375],[-1.386305,54.899687]]]},\"attributes\":{}},\"contributors\":null,\"is_quote_status\":false,\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[{\"screen_name\":\"DarrenReay007\",\"name\":\"Darren Reay\",\"id\":408691498,\"id_str\":\"408691498\",\"indices\":[0,14]},{\"screen_name\":\"BritBoxingBlog\",\"name\":\"British Boxing Blog\",\"id\":4077694816,\"id_str\":\"4077694816\",\"indices\":[15,30]}],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"en\",\"timestamp_ms\":\"1575979570366\"}\n", "\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{\"created_at\":\"Tue Dec 10 12:06:10 +0000 2019\",\"id\":1204371727431667715,\"id_str\":\"1204371727431667715\",\"text\":\"@WendyMaisey @warringtonnews Sad\",\"display_text_range\":[29,32],\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/android\\\" rel=\\\"nofollow\\\"\\u003eTwitter for Android\\u003c\\/a\\u003e\",\"truncated\":false,\"in_reply_to_status_id\":1202997513327919104,\"in_reply_to_status_id_str\":\"1202997513327919104\",\"in_reply_to_user_id\":302601234,\"in_reply_to_user_id_str\":\"302601234\",\"in_reply_to_screen_name\":\"WendyMaisey\",\"user\":{\"id\":2742693677,\"id_str\":\"2742693677\",\"name\":\"Mark Ridgley\",\"screen_name\":\"zogman64\",\"location\":null,\"url\":null,\"description\":\"Hate Bullys, Tory's. Love Nature.\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":736,\"friends_count\":878,\"listed_count\":0,\"favourites_count\":1515,\"statuses_count\":14008,\"created_at\":\"Thu Aug 14 14:43:34 +0000 2014\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"C0DEED\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_tile\":false,\"profile_link_color\":\"1DA1F2\",\"profile_sidebar_border_color\":\"C0DEED\",\"profile_sidebar_fill_color\":\"DDEEF6\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/499929737817759744\\/71GBpkMd_normal.jpeg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/499929737817759744\\/71GBpkMd_normal.jpeg\",\"default_profile\":true,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"0292257d85023f3f\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/0292257d85023f3f.json\",\"place_type\":\"city\",\"name\":\"Rochester\",\"full_name\":\"Rochester, South East\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[0.477715,51.325298],[0.477715,51.403378],[0.559377,51.403378],[0.559377,51.325298]]]},\"attributes\":{}},\"contributors\":null,\"is_quote_status\":false,\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[{\"screen_name\":\"WendyMaisey\",\"name\":\"Wendy Maisey\",\"id\":302601234,\"id_str\":\"302601234\",\"indices\":[0,12]},{\"screen_name\":\"warringtonnews\",\"name\":\"Warrington Guardian\",\"id\":72503952,\"id_str\":\"72503952\",\"indices\":[13,28]}],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"und\",\"timestamp_ms\":\"1575979570621\"}\r\n", "\n", "{\"created_at\":\"Tue Dec 10 12:06:10 +0000 2019\",\"id\":1204371727423352832,\"id_str\":\"1204371727423352832\",\"text\":\"Thanks for much :) Great to have role models such as yourself championing AI and others.\",\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/iphone\\\" rel=\\\"nofollow\\\"\\u003eTwitter for iPhone\\u003c\\/a\\u003e\",\"truncated\":false,\"in_reply_to_status_id\":null,\"in_reply_to_status_id_str\":null,\"in_reply_to_user_id\":null,\"in_reply_to_user_id_str\":null,\"in_reply_to_screen_name\":null,\"user\":{\"id\":2894451863,\"id_str\":\"2894451863\",\"name\":\"Sarah Rench\",\"screen_name\":\"SarahLRench\",\"location\":\"London\",\"url\":null,\"description\":\"Sarah Rench tweets #Financial #Technological #ArtificialIntelligence #news & exciting #developments. @CassWiB @DevelopHerUK @AvanadeUKI Personal views only.\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":1278,\"friends_count\":651,\"listed_count\":39,\"favourites_count\":322,\"statuses_count\":519,\"created_at\":\"Thu Nov 27 10:28:26 +0000 2014\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"000000\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_tile\":false,\"profile_link_color\":\"3B94D9\",\"profile_sidebar_border_color\":\"000000\",\"profile_sidebar_fill_color\":\"000000\",\"profile_text_color\":\"000000\",\"profile_use_background_image\":false,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/537982410890043392\\/5rLj6NXQ_normal.jpeg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/537982410890043392\\/5rLj6NXQ_normal.jpeg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/2894451863\\/1417084316\",\"default_profile\":false,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"7f55e839e1715da2\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/7f55e839e1715da2.json\",\"place_type\":\"city\",\"name\":\"Camberwell\",\"full_name\":\"Camberwell, London\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[-0.111476,51.419425],[-0.111476,51.509947],[-0.029731,51.509947],[-0.029731,51.419425]]]},\"attributes\":{}},\"contributors\":null,\"quoted_status_id\":1204360425984479233,\"quoted_status_id_str\":\"1204360425984479233\",\"quoted_status\":{\"created_at\":\"Tue Dec 10 11:21:16 +0000 2019\",\"id\":1204360425984479233,\"id_str\":\"1204360425984479233\",\"text\":\"Day 10 is all about AI ... a leading expert on robotics and AI @SarahLRench advises on the all-party parliamentary\\u2026 https:\\/\\/t.co\\/kfl9Wt6Wbi\",\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/iphone\\\" rel=\\\"nofollow\\\"\\u003eTwitter for iPhone\\u003c\\/a\\u003e\",\"truncated\":true,\"in_reply_to_status_id\":null,\"in_reply_to_status_id_str\":null,\"in_reply_to_user_id\":null,\"in_reply_to_user_id_str\":null,\"in_reply_to_screen_name\":null,\"user\":{\"id\":872518230023208966,\"id_str\":\"872518230023208966\",\"name\":\"Claire Priestley\",\"screen_name\":\"ClairePriestl8y\",\"location\":\"London, England\",\"url\":null,\"description\":\"CIO100 2018 & 2019. Founder CIO+1. Director The Secret Boxing Gym London and NED. Passionate about tech, boxing & inclusivity. Tweets are my opinion.\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":556,\"friends_count\":763,\"listed_count\":8,\"favourites_count\":1577,\"statuses_count\":777,\"created_at\":\"Wed Jun 07 18:18:51 +0000 2017\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"F5F8FA\",\"profile_background_image_url\":\"\",\"profile_background_image_url_https\":\"\",\"profile_background_tile\":false,\"profile_link_color\":\"1DA1F2\",\"profile_sidebar_border_color\":\"C0DEED\",\"profile_sidebar_fill_color\":\"DDEEF6\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/872520064595111936\\/r3Ib6QSw_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/872520064595111936\\/r3Ib6QSw_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/872518230023208966\\/1496859991\",\"default_profile\":true,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"544762ebf7fda780\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/544762ebf7fda780.json\",\"place_type\":\"city\",\"name\":\"Islington\",\"full_name\":\"Islington, London\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[-0.142058,51.518552],[-0.142058,51.575301],[-0.076305,51.575301],[-0.076305,51.518552]]]},\"attributes\":{}},\"contributors\":null,\"is_quote_status\":false,\"extended_tweet\":{\"full_text\":\"Day 10 is all about AI ... a leading expert on robotics and AI @SarahLRench advises on the all-party parliamentary AI group, is ranked as one of the most influential women in tech in 2019, Won Disrupter of the Year and Data Leader if the year 2019 & total ambassador for tech.\\ud83d\\ude4c\\ud83d\\ude4c\",\"display_text_range\":[0,282],\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[{\"screen_name\":\"SarahLRench\",\"name\":\"Sarah Rench\",\"id\":2894451863,\"id_str\":\"2894451863\",\"indices\":[63,75]}],\"symbols\":[]}},\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":2,\"entities\":{\"hashtags\":[],\"urls\":[{\"url\":\"https:\\/\\/t.co\\/kfl9Wt6Wbi\",\"expanded_url\":\"https:\\/\\/twitter.com\\/i\\/web\\/status\\/1204360425984479233\",\"display_url\":\"twitter.com\\/i\\/web\\/status\\/1\\u2026\",\"indices\":[116,139]}],\"user_mentions\":[{\"screen_name\":\"SarahLRench\",\"name\":\"Sarah Rench\",\"id\":2894451863,\"id_str\":\"2894451863\",\"indices\":[63,75]}],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"en\"},\"quoted_status_permalink\":{\"url\":\"https:\\/\\/t.co\\/4FZQHlLZY4\",\"expanded\":\"https:\\/\\/twitter.com\\/clairepriestl8y\\/status\\/1204360425984479233\",\"display\":\"twitter.com\\/clairepriestl8\\u2026\"},\"is_quote_status\":true,\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"en\",\"timestamp_ms\":\"1575979570619\"}\r\n", "\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{\"created_at\":\"Tue Dec 10 12:06:11 +0000 2019\",\"id\":1204371729650466819,\"id_str\":\"1204371729650466819\",\"text\":\"@OrdnanceSurvey #maps #cartography\",\"display_text_range\":[16,34],\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/android\\\" rel=\\\"nofollow\\\"\\u003eTwitter for Android\\u003c\\/a\\u003e\",\"truncated\":false,\"in_reply_to_status_id\":1204370250319454208,\"in_reply_to_status_id_str\":\"1204370250319454208\",\"in_reply_to_user_id\":22614266,\"in_reply_to_user_id_str\":\"22614266\",\"in_reply_to_screen_name\":\"OrdnanceSurvey\",\"user\":{\"id\":118802611,\"id_str\":\"118802611\",\"name\":\"Peregrine Bush\",\"screen_name\":\"PerezMapManBush\",\"location\":\"Deepest Rural Suffolk\",\"url\":\"http:\\/\\/www.pb-photos.com\",\"description\":\"Cartographer, photographer & aviation enthusiast. Author of UK Military Airfields Guide https:\\/\\/t.co\\/MrvT5h2zLk Married to Heather and dad to Fin & Zac also see @pemaps1\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":185,\"friends_count\":141,\"listed_count\":3,\"favourites_count\":323,\"statuses_count\":1247,\"created_at\":\"Mon Mar 01 20:01:41 +0000 2010\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"131516\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme14\\/bg.gif\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme14\\/bg.gif\",\"profile_background_tile\":true,\"profile_link_color\":\"009999\",\"profile_sidebar_border_color\":\"EEEEEE\",\"profile_sidebar_fill_color\":\"EFEFEF\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1162465252774166530\\/DqjtLWvz_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1162465252774166530\\/DqjtLWvz_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/118802611\\/1548441618\",\"default_profile\":false,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"5de8cffc145c486b\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/5de8cffc145c486b.json\",\"place_type\":\"city\",\"name\":\"Camden Town\",\"full_name\":\"Camden Town, London\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[-0.213503,51.512805],[-0.213503,51.572068],[-0.105303,51.572068],[-0.105303,51.512805]]]},\"attributes\":{}},\"contributors\":null,\"is_quote_status\":false,\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[{\"text\":\"maps\",\"indices\":[16,21]},{\"text\":\"cartography\",\"indices\":[22,34]}],\"urls\":[],\"user_mentions\":[{\"screen_name\":\"OrdnanceSurvey\",\"name\":\"Ordnance Survey\",\"id\":22614266,\"id_str\":\"22614266\",\"indices\":[0,15]}],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"und\",\"timestamp_ms\":\"1575979571150\"}\n", "\n", "{\"created_at\":\"Tue Dec 10 12:06:11 +0000 2019\",\"id\":1204371732540342272,\"id_str\":\"1204371732540342272\",\"text\":\"Twin Ion Engine #TheRiseOfSkywalker\",\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/iphone\\\" rel=\\\"nofollow\\\"\\u003eTwitter for iPhone\\u003c\\/a\\u003e\",\"truncated\":false,\"in_reply_to_status_id\":null,\"in_reply_to_status_id_str\":null,\"in_reply_to_user_id\":null,\"in_reply_to_user_id_str\":null,\"in_reply_to_screen_name\":null,\"user\":{\"id\":301692322,\"id_str\":\"301692322\",\"name\":\"Jamie Sherwood \\ud83c\\udff4\\udb40\\udc67\\udb40\\udc62\\udb40\\udc77\\udb40\\udc6c\\udb40\\udc73\\udb40\\udc7f\",\"screen_name\":\"torquay3jay\",\"location\":\"Cardiff\",\"url\":\"http:\\/\\/www.cavc.ac.uk\\/en\\/16-18\\/sport-academies-cavc\\/cavc-football-academy\\/\",\"description\":\"Head of @CAVC Football & Reunited with @YeovilWomenFC | UEFA A Licence Coach | LMA Member | FAW Coach Educator | Married to @katiesherwood8 | Opinions my own\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":2785,\"friends_count\":2311,\"listed_count\":41,\"favourites_count\":10825,\"statuses_count\":14847,\"created_at\":\"Thu May 19 22:04:23 +0000 2011\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"C0DEED\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_tile\":false,\"profile_link_color\":\"1DA1F2\",\"profile_sidebar_border_color\":\"C0DEED\",\"profile_sidebar_fill_color\":\"DDEEF6\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1158459726868418560\\/YJqyJfhg_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1158459726868418560\\/YJqyJfhg_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/301692322\\/1533085721\",\"default_profile\":true,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"208d28e57bdc12e9\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/208d28e57bdc12e9.json\",\"place_type\":\"admin\",\"name\":\"Wales\",\"full_name\":\"Wales, United Kingdom\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[-5.353407,51.378778],[-5.353407,53.430094],[-2.649827,53.430094],[-2.649827,51.378778]]]},\"attributes\":{}},\"contributors\":null,\"quoted_status_id\":1204350765072031744,\"quoted_status_id_str\":\"1204350765072031744\",\"quoted_status\":{\"created_at\":\"Tue Dec 10 10:42:52 +0000 2019\",\"id\":1204350765072031744,\"id_str\":\"1204350765072031744\",\"text\":\"Day 2! We're giving away tickets to the #TheRiseofSkywalker European Premiere every day this week! Quote RT with th\\u2026 https:\\/\\/t.co\\/XK12zCM4bu\",\"display_text_range\":[0,140],\"source\":\"\\u003ca href=\\\"https:\\/\\/mobile.twitter.com\\\" rel=\\\"nofollow\\\"\\u003eTwitter Web App\\u003c\\/a\\u003e\",\"truncated\":true,\"in_reply_to_status_id\":null,\"in_reply_to_status_id_str\":null,\"in_reply_to_user_id\":null,\"in_reply_to_user_id_str\":null,\"in_reply_to_screen_name\":null,\"user\":{\"id\":2250737179,\"id_str\":\"2250737179\",\"name\":\"Star Wars UK\",\"screen_name\":\"StarWarsUK\",\"location\":\"United Kingdom\",\"url\":\"http:\\/\\/www.starwars.co.uk\",\"description\":\"The official home of Star Wars UK on Twitter.\",\"translator_type\":\"none\",\"protected\":false,\"verified\":true,\"followers_count\":155278,\"friends_count\":242,\"listed_count\":767,\"favourites_count\":1790,\"statuses_count\":6788,\"created_at\":\"Tue Dec 17 17:30:18 +0000 2013\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"C0DEED\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_tile\":false,\"profile_link_color\":\"ABB8C2\",\"profile_sidebar_border_color\":\"FFFFFF\",\"profile_sidebar_fill_color\":\"DDEEF6\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/877111101216915456\\/Ej0kX9J1_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/877111101216915456\\/Ej0kX9J1_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/2250737179\\/1574099614\",\"default_profile\":false,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":null,\"contributors\":null,\"is_quote_status\":false,\"extended_tweet\":{\"full_text\":\"Day 2! We're giving away tickets to the #TheRiseofSkywalker European Premiere every day this week! Quote RT with the answer to the video question to enter today's giveaway!! https:\\/\\/t.co\\/3e34OSZEHY\",\"display_text_range\":[0,173],\"entities\":{\"hashtags\":[{\"text\":\"TheRiseofSkywalker\",\"indices\":[40,59]}],\"urls\":[],\"user_mentions\":[],\"symbols\":[],\"media\":[{\"id\":1204350663691509760,\"id_str\":\"1204350663691509760\",\"indices\":[174,197],\"additional_media_info\":{\"monetizable\":false},\"media_url\":\"http:\\/\\/pbs.twimg.com\\/ext_tw_video_thumb\\/1204350663691509760\\/pu\\/img\\/xPW_AaAExOSNwhGR.jpg\",\"media_url_https\":\"https:\\/\\/pbs.twimg.com\\/ext_tw_video_thumb\\/1204350663691509760\\/pu\\/img\\/xPW_AaAExOSNwhGR.jpg\",\"url\":\"https:\\/\\/t.co\\/3e34OSZEHY\",\"display_url\":\"pic.twitter.com\\/3e34OSZEHY\",\"expanded_url\":\"https:\\/\\/twitter.com\\/StarWarsUK\\/status\\/1204350765072031744\\/video\\/1\",\"type\":\"video\",\"video_info\":{\"aspect_ratio\":[1,1],\"duration_millis\":22022,\"variants\":[{\"content_type\":\"application\\/x-mpegURL\",\"url\":\"https:\\/\\/video.twimg.com\\/ext_tw_video\\/1204350663691509760\\/pu\\/pl\\/lKc0RSxQL4QhGc28.m3u8?tag=10\"},{\"bitrate\":1280000,\"content_type\":\"video\\/mp4\",\"url\":\"https:\\/\\/video.twimg.com\\/ext_tw_video\\/1204350663691509760\\/pu\\/vid\\/720x720\\/r18TlPGcU8707Ktz.mp4?tag=10\"},{\"bitrate\":832000,\"content_type\":\"video\\/mp4\",\"url\":\"https:\\/\\/video.twimg.com\\/ext_tw_video\\/1204350663691509760\\/pu\\/vid\\/480x480\\/mJma1pSWfHBAbH5U.mp4?tag=10\"},{\"bitrate\":432000,\"content_type\":\"video\\/mp4\",\"url\":\"https:\\/\\/video.twimg.com\\/ext_tw_video\\/1204350663691509760\\/pu\\/vid\\/320x320\\/vCS_IzhsCKdqPEqT.mp4?tag=10\"}]},\"sizes\":{\"thumb\":{\"w\":150,\"h\":150,\"resize\":\"crop\"},\"small\":{\"w\":680,\"h\":680,\"resize\":\"fit\"},\"medium\":{\"w\":720,\"h\":720,\"resize\":\"fit\"},\"large\":{\"w\":720,\"h\":720,\"resize\":\"fit\"}}}]},\"extended_entities\":{\"media\":[{\"id\":1204350663691509760,\"id_str\":\"1204350663691509760\",\"indices\":[174,197],\"additional_media_info\":{\"monetizable\":false},\"media_url\":\"http:\\/\\/pbs.twimg.com\\/ext_tw_video_thumb\\/1204350663691509760\\/pu\\/img\\/xPW_AaAExOSNwhGR.jpg\",\"media_url_https\":\"https:\\/\\/pbs.twimg.com\\/ext_tw_video_thumb\\/1204350663691509760\\/pu\\/img\\/xPW_AaAExOSNwhGR.jpg\",\"url\":\"https:\\/\\/t.co\\/3e34OSZEHY\",\"display_url\":\"pic.twitter.com\\/3e34OSZEHY\",\"expanded_url\":\"https:\\/\\/twitter.com\\/StarWarsUK\\/status\\/1204350765072031744\\/video\\/1\",\"type\":\"video\",\"video_info\":{\"aspect_ratio\":[1,1],\"duration_millis\":22022,\"variants\":[{\"content_type\":\"application\\/x-mpegURL\",\"url\":\"https:\\/\\/video.twimg.com\\/ext_tw_video\\/1204350663691509760\\/pu\\/pl\\/lKc0RSxQL4QhGc28.m3u8?tag=10\"},{\"bitrate\":1280000,\"content_type\":\"video\\/mp4\",\"url\":\"https:\\/\\/video.twimg.com\\/ext_tw_video\\/1204350663691509760\\/pu\\/vid\\/720x720\\/r18TlPGcU8707Ktz.mp4?tag=10\"},{\"bitrate\":832000,\"content_type\":\"video\\/mp4\",\"url\":\"https:\\/\\/video.twimg.com\\/ext_tw_video\\/1204350663691509760\\/pu\\/vid\\/480x480\\/mJma1pSWfHBAbH5U.mp4?tag=10\"},{\"bitrate\":432000,\"content_type\":\"video\\/mp4\",\"url\":\"https:\\/\\/video.twimg.com\\/ext_tw_video\\/1204350663691509760\\/pu\\/vid\\/320x320\\/vCS_IzhsCKdqPEqT.mp4?tag=10\"}]},\"sizes\":{\"thumb\":{\"w\":150,\"h\":150,\"resize\":\"crop\"},\"small\":{\"w\":680,\"h\":680,\"resize\":\"fit\"},\"medium\":{\"w\":720,\"h\":720,\"resize\":\"fit\"},\"large\":{\"w\":720,\"h\":720,\"resize\":\"fit\"}}}]}},\"quote_count\":395,\"reply_count\":275,\"retweet_count\":99,\"favorite_count\":430,\"entities\":{\"hashtags\":[{\"text\":\"TheRiseofSkywalker\",\"indices\":[40,59]}],\"urls\":[{\"url\":\"https:\\/\\/t.co\\/XK12zCM4bu\",\"expanded_url\":\"https:\\/\\/twitter.com\\/i\\/web\\/status\\/1204350765072031744\",\"display_url\":\"twitter.com\\/i\\/web\\/status\\/1\\u2026\",\"indices\":[117,140]}],\"user_mentions\":[],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"possibly_sensitive\":false,\"filter_level\":\"low\",\"lang\":\"en\"},\"quoted_status_permalink\":{\"url\":\"https:\\/\\/t.co\\/WPSL14UgRP\",\"expanded\":\"https:\\/\\/twitter.com\\/starwarsuk\\/status\\/1204350765072031744\",\"display\":\"twitter.com\\/starwarsuk\\/sta\\u2026\"},\"is_quote_status\":true,\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[{\"text\":\"TheRiseOfSkywalker\",\"indices\":[16,35]}],\"urls\":[],\"user_mentions\":[],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"en\",\"timestamp_ms\":\"1575979571839\"}\n", "\n", "{\"created_at\":\"Tue Dec 10 12:06:11 +0000 2019\",\"id\":1204371732607447041,\"id_str\":\"1204371732607447041\",\"text\":\"The age old trick of \\u201cusing the children to manipulate the situation\\u201d needs to be retired to the dark dank corner o\\u2026 https:\\/\\/t.co\\/ZS881pjAEN\",\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/iphone\\\" rel=\\\"nofollow\\\"\\u003eTwitter for iPhone\\u003c\\/a\\u003e\",\"truncated\":true,\"in_reply_to_status_id\":null,\"in_reply_to_status_id_str\":null,\"in_reply_to_user_id\":null,\"in_reply_to_user_id_str\":null,\"in_reply_to_screen_name\":null,\"user\":{\"id\":385054996,\"id_str\":\"385054996\",\"name\":\"Jennie Literal\",\"screen_name\":\"jennie4povey\",\"location\":\"Earth.\",\"url\":null,\"description\":\"Founder of @ShitChester. All views are my own. \\ud83d\\udc71\\ud83c\\udffb\\u200d\\u2640\\ufe0fis it just me or is it getting crazier out there?\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":776,\"friends_count\":839,\"listed_count\":10,\"favourites_count\":10424,\"statuses_count\":11299,\"created_at\":\"Tue Oct 04 19:57:21 +0000 2011\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"B390C2\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_tile\":false,\"profile_link_color\":\"F58EA8\",\"profile_sidebar_border_color\":\"FFFFFF\",\"profile_sidebar_fill_color\":\"DD609A\",\"profile_text_color\":\"7A455A\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1178769697740865538\\/LFMrPtOT_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1178769697740865538\\/LFMrPtOT_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/385054996\\/1571436833\",\"default_profile\":false,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"70392b0b6ad1f95b\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/70392b0b6ad1f95b.json\",\"place_type\":\"city\",\"name\":\"Chester\",\"full_name\":\"Chester, England\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[-2.942763,53.164802],[-2.942763,53.229897],[-2.847002,53.229897],[-2.847002,53.164802]]]},\"attributes\":{}},\"contributors\":null,\"quoted_status_id\":1204194425309712387,\"quoted_status_id_str\":\"1204194425309712387\",\"quoted_status\":{\"created_at\":\"Tue Dec 10 00:21:38 +0000 2019\",\"id\":1204194425309712387,\"id_str\":\"1204194425309712387\",\"text\":\"So, the boys mum ( Sarah Williment ) is totally untraceable on social media .. no online footprint at all.\\nIt\\u2019s as\\u2026 https:\\/\\/t.co\\/MV2yS8nRgt\",\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/iphone\\\" rel=\\\"nofollow\\\"\\u003eTwitter for iPhone\\u003c\\/a\\u003e\",\"truncated\":true,\"in_reply_to_status_id\":null,\"in_reply_to_status_id_str\":null,\"in_reply_to_user_id\":null,\"in_reply_to_user_id_str\":null,\"in_reply_to_screen_name\":null,\"user\":{\"id\":41702018,\"id_str\":\"41702018\",\"name\":\"Adam Brooks\",\"screen_name\":\"EssexPR\",\"location\":\"Essex , UK \\ud83c\\uddec\\ud83c\\udde7\",\"url\":\"http:\\/\\/thethreecolts.com\",\"description\":\"#Dad #Husband #Teetotal #LovePolitics #Coys #DogLover Love Mallorca \\ud83c\\udfd6\",\"translator_type\":\"regular\",\"protected\":false,\"verified\":true,\"followers_count\":132647,\"friends_count\":111663,\"listed_count\":276,\"favourites_count\":74121,\"statuses_count\":113607,\"created_at\":\"Thu May 21 23:31:33 +0000 2009\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"020303\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme14\\/bg.gif\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme14\\/bg.gif\",\"profile_background_tile\":true,\"profile_link_color\":\"29963D\",\"profile_sidebar_border_color\":\"000000\",\"profile_sidebar_fill_color\":\"EFEFEF\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1199697036351868928\\/lB1MuGeo_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1199697036351868928\\/lB1MuGeo_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/41702018\\/1575858065\",\"default_profile\":false,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":null,\"contributors\":null,\"is_quote_status\":false,\"extended_tweet\":{\"full_text\":\"So, the boys mum ( Sarah Williment ) is totally untraceable on social media .. no online footprint at all.\\nIt\\u2019s as if everything has been wiped before today \\ud83e\\udd14\\n\\nLabour activist ?\\nRemain activist?\\n\\nWhat are the odds?..\",\"display_text_range\":[0,216],\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[],\"symbols\":[]}},\"quote_count\":42,\"reply_count\":154,\"retweet_count\":850,\"favorite_count\":2949,\"entities\":{\"hashtags\":[],\"urls\":[{\"url\":\"https:\\/\\/t.co\\/MV2yS8nRgt\",\"expanded_url\":\"https:\\/\\/twitter.com\\/i\\/web\\/status\\/1204194425309712387\",\"display_url\":\"twitter.com\\/i\\/web\\/status\\/1\\u2026\",\"indices\":[116,139]}],\"user_mentions\":[],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"en\"},\"quoted_status_permalink\":{\"url\":\"https:\\/\\/t.co\\/wMID4w5wG2\",\"expanded\":\"https:\\/\\/twitter.com\\/essexpr\\/status\\/1204194425309712387\",\"display\":\"twitter.com\\/essexpr\\/status\\u2026\"},\"is_quote_status\":true,\"extended_tweet\":{\"full_text\":\"The age old trick of \\u201cusing the children to manipulate the situation\\u201d needs to be retired to the dark dank corner of hell it came from, and then some.\",\"display_text_range\":[0,150],\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[],\"symbols\":[]}},\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[],\"urls\":[{\"url\":\"https:\\/\\/t.co\\/ZS881pjAEN\",\"expanded_url\":\"https:\\/\\/twitter.com\\/i\\/web\\/status\\/1204371732607447041\",\"display_url\":\"twitter.com\\/i\\/web\\/status\\/1\\u2026\",\"indices\":[117,140]}],\"user_mentions\":[],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"en\",\"timestamp_ms\":\"1575979571855\"}\n", "\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{\"created_at\":\"Tue Dec 10 12:06:12 +0000 2019\",\"id\":1204371735384133633,\"id_str\":\"1204371735384133633\",\"text\":\"@Hallemillerwil1 @Scampicus @DavidLammy @allisonpearson Cummings and Johnson are trying to outdo Trump, all with Putin\\u2019s help. Wake up UK!\",\"display_text_range\":[56,138],\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/iphone\\\" rel=\\\"nofollow\\\"\\u003eTwitter for iPhone\\u003c\\/a\\u003e\",\"truncated\":false,\"in_reply_to_status_id\":1204371002081398784,\"in_reply_to_status_id_str\":\"1204371002081398784\",\"in_reply_to_user_id\":1097159644722667520,\"in_reply_to_user_id_str\":\"1097159644722667520\",\"in_reply_to_screen_name\":\"Hallemillerwil1\",\"user\":{\"id\":39570149,\"id_str\":\"39570149\",\"name\":\"Roy Bailey\",\"screen_name\":\"DrRoyBailey\",\"location\":\"Crowthorne\",\"url\":\"http:\\/\\/www.linkedin.com\\/in\\/royurl\",\"description\":\"Former senior police officer, lecturer and business consultant. Labour activist and Chair of Bracknell CLP. Doctorate in criminal justice.\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":2780,\"friends_count\":3418,\"listed_count\":61,\"favourites_count\":38494,\"statuses_count\":61425,\"created_at\":\"Tue May 12 19:10:35 +0000 2009\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"BADFCD\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme12\\/bg.gif\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme12\\/bg.gif\",\"profile_background_tile\":false,\"profile_link_color\":\"FF0000\",\"profile_sidebar_border_color\":\"F2E195\",\"profile_sidebar_fill_color\":\"FFF7CC\",\"profile_text_color\":\"0C3E53\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/870208528685842432\\/eTyFTEDw_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/870208528685842432\\/eTyFTEDw_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/39570149\\/1501504528\",\"default_profile\":false,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"7a6325da55234746\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/7a6325da55234746.json\",\"place_type\":\"city\",\"name\":\"Crowthorne\",\"full_name\":\"Crowthorne, England\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[-0.820681,51.361118],[-0.820681,51.386957],[-0.770222,51.386957],[-0.770222,51.361118]]]},\"attributes\":{}},\"contributors\":null,\"is_quote_status\":false,\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[{\"screen_name\":\"Hallemillerwil1\",\"name\":\"Halle Harper Miller, CAN I JUST FINISH?!\",\"id\":1097159644722667520,\"id_str\":\"1097159644722667520\",\"indices\":[0,16]},{\"screen_name\":\"Scampicus\",\"name\":\"mpc\",\"id\":22762149,\"id_str\":\"22762149\",\"indices\":[17,27]},{\"screen_name\":\"DavidLammy\",\"name\":\"David Lammy\",\"id\":18020612,\"id_str\":\"18020612\",\"indices\":[28,39]},{\"screen_name\":\"allisonpearson\",\"name\":\"Allison Pearson\",\"id\":137413599,\"id_str\":\"137413599\",\"indices\":[40,55]}],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"en\",\"timestamp_ms\":\"1575979572517\"}\n", "\n", "{\"created_at\":\"Tue Dec 10 12:06:12 +0000 2019\",\"id\":1204371737208639492,\"id_str\":\"1204371737208639492\",\"text\":\"A new mocha was born. Hail to the new queen of boneheads \\ud83e\\udd37\\ud83c\\udffb\\u200d\\u2642\\ufe0f\",\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/iphone\\\" rel=\\\"nofollow\\\"\\u003eTwitter for iPhone\\u003c\\/a\\u003e\",\"truncated\":false,\"in_reply_to_status_id\":null,\"in_reply_to_status_id_str\":null,\"in_reply_to_user_id\":null,\"in_reply_to_user_id_str\":null,\"in_reply_to_screen_name\":null,\"user\":{\"id\":2686562186,\"id_str\":\"2686562186\",\"name\":\"\\u2648NeoNate\",\"screen_name\":\"liamjove15\",\"location\":\"Virac, Bicol Region\",\"url\":\"http:\\/\\/Intagram.com\\/liamjove\",\"description\":\"i know it seems scary right now, but in the end, it\\u2019s all going to be worth it\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":44,\"friends_count\":329,\"listed_count\":0,\"favourites_count\":966,\"statuses_count\":1519,\"created_at\":\"Mon Jul 28 03:48:00 +0000 2014\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"C0DEED\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_tile\":false,\"profile_link_color\":\"1DA1F2\",\"profile_sidebar_border_color\":\"C0DEED\",\"profile_sidebar_fill_color\":\"DDEEF6\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1152956476459290624\\/RPtDb53h_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1152956476459290624\\/RPtDb53h_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/2686562186\\/1563722018\",\"default_profile\":true,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"1b676cd4b8a8684a\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/1b676cd4b8a8684a.json\",\"place_type\":\"city\",\"name\":\"Southampton\",\"full_name\":\"Southampton, England\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[-1.476463,50.883056],[-1.476463,50.959599],[-1.316471,50.959599],[-1.316471,50.883056]]]},\"attributes\":{}},\"contributors\":null,\"quoted_status_id\":1204294647230550016,\"quoted_status_id_str\":\"1204294647230550016\",\"quoted_status\":{\"created_at\":\"Tue Dec 10 06:59:53 +0000 2019\",\"id\":1204294647230550016,\"id_str\":\"1204294647230550016\",\"text\":\"Senator Cynthia Villar on rising galunggong prices: Kung mahal ang galunggong, eh di wag kumain ng galunggong, di b\\u2026 https:\\/\\/t.co\\/8oRbcpetqA\",\"source\":\"\\u003ca href=\\\"https:\\/\\/about.twitter.com\\/products\\/tweetdeck\\\" rel=\\\"nofollow\\\"\\u003eTweetDeck\\u003c\\/a\\u003e\",\"truncated\":true,\"in_reply_to_status_id\":null,\"in_reply_to_status_id_str\":null,\"in_reply_to_user_id\":null,\"in_reply_to_user_id_str\":null,\"in_reply_to_screen_name\":null,\"user\":{\"id\":330826792,\"id_str\":\"330826792\",\"name\":\"Rappler\",\"screen_name\":\"rapplerdotcom\",\"location\":\"Philippines\",\"url\":\"http:\\/\\/www.rappler.com\",\"description\":\"The Social News Network. Uncompromised journalism that inspires smart conversations and a thirst for change.\",\"translator_type\":\"regular\",\"protected\":false,\"verified\":true,\"followers_count\":3150803,\"friends_count\":403,\"listed_count\":4198,\"favourites_count\":8075,\"statuses_count\":621209,\"created_at\":\"Thu Jul 07 06:34:10 +0000 2011\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"222930\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme16\\/bg.gif\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme16\\/bg.gif\",\"profile_background_tile\":false,\"profile_link_color\":\"E76229\",\"profile_sidebar_border_color\":\"000000\",\"profile_sidebar_fill_color\":\"DDFFCC\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1190789649947668482\\/3fjg5ukt_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1190789649947668482\\/3fjg5ukt_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/330826792\\/1574335284\",\"default_profile\":false,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":null,\"contributors\":null,\"is_quote_status\":false,\"extended_tweet\":{\"full_text\":\"Senator Cynthia Villar on rising galunggong prices: Kung mahal ang galunggong, eh di wag kumain ng galunggong, di ba? There are other alternatives na pwedeng gawin, bakit ba gustong gusto niyo yong galunggong kung mahal ang galunggong. | via @reyaika\",\"display_text_range\":[0,250],\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[{\"screen_name\":\"reyaika\",\"name\":\"Aika Rey\",\"id\":142932070,\"id_str\":\"142932070\",\"indices\":[242,250]}],\"symbols\":[]}},\"quote_count\":4421,\"reply_count\":286,\"retweet_count\":162,\"favorite_count\":1455,\"entities\":{\"hashtags\":[],\"urls\":[{\"url\":\"https:\\/\\/t.co\\/8oRbcpetqA\",\"expanded_url\":\"https:\\/\\/twitter.com\\/i\\/web\\/status\\/1204294647230550016\",\"display_url\":\"twitter.com\\/i\\/web\\/status\\/1\\u2026\",\"indices\":[117,140]}],\"user_mentions\":[],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"tl\"},\"quoted_status_permalink\":{\"url\":\"https:\\/\\/t.co\\/X5EPnSLMVl\",\"expanded\":\"https:\\/\\/twitter.com\\/rapplerdotcom\\/status\\/1204294647230550016\",\"display\":\"twitter.com\\/rapplerdotcom\\/\\u2026\"},\"is_quote_status\":true,\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"en\",\"timestamp_ms\":\"1575979572952\"}\n", "\n", "{\"created_at\":\"Tue Dec 10 12:06:12 +0000 2019\",\"id\":1204371737275703296,\"id_str\":\"1204371737275703296\",\"text\":\"https:\\/\\/t.co\\/8SqcmCd7bb\",\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/android\\\" rel=\\\"nofollow\\\"\\u003eTwitter for Android\\u003c\\/a\\u003e\",\"truncated\":false,\"in_reply_to_status_id\":null,\"in_reply_to_status_id_str\":null,\"in_reply_to_user_id\":null,\"in_reply_to_user_id_str\":null,\"in_reply_to_screen_name\":null,\"user\":{\"id\":3901333876,\"id_str\":\"3901333876\",\"name\":\"Martine Mannion M.Sc. #MSFTEduChat\",\"screen_name\":\"MartineMannion\",\"location\":\"Wellingborough, England\",\"url\":null,\"description\":\"Cert Raspberry Pi Edu, MIEExpert Trainer, CAS hub leader & MasterTeacher. Advocate of Digital Learning. \\u2764\\ufe0f the great outdoors. My family is my life!\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":1080,\"friends_count\":1440,\"listed_count\":85,\"favourites_count\":5352,\"statuses_count\":3612,\"created_at\":\"Thu Oct 08 17:07:50 +0000 2015\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"C0DEED\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme1\\/bg.png\",\"profile_background_tile\":false,\"profile_link_color\":\"1DA1F2\",\"profile_sidebar_border_color\":\"C0DEED\",\"profile_sidebar_fill_color\":\"DDEEF6\",\"profile_text_color\":\"333333\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1074383168294281217\\/HQvJoz7b_normal.jpg\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1074383168294281217\\/HQvJoz7b_normal.jpg\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/3901333876\\/1448285887\",\"default_profile\":true,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"26a15ccf79e83f9c\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/26a15ccf79e83f9c.json\",\"place_type\":\"city\",\"name\":\"Wellingborough\",\"full_name\":\"Wellingborough, England\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[-0.740615,52.283345],[-0.740615,52.326829],[-0.666950,52.326829],[-0.666950,52.283345]]]},\"attributes\":{}},\"contributors\":null,\"is_quote_status\":false,\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[],\"urls\":[{\"url\":\"https:\\/\\/t.co\\/8SqcmCd7bb\",\"expanded_url\":\"https:\\/\\/www.roadtovr.com\\/google-depth-api-arcore-augmented-reality\\/\",\"display_url\":\"roadtovr.com\\/google-depth-a\\u2026\",\"indices\":[0,23]}],\"user_mentions\":[],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"possibly_sensitive\":false,\"filter_level\":\"low\",\"lang\":\"und\",\"timestamp_ms\":\"1575979572968\"}\n", "\n" ] }, { "name": "stdout", "output_type": "stream", "text": [ "{\"created_at\":\"Tue Dec 10 12:06:13 +0000 2019\",\"id\":1204371737976229888,\"id_str\":\"1204371737976229888\",\"text\":\"@DeannaMidSussex @MidSussexViews @gembolton @mimsdavies @RobbieEggleston Yes, @DeannaMidSussex was definitely the s\\u2026 https:\\/\\/t.co\\/fdfXfT3Rkx\",\"display_text_range\":[73,140],\"source\":\"\\u003ca href=\\\"http:\\/\\/twitter.com\\/download\\/android\\\" rel=\\\"nofollow\\\"\\u003eTwitter for Android\\u003c\\/a\\u003e\",\"truncated\":true,\"in_reply_to_status_id\":1204345814950260736,\"in_reply_to_status_id_str\":\"1204345814950260736\",\"in_reply_to_user_id\":1189699466653241344,\"in_reply_to_user_id_str\":\"1189699466653241344\",\"in_reply_to_screen_name\":\"DeannaMidSussex\",\"user\":{\"id\":130106723,\"id_str\":\"130106723\",\"name\":\"James Thompson\",\"screen_name\":\"jamesthompsonuk\",\"location\":\"East Grinstead\",\"url\":null,\"description\":\"Homeless Officer, trade unionist and Europhile. Love cats and wine.\",\"translator_type\":\"none\",\"protected\":false,\"verified\":false,\"followers_count\":541,\"friends_count\":1733,\"listed_count\":7,\"favourites_count\":1629,\"statuses_count\":1796,\"created_at\":\"Tue Apr 06 09:47:21 +0000 2010\",\"utc_offset\":null,\"time_zone\":null,\"geo_enabled\":true,\"lang\":null,\"contributors_enabled\":false,\"is_translator\":false,\"profile_background_color\":\"642D8B\",\"profile_background_image_url\":\"http:\\/\\/abs.twimg.com\\/images\\/themes\\/theme10\\/bg.gif\",\"profile_background_image_url_https\":\"https:\\/\\/abs.twimg.com\\/images\\/themes\\/theme10\\/bg.gif\",\"profile_background_tile\":true,\"profile_link_color\":\"FF0000\",\"profile_sidebar_border_color\":\"65B0DA\",\"profile_sidebar_fill_color\":\"7AC3EE\",\"profile_text_color\":\"3D1957\",\"profile_use_background_image\":true,\"profile_image_url\":\"http:\\/\\/pbs.twimg.com\\/profile_images\\/1119233330849783808\\/VK0UHNxn_normal.png\",\"profile_image_url_https\":\"https:\\/\\/pbs.twimg.com\\/profile_images\\/1119233330849783808\\/VK0UHNxn_normal.png\",\"profile_banner_url\":\"https:\\/\\/pbs.twimg.com\\/profile_banners\\/130106723\\/1469537283\",\"default_profile\":false,\"default_profile_image\":false,\"following\":null,\"follow_request_sent\":null,\"notifications\":null},\"geo\":null,\"coordinates\":null,\"place\":{\"id\":\"1016dc4ddb86f9b7\",\"url\":\"https:\\/\\/api.twitter.com\\/1.1\\/geo\\/id\\/1016dc4ddb86f9b7.json\",\"place_type\":\"city\",\"name\":\"Tandridge\",\"full_name\":\"Tandridge, South East\",\"country_code\":\"GB\",\"country\":\"United Kingdom\",\"bounding_box\":{\"type\":\"Polygon\",\"coordinates\":[[[-0.037753,51.231573],[-0.037753,51.266970],[0.017121,51.266970],[0.017121,51.231573]]]},\"attributes\":{}},\"contributors\":null,\"is_quote_status\":false,\"extended_tweet\":{\"full_text\":\"@DeannaMidSussex @MidSussexViews @gembolton @mimsdavies @RobbieEggleston Yes, @DeannaMidSussex was definitely the star of the show. Calm, articulate, likeable and was able to draw on her own experience outside of politics.\",\"display_text_range\":[73,222],\"entities\":{\"hashtags\":[],\"urls\":[],\"user_mentions\":[{\"screen_name\":\"DeannaMidSussex\",\"name\":\"Deanna Nicholson - Mid Sussex Green Party PPC\",\"id\":1189699466653241344,\"id_str\":\"1189699466653241344\",\"indices\":[0,16]},{\"screen_name\":\"MidSussexViews\",\"name\":\"MidSussexViews\",\"id\":1189119090302038016,\"id_str\":\"1189119090302038016\",\"indices\":[17,32]},{\"screen_name\":\"gembolton\",\"name\":\"Gemma Bolton\",\"id\":316629381,\"id_str\":\"316629381\",\"indices\":[33,43]},{\"screen_name\":\"mimsdavies\",\"name\":\"MimsDavies\",\"id\":236588290,\"id_str\":\"236588290\",\"indices\":[44,55]},{\"screen_name\":\"RobbieEggleston\",\"name\":\"Councillor Robert Eggleston\",\"id\":103077307,\"id_str\":\"103077307\",\"indices\":[56,72]},{\"screen_name\":\"DeannaMidSussex\",\"name\":\"Deanna Nicholson - Mid Sussex Green Party PPC\",\"id\":1189699466653241344,\"id_str\":\"1189699466653241344\",\"indices\":[78,94]}],\"symbols\":[]}},\"quote_count\":0,\"reply_count\":0,\"retweet_count\":0,\"favorite_count\":0,\"entities\":{\"hashtags\":[],\"urls\":[{\"url\":\"https:\\/\\/t.co\\/fdfXfT3Rkx\",\"expanded_url\":\"https:\\/\\/twitter.com\\/i\\/web\\/status\\/1204371737976229888\",\"display_url\":\"twitter.com\\/i\\/web\\/status\\/1\\u2026\",\"indices\":[117,140]}],\"user_mentions\":[{\"screen_name\":\"DeannaMidSussex\",\"name\":\"Deanna Nicholson - Mid Sussex Green Party PPC\",\"id\":1189699466653241344,\"id_str\":\"1189699466653241344\",\"indices\":[0,16]},{\"screen_name\":\"MidSussexViews\",\"name\":\"MidSussexViews\",\"id\":1189119090302038016,\"id_str\":\"1189119090302038016\",\"indices\":[17,32]},{\"screen_name\":\"gembolton\",\"name\":\"Gemma Bolton\",\"id\":316629381,\"id_str\":\"316629381\",\"indices\":[33,43]},{\"screen_name\":\"mimsdavies\",\"name\":\"MimsDavies\",\"id\":236588290,\"id_str\":\"236588290\",\"indices\":[44,55]},{\"screen_name\":\"RobbieEggleston\",\"name\":\"Councillor Robert Eggleston\",\"id\":103077307,\"id_str\":\"103077307\",\"indices\":[56,72]},{\"screen_name\":\"DeannaMidSussex\",\"name\":\"Deanna Nicholson - Mid Sussex Green Party PPC\",\"id\":1189699466653241344,\"id_str\":\"1189699466653241344\",\"indices\":[78,94]}],\"symbols\":[]},\"favorited\":false,\"retweeted\":false,\"filter_level\":\"low\",\"lang\":\"en\",\"timestamp_ms\":\"1575979573135\"}\r\n", "\n" ] }, { "ename": "KeyboardInterrupt", "evalue": "", "output_type": "error", "traceback": [ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mWantReadError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m~/anaconda3/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py\u001b[0m in \u001b[0;36mrecv_into\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 296\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 297\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mconnection\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrecv_into\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 298\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mOpenSSL\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mSSL\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mSysCallError\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0me\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m~/anaconda3/lib/python3.7/site-packages/OpenSSL/SSL.py\u001b[0m in \u001b[0;36mrecv_into\u001b[0;34m(self, buffer, nbytes, flags)\u001b[0m\n\u001b[1;32m 1821\u001b[0m \u001b[0mresult\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0m_lib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mSSL_read\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_ssl\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mbuf\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mnbytes\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1822\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_raise_ssl_error\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_ssl\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mresult\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1823\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m~/anaconda3/lib/python3.7/site-packages/OpenSSL/SSL.py\u001b[0m in \u001b[0;36m_raise_ssl_error\u001b[0;34m(self, ssl, result)\u001b[0m\n\u001b[1;32m 1621\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0merror\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0m_lib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mSSL_ERROR_WANT_READ\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1622\u001b[0;31m \u001b[0;32mraise\u001b[0m \u001b[0mWantReadError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 1623\u001b[0m \u001b[0;32melif\u001b[0m \u001b[0merror\u001b[0m \u001b[0;34m==\u001b[0m \u001b[0m_lib\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mSSL_ERROR_WANT_WRITE\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mWantReadError\u001b[0m: ", "\nDuring handling of the above exception, another exception occurred:\n", "\u001b[0;31mKeyboardInterrupt\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 16\u001b[0m \u001b[0;31m#\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 17\u001b[0m \u001b[0;31m# Here you can see England's bounding box's coordinates\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 18\u001b[0;31m \u001b[0mstream\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfilter\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mlocations\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m-\u001b[0m\u001b[0;36m6.38\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m49.87\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m1.77\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;36m55.81\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", "\u001b[0;32m~/anaconda3/lib/python3.7/site-packages/tweepy/streaming.py\u001b[0m in \u001b[0;36mfilter\u001b[0;34m(self, follow, track, is_async, locations, stall_warnings, languages, encoding, filter_level)\u001b[0m\n\u001b[1;32m 472\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mbody\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'filter_level'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mfilter_level\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mencode\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mencoding\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 473\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msession\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mparams\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;34m{\u001b[0m\u001b[0;34m'delimited'\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;34m'length'\u001b[0m\u001b[0;34m}\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 474\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_start\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mis_async\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 475\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 476\u001b[0m def sitestream(self, follow, stall_warnings=False,\n", "\u001b[0;32m~/anaconda3/lib/python3.7/site-packages/tweepy/streaming.py\u001b[0m in \u001b[0;36m_start\u001b[0;34m(self, is_async)\u001b[0m\n\u001b[1;32m 387\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_thread\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstart\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 388\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 389\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_run\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 390\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 391\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0mon_closed\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mresp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m~/anaconda3/lib/python3.7/site-packages/tweepy/streaming.py\u001b[0m in \u001b[0;36m_run\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 287\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msnooze_time\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msnooze_time_step\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 288\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlistener\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mon_connect\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 289\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_read_loop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresp\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 290\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mTimeout\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mssl\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mSSLError\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mexc\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 291\u001b[0m \u001b[0;31m# This is still necessary, as a SSLError can actually be\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m~/anaconda3/lib/python3.7/site-packages/tweepy/streaming.py\u001b[0m in \u001b[0;36m_read_loop\u001b[0;34m(self, resp)\u001b[0m\n\u001b[1;32m 337\u001b[0m \u001b[0mlength\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 338\u001b[0m \u001b[0;32mwhile\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mresp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mraw\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mclosed\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 339\u001b[0;31m \u001b[0mline\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mbuf\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread_line\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 340\u001b[0m \u001b[0mstripped_line\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mline\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstrip\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mline\u001b[0m \u001b[0;32melse\u001b[0m \u001b[0mline\u001b[0m \u001b[0;31m# line is sometimes None so we need to check here\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 341\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mstripped_line\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m~/anaconda3/lib/python3.7/site-packages/tweepy/streaming.py\u001b[0m in \u001b[0;36mread_line\u001b[0;34m(self, sep)\u001b[0m\n\u001b[1;32m 198\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 199\u001b[0m \u001b[0mstart\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_buffer\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 200\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_buffer\u001b[0m \u001b[0;34m+=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_stream\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_chunk_size\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 201\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0msix\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mb\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m''\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 202\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m~/anaconda3/lib/python3.7/site-packages/urllib3/response.py\u001b[0m in \u001b[0;36mread\u001b[0;34m(self, amt, decode_content, cache_content)\u001b[0m\n\u001b[1;32m 440\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 441\u001b[0m \u001b[0mcache_content\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mFalse\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 442\u001b[0;31m \u001b[0mdata\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_fp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mread\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mamt\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 443\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mamt\u001b[0m \u001b[0;34m!=\u001b[0m \u001b[0;36m0\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mdata\u001b[0m\u001b[0;34m:\u001b[0m \u001b[0;31m# Platform-specific: Buggy versions of Python.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 444\u001b[0m \u001b[0;31m# Close the connection when no data is returned\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m~/anaconda3/lib/python3.7/http/client.py\u001b[0m in \u001b[0;36mread\u001b[0;34m(self, amt)\u001b[0m\n\u001b[1;32m 455\u001b[0m \u001b[0;31m# Amount is given, implement using readinto\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 456\u001b[0m \u001b[0mb\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mbytearray\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mamt\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 457\u001b[0;31m \u001b[0mn\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mreadinto\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mb\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 458\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mmemoryview\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mb\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0mn\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mtobytes\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 459\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m~/anaconda3/lib/python3.7/http/client.py\u001b[0m in \u001b[0;36mreadinto\u001b[0;34m(self, b)\u001b[0m\n\u001b[1;32m 489\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 490\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mchunked\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 491\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_readinto_chunked\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mb\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 492\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 493\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlength\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m~/anaconda3/lib/python3.7/http/client.py\u001b[0m in \u001b[0;36m_readinto_chunked\u001b[0;34m(self, b)\u001b[0m\n\u001b[1;32m 584\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 585\u001b[0m \u001b[0;32mwhile\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 586\u001b[0;31m \u001b[0mchunk_left\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_chunk_left\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 587\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mchunk_left\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 588\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mtotal_bytes\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m~/anaconda3/lib/python3.7/http/client.py\u001b[0m in \u001b[0;36m_get_chunk_left\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 552\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_safe_read\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;31m# toss the CRLF at the end of the chunk\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 553\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 554\u001b[0;31m \u001b[0mchunk_left\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_read_next_chunk_size\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 555\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mValueError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 556\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mIncompleteRead\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34mb''\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m~/anaconda3/lib/python3.7/http/client.py\u001b[0m in \u001b[0;36m_read_next_chunk_size\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 512\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_read_next_chunk_size\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 513\u001b[0m \u001b[0;31m# Read the next chunk size from the file\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 514\u001b[0;31m \u001b[0mline\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mfp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mreadline\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0m_MAXLINE\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;36m1\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 515\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mline\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m>\u001b[0m \u001b[0m_MAXLINE\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 516\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mLineTooLong\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"chunk size\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m~/anaconda3/lib/python3.7/socket.py\u001b[0m in \u001b[0;36mreadinto\u001b[0;34m(self, b)\u001b[0m\n\u001b[1;32m 587\u001b[0m \u001b[0;32mwhile\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 588\u001b[0m \u001b[0;32mtry\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 589\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_sock\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mrecv_into\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mb\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 590\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mtimeout\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 591\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_timeout_occurred\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mTrue\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m~/anaconda3/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py\u001b[0m in \u001b[0;36mrecv_into\u001b[0;34m(self, *args, **kwargs)\u001b[0m\n\u001b[1;32m 307\u001b[0m \u001b[0;32mraise\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 308\u001b[0m \u001b[0;32mexcept\u001b[0m \u001b[0mOpenSSL\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mSSL\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mWantReadError\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 309\u001b[0;31m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mutil\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mwait_for_read\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msocket\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msocket\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mgettimeout\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 310\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mtimeout\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'The read operation timed out'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 311\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m~/anaconda3/lib/python3.7/site-packages/urllib3/util/wait.py\u001b[0m in \u001b[0;36mwait_for_read\u001b[0;34m(sock, timeout)\u001b[0m\n\u001b[1;32m 141\u001b[0m \u001b[0mReturns\u001b[0m \u001b[0;32mTrue\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mthe\u001b[0m \u001b[0msocket\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0mreadable\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0;32mFalse\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mthe\u001b[0m \u001b[0mtimeout\u001b[0m \u001b[0mexpired\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 142\u001b[0m \"\"\"\n\u001b[0;32m--> 143\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mwait_for_socket\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0msock\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mread\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtimeout\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mtimeout\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 144\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 145\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m~/anaconda3/lib/python3.7/site-packages/urllib3/util/wait.py\u001b[0m in \u001b[0;36mpoll_wait_for_socket\u001b[0;34m(sock, read, write, timeout)\u001b[0m\n\u001b[1;32m 102\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mpoll_obj\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpoll\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mt\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 103\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 104\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mbool\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0m_retry_on_intr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdo_poll\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtimeout\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 105\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 106\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m~/anaconda3/lib/python3.7/site-packages/urllib3/util/wait.py\u001b[0m in \u001b[0;36m_retry_on_intr\u001b[0;34m(fn, timeout)\u001b[0m\n\u001b[1;32m 40\u001b[0m \u001b[0;31m# Modern Python, that retries syscalls by default\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 41\u001b[0m \u001b[0;32mdef\u001b[0m \u001b[0m_retry_on_intr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfn\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtimeout\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m---> 42\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mfn\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtimeout\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 43\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 44\u001b[0m \u001b[0;31m# Old and broken Pythons.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;32m~/anaconda3/lib/python3.7/site-packages/urllib3/util/wait.py\u001b[0m in \u001b[0;36mdo_poll\u001b[0;34m(t)\u001b[0m\n\u001b[1;32m 100\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mt\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 101\u001b[0m \u001b[0mt\u001b[0m \u001b[0;34m*=\u001b[0m \u001b[0;36m1000\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 102\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mpoll_obj\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpoll\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mt\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 103\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 104\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mbool\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0m_retry_on_intr\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdo_poll\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtimeout\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mKeyboardInterrupt\u001b[0m: " ] } ], "source": [ "# hash_tag_list = [\"donal trump\", \"hillary clinton\", \"barack obama\", \"bernie sanders\"]\n", "# \n", "# Here I define the output file\n", "fetched_tweets_filename = \"tweets.txt\"\n", "\n", "\n", "# Authenticate using config.py and connect to Twitter Streaming API.\n", "\n", "\n", "listener = StdOutListener(fetched_tweets_filename)\n", "auth = OAuthHandler(twitter_credentials.CONSUMER_KEY, twitter_credentials.CONSUMER_SECRET)\n", "auth.set_access_token(twitter_credentials.ACCESS_TOKEN, twitter_credentials.ACCESS_TOKEN_SECRET)\n", "stream = Stream(auth, listener)\n", "\n", "# twitter_streamer.stream_tweets(fetched_tweets_filename, hash_tag_list)\n", "# \n", "# Here you can see England's bounding box's coordinates\n", "stream.filter(locations=[-6.38,49.87,1.77,55.81])" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2019-12-10T12:06:18.781325Z", "start_time": "2019-12-10T12:06:09.279Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "# Loading in the data\n", "\n", "with open(fetched_tweets_filename) as f:\n", " data = f.readlines()\n", "\n", "tweets = []\n", "for k in data:\n", " tweets.append(json.loads(k))" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "skip" } }, "source": [ "## Cleaning the tweets\n", "\n", "\n", "Now that I have my tweets it is important to take a look at them. Below you can see the keys for a tweet." ] }, { "cell_type": "code", "execution_count": 142, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:27:17.487979Z", "start_time": "2019-11-19T14:27:17.482499Z" }, "slideshow": { "slide_type": "fragment" } }, "outputs": [ { "data": { "text/plain": [ "dict_keys(['created_at', 'id', 'id_str', 'text', 'source', 'truncated', 'in_reply_to_status_id', 'in_reply_to_status_id_str', 'in_reply_to_user_id', 'in_reply_to_user_id_str', 'in_reply_to_screen_name', 'user', 'geo', 'coordinates', 'place', 'contributors', 'is_quote_status', 'extended_tweet', 'quote_count', 'reply_count', 'retweet_count', 'favorite_count', 'entities', 'favorited', 'retweeted', 'filter_level', 'lang', 'timestamp_ms'])" ] }, "execution_count": 142, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tweets[0].keys()" ] }, { "cell_type": "code", "execution_count": 143, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:27:17.522337Z", "start_time": "2019-11-19T14:27:17.490847Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "for c,tweet in enumerate(tweets):\n", " try:\n", " tweet[\"place\"][\"bounding_box\"]\n", " except TypeError:\n", " del tweets[c]" ] }, { "cell_type": "code", "execution_count": 144, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:27:17.671915Z", "start_time": "2019-11-19T14:27:17.524981Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "df = pd.DataFrame()\n", "\n", "df['id'] = np.array([tweet[\"id\"] for tweet in tweets])\n", "df['date'] = np.array([tweet[\"created_at\"] for tweet in tweets])\n", "df['source'] = np.array([tweet[\"source\"] for tweet in tweets])\n", "df['likes'] = np.array([tweet[\"favorite_count\"] for tweet in tweets])\n", "df['retweets'] = np.array([tweet['retweet_count'] for tweet in tweets])\n", "df['name'] = np.array([tweet['user']['name'] for tweet in tweets])\n", "df['locs'] = [[loc[::-1]for loc in tweet['place']['bounding_box']['coordinates'][0] if loc is not None] for tweet in tweets]" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "Sometimes the text was longer than 140 characters, therefore it had to be stored in the so-called 'extended tweet'. The ratio of tweets where there was no need for a 'full_text' option:" ] }, { "cell_type": "code", "execution_count": 291, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T23:44:17.942299Z", "start_time": "2019-11-19T23:44:17.743877Z" }, "slideshow": { "slide_type": "fragment" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "0.7425100259495164\n" ] } ], "source": [ "texts = []\n", "cnt = 1\n", "for i, tweet in enumerate(tweets):\n", " try:\n", " texts.append(tweet['extended_tweet']['full_text'])\n", " except KeyError:\n", " texts.append(tweet['text'])\n", " cnt += 1\n", "print(f\"{cnt/i}\")" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "skip" } }, "source": [ "Since I did not need every single property, I only kept a few. Below you can see the top 5. I kept the id, date, source and location of the tweet, number of likes and retweets, the name of the user, and the raw text (and its length) of the tweet." ] }, { "cell_type": "code", "execution_count": 146, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:27:17.715123Z", "start_time": "2019-11-19T14:27:17.703519Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "df['text'] = texts\n", "df['len'] = np.array([len(i) for i in df.text])" ] }, { "cell_type": "code", "execution_count": 147, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:27:17.743431Z", "start_time": "2019-11-19T14:27:17.717647Z" }, "scrolled": false, "slideshow": { "slide_type": "fragment" } }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
iddatesourcelikesretweetsnamelocstextlen
01181300835122327552Mon Oct 07 20:10:41 +0000 2019<a href=\"http://twitter.com/download/android\" ...00Peter Dudley[[51.543815, 0.010398], [51.626165, 0.010398],...Side saw good chance thwarted by last ditch ta...147
11181300835239759872Mon Oct 07 20:10:41 +0000 2019<a href=\"http://twitter.com/download/iphone\" r...00Damian Wawrzyniak[[52.603205, -0.202653], [52.620535, -0.202653...@KarenWhiteFood @tweetertucker @AdamHandling I...322
21181300835348815874Mon Oct 07 20:10:41 +0000 2019<a href=\"http://twitter.com/download/iphone\" r...00deli Muru[[54.543241, -6.036116], [54.648497, -6.036116...@maggimccvil Congratulations Caroline! ⭐️41
31181300836519075841Mon Oct 07 20:10:41 +0000 2019<a href=\"http://twitter.com/download/android\" ...00Jordan Carroll[[53.438332, -3.058666], [53.501369, -3.058666...@Eric_Toffee1878 Original mate. Disturbing but...57
41181300838846926848Mon Oct 07 20:10:42 +0000 2019<a href=\"http://twitter.com/download/iphone\" r...00sarah guerra[[51.417277, -0.259465], [51.486036, -0.259465...You were great14
\n", "
" ], "text/plain": [ " id date \\\n", "0 1181300835122327552 Mon Oct 07 20:10:41 +0000 2019 \n", "1 1181300835239759872 Mon Oct 07 20:10:41 +0000 2019 \n", "2 1181300835348815874 Mon Oct 07 20:10:41 +0000 2019 \n", "3 1181300836519075841 Mon Oct 07 20:10:41 +0000 2019 \n", "4 1181300838846926848 Mon Oct 07 20:10:42 +0000 2019 \n", "\n", " source likes retweets \\\n", "0
" ], "text/plain": [ "" ] }, "execution_count": 148, "metadata": {}, "output_type": "execute_result" } ], "source": [ "mymap = folium.Map(location=[52.809865,-2.118092],zoom_start=5.4,tiles='cartodbpositron')\n", "for i in range(1000):\n", " marker = folium.Marker(location=df.locs[i][0],popup=df.text[i])\n", " marker.add_to(mymap)\n", "folium.Popup(parse_html=True)\n", "mymap" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "To clean the tweets from the URL-s I used the $\\texttt{re}$ package, and to get to the core of each word (to stem the words) I used $\\texttt{SnowballStemmer}$ from the $\\texttt{nltk}$ package. This iz what tokenizing means. After tokenization I was able to access the raw words in a list. Below you can see the evolution of this procedure." ] }, { "cell_type": "code", "execution_count": 149, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:27:19.770471Z", "start_time": "2019-11-19T14:27:19.766110Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "snow = SnowballStemmer('english',ignore_stopwords=False)" ] }, { "cell_type": "code", "execution_count": 150, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:27:19.778509Z", "start_time": "2019-11-19T14:27:19.773102Z" }, "slideshow": { "slide_type": "fragment" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Text of tweet no.8: \n", "\n", "Bob Prattey: Liverpool Exhibition Centre - Do NOT host trophy hunting safari companies - Sign the Petition! https://t.co/W8VcURxSLN via @UKChange\n" ] } ], "source": [ "print(f\"Text of tweet no.8: \\n\\n{df.text[8]}\")" ] }, { "cell_type": "code", "execution_count": 151, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:27:19.786356Z", "start_time": "2019-11-19T14:27:19.781216Z" }, "slideshow": { "slide_type": "fragment" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "\n", "After cleaning:\n", "\n", "Bob Prattey: Liverpool Exhibition Centre - Do NOT host trophy hunting safari companies - Sign the Petition! via @UKChange\n" ] } ], "source": [ "clean = re.sub(r'http\\S+', '', df.text[8])\n", "print(f\"\\nAfter cleaning:\\n\\n{clean}\")" ] }, { "cell_type": "code", "execution_count": 152, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:27:19.795204Z", "start_time": "2019-11-19T14:27:19.789656Z" }, "slideshow": { "slide_type": "fragment" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "After tokenizing:\n", "\n", "['bob', 'prattey', 'liverpool', 'exhibit', 'centr', 'do', 'not', 'host', 'trophi', 'hunt', 'safari', 'compani', 'sign', 'the', 'petit', 'via', 'ukchang']\n" ] } ], "source": [ "clean_tknzd = [snow.stem(word) for word in re.findall('\\w+',clean.lower())]\n", "print(f\"After tokenizing:\\n\\n{clean_tknzd}\")" ] }, { "cell_type": "code", "execution_count": 153, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:27:19.834595Z", "start_time": "2019-11-19T14:27:19.798009Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "df[\"nourl\"] = [re.sub(r'http\\S+', '', t) for t in df.text]" ] }, { "cell_type": "code", "execution_count": 154, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:27:21.654546Z", "start_time": "2019-11-19T14:27:19.837300Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "df['tkzd_clnd'] = [[snow.stem(word) for word in re.findall('\\w+',t.lower())] for t in df.nourl]" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Even though there might appear some meaningless word, this method provides us a standardization of every type of word, so that we are able to compare them." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Network of tweets \n", "\n", "To create a word-graph, I generated a $\\texttt{MultiGraph}$ by the $\\texttt{netwotrkx}$ package. In this network nodes were the tokenized and cleaned words, and two nodes were connected if they appeared in the same tweet. No self-loops were allowed. Here we can separate two cases: first, we allow paralell edges but no weight to them, second, when we only have at maximum one edge but all edges are weighted. Respectively, more common tweet means greater weight or more edge. I also removed the nodes \"s\" and \"t\" for practical reasons (for example, a text \"John's\" would be torn apart into \"John\" and \"s\" resulting in two different node, whilst \"s\" has no explicit meaning). Below you can see some interesting fact about the network" ] }, { "cell_type": "code", "execution_count": 155, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:27:21.668803Z", "start_time": "2019-11-19T14:27:21.664644Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "g = nx.MultiGraph()\n", "\n", "for index, tweet in df.iterrows():\n", " for i, w in enumerate(tweet['tkzd_clnd']):\n", " g.add_node(w)\n", " for j in range(i):\n", " if tweet['tkzd_clnd'][j]!=w:\n", " g.add_edge(tweet['tkzd_clnd'][j],w)\n", "\n", "g.remove_node(\"s\")\n", "g.remove_node(\"t\")" ] }, { "cell_type": "code", "execution_count": 287, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T19:16:56.598522Z", "start_time": "2019-11-19T19:16:55.203498Z" }, "scrolled": true, "slideshow": { "slide_type": "slide" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Num of nodes and edges: (22181, 1569028)\n", "Largest connected component consists of 21279 nodes, which is 0.959 of the all\n" ] } ], "source": [ "print(f\"Num of nodes and edges: {len(g.nodes), len(g.edges())}\")\n", "print(f\"Largest connected component consists of {lcc} nodes, which is {np.round(lcc/len(g.nodes()), 3)} of the all\")" ] }, { "cell_type": "code", "execution_count": 288, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T19:21:21.903128Z", "start_time": "2019-11-19T19:20:33.897932Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "Gc = max(nx.connected_component_subgraphs(g), key=len)" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "The words with the highest degree:" ] }, { "cell_type": "code", "execution_count": 161, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:28:47.499785Z", "start_time": "2019-11-19T14:28:47.495303Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "file = open(\"words_zipf.txt\", \"r\") " ] }, { "cell_type": "code", "execution_count": 162, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:28:47.508471Z", "start_time": "2019-11-19T14:28:47.502926Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "words = []\n", "freqs = []\n", "\n", "for line in file:\n", " t = line.split()\n", " words.append(t[0])\n", " freqs.append(t[1])" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:28:49.411478Z", "start_time": "2019-11-19T14:28:47.511299Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "degs = sorted(g.degree, key=lambda x: x[1], reverse=True)\n", "node, occ = [x[0] for x in degs], [x[1] for x in degs]\n", "\n", "n = 20\n", "len_g_e = len(g.edges()) \n", "\n", "data =[go.Bar(x = node[:n], y = [x/len_g_e for x in occ[:n]], name = \"From twitter\"),\n", " go.Bar(x = [x.lower() for x in words[:n]], y = [float(x)/10e5 for x in freqs[:n]], name = \"Real\" )]\n", "\n", "fig2 = go.Figure(data, layout=layout)\n", "#fig1.update_layout(xaxis_type=\"log\")#, yaxis_type=\"log\")\n", "fig2.update_layout({'hovermode': 'x',})\n", "fig2.update_xaxes(title_text = \"Nodes\", tickangle=315)\n", "fig2.update_yaxes(title_text = \"Num of edges (relative)\")\n", "fig2.update_layout(title=\"Most common words\" , font=dict(\n", " family='Courier New, monospace',\n", " size=14,\n", " color='black'\n", " ))" ] }, { "cell_type": "code", "execution_count": 164, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:28:49.598458Z", "start_time": "2019-11-19T14:28:49.414477Z" }, "slideshow": { "slide_type": "fragment" } }, "outputs": [ { "data": { "text/html": [ " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.plotly.v1+json": { "config": { "linkText": "Export to plot.ly", "plotlyServerURL": "https://plot.ly", "showLink": false }, "data": [ { "name": "From twitter", "type": "bar", "x": [ "the", "to", "a", "i", "and", "of", "it", "in", "you", "for", "is", "that", "on", "be", "this", "have", "with", "my", "we", "not" ], "y": [ 0.06636529112291177, 0.04825216630933291, 0.04276150584948134, 0.037093665632480746, 0.035745697336185205, 0.02808107949635061, 0.026766252737363515, 0.026473714936890866, 0.024886107832365004, 0.022077999882729946, 0.019435599619637124, 0.01654272581496315, 0.015658101703729953, 0.01402396897952108, 0.013069875107391328, 0.01268046204401706, 0.012183338984390337, 0.01207244230185822, 0.011663909120806002, 0.010064829945673372 ] }, { "name": "Real", "type": "bar", "x": [ "the", "of", "and", "to", "a", "in", "is", "that", "was", "it", "for", "on", "with", "he", "be", "i", "by", "as", "at", "you" ], "y": [ 0.06835163000000001, 0.03300866, 0.02865111, 0.02759922, 0.02316048, 0.02067081, 0.01057115, 0.010549020000000001, 0.00993926, 0.0098829, 0.00930944, 0.00763666, 0.00717107, 0.00716784, 0.00715317, 0.00703688, 0.0058668900000000005, 0.00579335, 0.00515412, 0.005043270000000001 ] } ], "layout": { "autosize": false, "bargroupgap": 0.3, "font": { "color": "black", "family": "Courier New, monospace", "size": 14 }, "height": 480, "hovermode": "x", "margin": { "b": 100, "l": 50, "pad": 4, "r": 50, "t": 100 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "scatter": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "Most common words" }, "width": 720, "xaxis": { "tickangle": -45, "title": { "text": "Nodes" } }, "yaxis": { "title": { "text": "Num of edges (relative)" } } } }, "text/html": [ "
\n", " \n", " \n", "
\n", " \n", "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plotly.offline.init_notebook_mode(connected=True)\n", "plotly.offline.iplot(fig2, filename='mostcommnodes')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The figure above shows the most common words (words with the highest degree) with blue bars. The measure for these are their relative occurrence which is the number of edges connecting to a word divided by the total number of edges. Red lines are those, which words originate from [this website](http://www.cs.cmu.edu/~cburch/words/top.html) and are in accordance with [Zipf's law](https://en.wikipedia.org/wiki/Zipf%27s_law). The measure here is the occurrence in a million words. What is interesting to see here is -- despite the fact that literature is very different for the sets -- 15 out of the 20 words match, and often thier positions, too. Maybe if we were to measure the 50 most frequent word, the relative mismatche would decrease. It is a great checkpoint to make sure, our measurement is based on real world data. " ] }, { "cell_type": "code", "execution_count": 165, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:28:53.709487Z", "start_time": "2019-11-19T14:28:49.601429Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "edgs = list(g.edges())\n", "\n", "edgs_d = dict(Counter(edgs))\n", "\n", "sorted_edgs = sorted(edgs_d.items(), key=operator.itemgetter(1), reverse=True)" ] }, { "cell_type": "code", "execution_count": 166, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:28:53.811981Z", "start_time": "2019-11-19T14:28:53.713727Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "n = 20\n", "\n", "toplot = [[e[0], e[1]] for c, e in enumerate(sorted_edgs) if c<30]\n", "nums = [100*z[1]/len(edgs) for z in toplot]\n", "labels = [str(z[0][0]+' - '+ z[0][1]) for z in toplot]" ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "Below you can see the 20 most common occurrences ('most numerous paralell edge')." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:28:54.143050Z", "start_time": "2019-11-19T14:28:53.815554Z" }, "scrolled": false, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "\n", "fig = go.Figure(go.Bar(x = labels,y = nums, name = 'Occurrence'), layout=layout )\n", "\n", "fig.update_xaxes(title_text = \"Connection pairs\", tickangle=315)\n", "fig.update_yaxes(title_text = \"% of all the connections\")\n", "fig.update_layout(title_text=\"Relative occurrence of the most common edges\", font=dict(\n", " family='Courier New, monospace',\n", " size=14,\n", " color='black'\n", " ))" ] }, { "cell_type": "code", "execution_count": 168, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:28:54.369801Z", "start_time": "2019-11-19T14:28:54.147037Z" }, "scrolled": false, "slideshow": { "slide_type": "fragment" } }, "outputs": [ { "data": { "text/html": [ " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.plotly.v1+json": { "config": { "linkText": "Export to plot.ly", "plotlyServerURL": "https://plot.ly", "showLink": false }, "data": [ { "name": "Occurrence", "type": "bar", "x": [ "to - the", "of - the", "and - the", "the - a", "i - the", "the - in", "to - a", "to - i", "and - to", "it - the", "i - a", "for - the", "is - the", "and - a", "you - the", "to - it", "of - a", "to - you", "and - i", "to - of", "i - it", "it - a", "the - on", "to - in", "that - the", "a - in", "you - a", "to - for", "and - of", "for - a" ], "y": [ 0.17705228969782566, 0.1335221551176907, 0.13275735041057266, 0.1318650782522683, 0.12103034490142942, 0.11656898410990754, 0.11070548135533592, 0.09840487231585415, 0.09668406172483857, 0.09139416250060547, 0.08693280170908359, 0.08049569542417344, 0.08049569542417344, 0.08030449424739393, 0.07654420443739691, 0.07335751815773842, 0.07055323423163895, 0.06908735854299605, 0.06857748873825069, 0.06781268403113265, 0.06583693853774439, 0.06507213383062635, 0.06379745931876295, 0.0632875895140176, 0.06296892088605174, 0.06099317539266348, 0.05627687969876892, 0.05474727028453284, 0.05449233538216017, 0.05340886204707628 ] } ], "layout": { "autosize": false, "bargroupgap": 0.3, "font": { "color": "black", "family": "Courier New, monospace", "size": 14 }, "height": 480, "margin": { "b": 100, "l": 50, "pad": 4, "r": 50, "t": 100 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "scatter": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "Relative occurrence of the most common edges" }, "width": 720, "xaxis": { "tickangle": -45, "title": { "text": "Connection pairs" } }, "yaxis": { "title": { "text": "% of all the connections" } } } }, "text/html": [ "
\n", " \n", " \n", "
\n", " \n", "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plotly.offline.init_notebook_mode(connected=True)\n", "plotly.offline.iplot(fig, filename='simple-3d-scatter')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This figure shows the most weighted edges aka. the edge word-pairs that occured the most. The measure is the number of occurrence divided by the number of total edges. As it could have been predicted, the word \"the\" is present in many pairs and the two most frequent nodes' pair is significantly higher." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "subslide" } }, "source": [ "#
Exploring small-world properties
\n", "\n", "As it was mentioned in the introduction, real world networks are scale-free networks and do exhibit the small-world effect. The first means that the degree distribution follows a power law function:\n", "\n", "\n", "$$\n", "p(k) \\sim k^{-\\gamma},\n", "$$\n", "\n", "where $p(k)$ means the probability of finding a node with degree $k$ and $\\gamma$ is the scaling exponent. This particular exponent is mostly above 2 for real world networks. Small world effect means that the longest shortest path ($d_{max}$) between two nodes when $N$ nodes in the network:\n", "\n", "$$\n", "d_{max} \\sim \\log(N). \n", "$$\n", "\n", "This means that every node is accessible in quite a few steps. Furthermore I measured the betweenness for all the nodes and compared to their relative frequency. The betweenness centrality of a node v ${\\displaystyle v}$ v is given by the expression:\n", "$$\n", " {\\displaystyle g(v)=\\sum _{s\\neq v\\neq t}{\\frac {\\sigma _{st}(v)}{\\sigma _{st}}}},\n", "$$\n", "\n", "where $\\sigma_{st}$ is the total number of shortest paths from node $s$ to node $t$ and $\\sigma_{st}(v)$ is the number of those paths that pass through $v$. In graph theory, betweenness centrality is a measure of centrality in a graph based on shortest paths. For every pair of vertices in a connected graph, there exists at least one shortest path between the vertices such that either the number of edges that the path passes through (for unweighted graphs) or the sum of the weights of the edges (for weighted graphs) is minimized. The betweenness centrality for each vertex is the number of these shortest paths that pass through the vertex ([source](https://en.wikipedia.org/wiki/Betweenness_centrality)). " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Below I created the weigthed graph and compared the number of nodes and edges to the non-weighted multi-edged one." ] }, { "cell_type": "code", "execution_count": 169, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:29:03.038574Z", "start_time": "2019-11-19T14:28:54.373080Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "G2 = nx.Graph()\n", "for u,v,data in g.edges(data=True):\n", " w = data['weight'] if 'weight' in data else 1.0\n", " if G2.has_edge(u,v):\n", " G2[u][v]['weight'] += w\n", " else:\n", " G2.add_edge(u, v, weight=w)\n" ] }, { "cell_type": "code", "execution_count": 171, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:29:04.591515Z", "start_time": "2019-11-19T14:29:03.053821Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "gnodes , gedges = len(g.nodes()),len(g.edges())\n", "G2nodes, G2edges = len(G2.nodes()),len(G2.edges())" ] }, { "cell_type": "code", "execution_count": 292, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T23:49:24.192959Z", "start_time": "2019-11-19T23:49:24.185437Z" }, "slideshow": { "slide_type": "subslide" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Num of nodes and edges in the multie, non-w: 22181, 1569028\n", "Num of nodes and edges in the non-m, weighted: 21982, 683128\n", "Ratio between the nodes and edges: 0.9910283576033542, 0.4353829249701089\n" ] } ], "source": [ "print(f\"Num of nodes and edges in the multie, non-w: {gnodes}, {gedges}\")\n", "print(f\"Num of nodes and edges in the non-m, weighted: {G2nodes}, {G2edges}\")\n", "print(f\"Ratio between the nodes and edges: {G2nodes/gnodes}, {G2edges/gedges}\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "As one can see, the number of nodes decreased. The reason behind this must be that there were some tweets which contained only one word. Since I converted the former network into a new based on the edges, these nodes must have been left out. " ] }, { "cell_type": "code", "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2019-11-25T23:22:52.416851Z", "start_time": "2019-11-25T23:22:52.283082Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "nx.write_weighted_edgelist(G2, \"edgelist2.txt\", ) # safety first, and vizualization second" ] }, { "cell_type": "code", "execution_count": 174, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:29:08.060456Z", "start_time": "2019-11-19T14:29:07.633997Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "# measure p(k) for both of te networks\n", "degree_sequence = sorted([d for n, d in g.degree()], reverse=True) # degree sequence\n", "# print \"Degree sequence\", degree_sequence\n", "degreeCount = collections.Counter(degree_sequence)\n", "deg, cnt = zip(*degreeCount.items())\n", "\n", "degree_sequence2 = sorted([d for n, d in G2.degree()], reverse=True) # degree sequence\n", "# print \"Degree sequence\", degree_sequence\n", "degreeCount2 = collections.Counter(degree_sequence2)\n", "deg2, cnt2 = zip(*degreeCount2.items())" ] }, { "cell_type": "code", "execution_count": 175, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:29:08.087323Z", "start_time": "2019-11-19T14:29:08.063274Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "fro, to = 530, 25 # arbitrary limits\n", "def func_powerlaw(x, m, c):\n", " return x**m * c\n", "\n", "popt2, pcov2 = curve_fit(func_powerlaw, deg2[fro:-to], cnt2[fro:-to],p0 =[2,10**2 ], maxfev = 2000)#p0 = np.asarray([0,10,0]))\n", "popt, pcov = curve_fit(func_powerlaw, deg[fro:-to], cnt[fro:-to],p0 =[2,10**2 ], maxfev = 2000)#p0 = np.asarray([0,10,0]))" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T18:01:49.052277Z", "start_time": "2019-11-19T17:58:42.785599Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "avg_clus2 = nx.average_clustering(G2)\n", "avg_deg2 = nx.average_degree_connectivity(G2)\n", "\n", "avg_deg = nx.average_degree_connectivity(g)" ] }, { "cell_type": "code", "execution_count": 249, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T18:14:13.618555Z", "start_time": "2019-11-19T18:14:13.612081Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "avg_deg_2_a = np.mean([c for n,c in avg_deg2.items()])\n", "avg_deg_a = np.mean([c for n,c in avg_deg.items()])\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T18:59:48.495109Z", "start_time": "2019-11-19T18:59:47.938075Z" }, "scrolled": false, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "\n", "fig = go.Figure([go.Scatter(x = deg,y = cnt, name = 'non-w, multie', mode='markers', marker=dict(color=\"blue\")),\n", " go.Scatter(x = deg2,y = cnt2, name = 'weighted, non-multie', mode='markers', marker=dict(color=\"red\")),\n", " go.Scatter(x = deg[fro:-to],y = func_powerlaw(deg[fro:-to], *popt), name = 'gamma' + ' = ' +str(np.round(abs(popt[0]), 3)), mode='lines', marker=dict(color=\"#17becf\")),\n", " go.Scatter(x = deg2[fro:-to],y = func_powerlaw(deg2[fro:-to], *popt2), name = 'gamma' + ' = ' +str(np.round(abs(popt2[0]), 3)), mode='lines', marker=dict(color=\"#e377c2\")),\n", " ], layout=layout )\n", "\n", "\n", "fig.update_xaxes(title_text = \"Degree\", tickangle=315)\n", "fig.update_yaxes(title_text = \"Num of words\")\n", "fig.update_layout(xaxis_type=\"log\", yaxis_type=\"log\")\n", "fig.update_layout(title_text=\"Degree distribution\" + \". The avg. deg. are \" + str(np.round(avg_deg_a, 3)) + \", \" + str(np.round(avg_deg_2_a, 3)) + \",\\nAvg clust:\" + str(np.round(avg_clus2, 3)) , font=dict(\n", " family='Courier New, monospace',\n", " size=14,\n", " color='black'\n", " ))\n", "\n", "fig.update_layout({'hovermode': 'x',})\n" ] }, { "cell_type": "code", "execution_count": 263, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T18:59:48.774825Z", "start_time": "2019-11-19T18:59:48.499111Z" }, "scrolled": false, "slideshow": { "slide_type": "fragment" } }, "outputs": [ { "data": { "text/html": [ " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.plotly.v1+json": { "config": { "linkText": "Export to plot.ly", "plotlyServerURL": "https://plot.ly", "showLink": false }, "data": [ { "marker": { "color": "blue" }, "mode": "markers", "name": "non-w, multie", "type": "scatter", "x": [ 104129, 75709, 67094, 58201, 56086, 44060, 41997, 41538, 39047, 34641, 30495, 25956, 24568, 22004, 20507, 19896, 19116, 18942, 18301, 15792, 15617, 15306, 14702, 14541, 13566, 13133, 12876, 12315, 12032, 11942, 11587, 11529, 11470, 11374, 10723, 10581, 10199, 10135, 10008, 9806, 9608, 9379, 9110, 8810, 8649, 8472, 8438, 8286, 8133, 7929, 7799, 7451, 7438, 7223, 7195, 7182, 7031, 6988, 6889, 6641, 6583, 6366, 6302, 6236, 6192, 6122, 6074, 6041, 6032, 6021, 5958, 5933, 5753, 5656, 5606, 5598, 5353, 5286, 5275, 5261, 5199, 5123, 5110, 5103, 4991, 4863, 4809, 4735, 4712, 4582, 4490, 4214, 4203, 4178, 4147, 4085, 4043, 4036, 4022, 3875, 3868, 3846, 3800, 3731, 3727, 3690, 3682, 3661, 3646, 3597, 3566, 3563, 3553, 3511, 3508, 3468, 3415, 3413, 3399, 3358, 3278, 3218, 3210, 3191, 3186, 3152, 3129, 3127, 3090, 3075, 3010, 3000, 2992, 2970, 2969, 2953, 2892, 2880, 2866, 2854, 2802, 2800, 2793, 2767, 2765, 2700, 2697, 2680, 2672, 2669, 2642, 2582, 2577, 2549, 2534, 2517, 2487, 2461, 2458, 2454, 2447, 2442, 2422, 2378, 2374, 2361, 2349, 2342, 2332, 2328, 2298, 2293, 2292, 2280, 2246, 2242, 2238, 2214, 2210, 2177, 2173, 2159, 2143, 2138, 2134, 2119, 2109, 2098, 2091, 2084, 2056, 2039, 2032, 2027, 2004, 1988, 1979, 1975, 1959, 1950, 1931, 1928, 1921, 1919, 1897, 1883, 1869, 1868, 1859, 1850, 1842, 1841, 1836, 1832, 1830, 1806, 1789, 1777, 1766, 1751, 1736, 1734, 1694, 1692, 1685, 1681, 1673, 1667, 1665, 1661, 1654, 1625, 1620, 1619, 1618, 1616, 1615, 1614, 1612, 1610, 1604, 1595, 1568, 1555, 1548, 1542, 1534, 1530, 1521, 1517, 1507, 1475, 1466, 1464, 1452, 1451, 1450, 1442, 1441, 1434, 1430, 1418, 1407, 1403, 1400, 1395, 1389, 1387, 1386, 1375, 1372, 1370, 1368, 1367, 1355, 1349, 1348, 1343, 1338, 1329, 1328, 1321, 1319, 1302, 1288, 1287, 1285, 1283, 1279, 1278, 1272, 1269, 1262, 1244, 1242, 1241, 1236, 1218, 1217, 1213, 1204, 1202, 1196, 1194, 1183, 1176, 1174, 1169, 1166, 1162, 1161, 1159, 1157, 1153, 1141, 1138, 1135, 1128, 1117, 1109, 1105, 1100, 1098, 1095, 1092, 1090, 1089, 1088, 1086, 1085, 1083, 1077, 1076, 1073, 1066, 1064, 1063, 1061, 1055, 1054, 1053, 1047, 1044, 1041, 1040, 1034, 1026, 1024, 1020, 1017, 1008, 1004, 1002, 1001, 999, 996, 987, 986, 982, 979, 977, 969, 966, 963, 962, 953, 951, 947, 944, 939, 938, 933, 931, 930, 926, 925, 924, 921, 920, 917, 914, 913, 912, 909, 907, 906, 901, 897, 896, 893, 890, 889, 882, 881, 880, 879, 878, 874, 873, 870, 868, 864, 857, 853, 851, 848, 847, 844, 842, 837, 836, 834, 826, 825, 823, 821, 820, 818, 817, 815, 809, 807, 804, 801, 800, 799, 796, 795, 793, 791, 790, 789, 788, 786, 785, 784, 780, 779, 777, 775, 773, 772, 770, 769, 765, 764, 763, 759, 757, 756, 755, 754, 752, 748, 747, 743, 742, 741, 740, 739, 736, 734, 733, 731, 730, 729, 728, 726, 725, 724, 723, 720, 719, 718, 716, 715, 714, 713, 712, 707, 701, 697, 695, 694, 692, 690, 689, 688, 687, 680, 679, 677, 676, 673, 671, 668, 666, 665, 664, 663, 662, 661, 659, 658, 657, 656, 655, 654, 652, 651, 650, 648, 647, 641, 640, 639, 638, 635, 632, 631, 629, 627, 625, 623, 620, 618, 615, 613, 612, 611, 610, 609, 608, 607, 606, 605, 603, 599, 598, 597, 596, 595, 590, 588, 587, 585, 580, 579, 578, 577, 576, 573, 572, 571, 570, 569, 568, 565, 564, 563, 562, 561, 560, 559, 558, 557, 556, 555, 554, 553, 552, 551, 550, 548, 547, 546, 545, 544, 543, 542, 541, 540, 538, 537, 536, 535, 534, 532, 530, 529, 528, 527, 526, 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, 513, 512, 511, 509, 508, 507, 506, 505, 504, 502, 501, 499, 497, 495, 494, 493, 491, 490, 489, 488, 487, 486, 485, 483, 482, 480, 479, 478, 477, 476, 475, 474, 473, 472, 469, 468, 467, 466, 465, 464, 463, 462, 461, 459, 458, 454, 453, 452, 450, 448, 447, 446, 445, 444, 443, 442, 441, 440, 438, 437, 436, 435, 433, 432, 431, 429, 428, 427, 426, 425, 423, 422, 421, 420, 418, 417, 416, 415, 414, 413, 412, 411, 410, 409, 408, 406, 405, 404, 403, 402, 401, 400, 399, 398, 397, 396, 395, 393, 391, 390, 389, 388, 387, 386, 385, 384, 383, 382, 379, 378, 377, 376, 375, 374, 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, 360, 358, 357, 356, 355, 354, 352, 351, 350, 349, 348, 346, 345, 344, 343, 342, 341, 340, 339, 338, 337, 335, 334, 333, 332, 331, 330, 328, 326, 325, 324, 323, 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 226, 225, 224, 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208, 207, 206, 205, 204, 203, 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, 189, 188, 187, 186, 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160, 159, 158, 157, 156, 155, 154, 153, 152, 151, 150, 149, 148, 147, 146, 145, 144, 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 ], "y": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, 2, 1, 3, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 3, 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 2, 2, 1, 1, 1, 1, 2, 3, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 1, 2, 1, 3, 2, 2, 3, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 3, 1, 2, 3, 2, 1, 2, 1, 2, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 4, 2, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 2, 1, 1, 2, 5, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 4, 1, 4, 1, 3, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 2, 3, 2, 1, 1, 1, 1, 1, 1, 3, 4, 1, 2, 4, 3, 1, 3, 2, 1, 2, 1, 2, 1, 4, 3, 1, 3, 1, 2, 1, 2, 3, 1, 2, 2, 2, 2, 2, 1, 1, 1, 1, 2, 3, 1, 1, 1, 2, 2, 4, 3, 3, 1, 3, 1, 2, 2, 1, 1, 2, 3, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 1, 2, 3, 2, 2, 2, 2, 3, 1, 1, 2, 1, 4, 2, 1, 2, 1, 2, 3, 2, 2, 4, 1, 4, 1, 3, 2, 5, 4, 2, 4, 3, 3, 2, 3, 1, 2, 2, 3, 4, 6, 2, 3, 4, 3, 2, 3, 3, 1, 2, 5, 1, 2, 2, 2, 2, 1, 1, 3, 1, 2, 4, 1, 3, 3, 2, 5, 3, 8, 2, 3, 3, 3, 3, 1, 1, 3, 3, 1, 1, 3, 3, 4, 5, 1, 7, 4, 4, 1, 2, 3, 5, 3, 2, 1, 1, 4, 6, 2, 2, 6, 3, 5, 1, 3, 5, 1, 3, 3, 5, 3, 4, 2, 4, 2, 1, 1, 3, 2, 4, 4, 6, 3, 3, 5, 1, 3, 4, 5, 2, 3, 5, 6, 2, 2, 1, 4, 15, 2, 1, 2, 5, 5, 1, 5, 2, 7, 6, 1, 1, 5, 5, 4, 4, 6, 5, 2, 2, 3, 6, 4, 4, 7, 5, 3, 6, 8, 5, 6, 4, 4, 5, 2, 7, 4, 6, 7, 5, 1, 4, 3, 2, 1, 16, 7, 2, 5, 6, 7, 5, 6, 8, 7, 4, 4, 3, 8, 6, 10, 9, 4, 6, 9, 7, 5, 3, 4, 7, 6, 6, 12, 5, 4, 9, 3, 4, 2, 4, 10, 5, 8, 5, 2, 5, 5, 3, 8, 11, 6, 5, 9, 8, 5, 9, 1, 10, 8, 3, 3, 7, 9, 6, 7, 11, 8, 10, 7, 10, 13, 5, 17, 19, 9, 5, 8, 10, 10, 10, 7, 8, 7, 5, 5, 10, 9, 12, 11, 9, 14, 11, 9, 18, 10, 11, 10, 6, 7, 5, 4, 10, 12, 6, 9, 12, 13, 7, 14, 12, 13, 10, 12, 18, 19, 13, 15, 14, 10, 22, 21, 11, 11, 17, 16, 16, 9, 17, 40, 15, 17, 15, 11, 19, 27, 13, 22, 13, 16, 20, 25, 19, 17, 25, 19, 19, 41, 30, 17, 53, 19, 25, 29, 27, 23, 30, 30, 25, 22, 29, 27, 75, 26, 51, 35, 37, 22, 38, 36, 32, 32, 38, 31, 47, 31, 45, 50, 47, 25, 46, 40, 60, 33, 44, 46, 64, 53, 48, 52, 64, 47, 67, 56, 91, 61, 131, 77, 72, 138, 119, 149, 182, 116, 194, 174, 192, 165, 195, 199, 263, 260, 221, 175, 276, 193, 189, 211, 289, 303, 246, 360, 250, 372, 398, 347, 336, 335, 363, 396, 382, 432, 359, 458, 469, 402, 406, 500, 541, 493, 506, 493, 564, 517, 558, 542, 463, 469, 411, 296, 199 ] }, { "marker": { "color": "red" }, "mode": "markers", "name": "weighted, non-multie", "type": "scatter", "x": [ 10166, 8958, 8687, 7715, 7149, 6971, 6744, 6106, 5940, 5933, 5334, 5133, 4601, 4492, 4484, 4386, 4086, 3888, 3646, 3578, 3496, 3447, 3380, 3315, 3207, 3184, 3156, 3073, 3017, 3005, 2984, 2949, 2827, 2806, 2640, 2623, 2549, 2537, 2529, 2498, 2471, 2459, 2456, 2446, 2445, 2428, 2409, 2399, 2381, 2258, 2217, 2201, 2191, 2181, 2120, 2113, 2087, 2040, 2032, 2019, 2002, 1982, 1967, 1922, 1872, 1866, 1855, 1842, 1821, 1810, 1808, 1791, 1783, 1764, 1732, 1730, 1729, 1725, 1682, 1658, 1656, 1643, 1641, 1630, 1618, 1616, 1590, 1568, 1546, 1532, 1478, 1469, 1444, 1440, 1436, 1422, 1408, 1399, 1389, 1362, 1361, 1356, 1346, 1335, 1326, 1325, 1309, 1297, 1282, 1281, 1277, 1252, 1231, 1230, 1228, 1226, 1222, 1209, 1204, 1183, 1167, 1163, 1158, 1157, 1155, 1152, 1139, 1126, 1125, 1116, 1105, 1102, 1093, 1091, 1088, 1086, 1083, 1076, 1074, 1061, 1052, 1036, 1034, 1033, 1031, 1020, 1016, 1011, 990, 986, 984, 978, 976, 967, 963, 956, 955, 954, 945, 938, 934, 927, 917, 910, 902, 901, 891, 883, 877, 871, 869, 867, 865, 862, 856, 851, 848, 847, 844, 834, 833, 832, 829, 828, 826, 824, 823, 819, 818, 812, 811, 807, 802, 801, 779, 778, 776, 774, 769, 768, 762, 754, 753, 751, 749, 748, 746, 744, 742, 741, 739, 737, 735, 734, 733, 728, 727, 723, 714, 713, 712, 707, 704, 703, 702, 695, 691, 683, 682, 675, 672, 668, 667, 665, 663, 661, 657, 653, 651, 650, 649, 647, 646, 645, 643, 639, 635, 634, 631, 629, 628, 627, 625, 624, 620, 616, 615, 614, 613, 611, 607, 606, 604, 602, 601, 600, 598, 597, 592, 588, 585, 583, 579, 577, 576, 572, 569, 568, 565, 564, 556, 555, 554, 553, 551, 550, 549, 548, 546, 542, 540, 538, 536, 534, 533, 532, 531, 530, 528, 525, 524, 521, 516, 515, 514, 513, 512, 504, 503, 499, 498, 497, 496, 495, 494, 493, 491, 488, 486, 485, 484, 481, 480, 479, 478, 474, 473, 472, 469, 468, 467, 466, 465, 462, 460, 458, 457, 456, 455, 453, 452, 451, 450, 448, 446, 445, 444, 443, 442, 438, 437, 436, 435, 434, 431, 430, 429, 428, 427, 426, 425, 422, 421, 420, 419, 418, 417, 415, 414, 412, 411, 410, 409, 408, 406, 405, 404, 402, 401, 400, 399, 398, 397, 396, 395, 394, 392, 391, 390, 389, 388, 387, 386, 385, 384, 383, 382, 381, 380, 379, 378, 377, 376, 374, 373, 372, 371, 369, 368, 367, 366, 365, 364, 363, 362, 361, 360, 359, 358, 357, 356, 355, 354, 353, 352, 350, 349, 347, 346, 345, 344, 343, 342, 341, 340, 339, 338, 337, 336, 335, 334, 333, 332, 331, 329, 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, 295, 294, 293, 292, 291, 289, 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 210, 209, 208, 207, 206, 205, 204, 203, 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, 189, 188, 187, 186, 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160, 159, 158, 157, 156, 155, 154, 153, 152, 151, 150, 149, 148, 147, 146, 145, 144, 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 ], "y": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 3, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 2, 3, 2, 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 2, 2, 1, 2, 2, 1, 3, 1, 1, 2, 3, 2, 1, 2, 2, 2, 4, 3, 1, 2, 2, 2, 1, 1, 1, 3, 2, 2, 1, 3, 3, 2, 1, 5, 2, 1, 2, 2, 2, 1, 1, 2, 3, 2, 2, 1, 1, 1, 1, 3, 4, 1, 2, 1, 1, 2, 3, 1, 3, 7, 3, 1, 2, 3, 3, 1, 4, 1, 4, 2, 3, 2, 2, 1, 1, 1, 3, 4, 1, 1, 1, 4, 1, 2, 1, 1, 4, 1, 1, 1, 1, 1, 2, 1, 4, 2, 1, 1, 3, 3, 2, 2, 1, 4, 3, 2, 1, 3, 5, 3, 3, 2, 3, 3, 2, 1, 2, 1, 1, 1, 1, 2, 5, 2, 3, 5, 4, 3, 2, 2, 1, 2, 2, 4, 3, 2, 5, 3, 3, 2, 1, 4, 3, 3, 3, 1, 5, 1, 1, 3, 1, 2, 4, 1, 3, 1, 3, 3, 1, 4, 3, 5, 4, 3, 1, 3, 4, 5, 1, 1, 1, 6, 1, 2, 5, 3, 4, 4, 1, 4, 3, 3, 3, 4, 2, 5, 3, 3, 3, 4, 2, 1, 4, 7, 1, 3, 5, 4, 2, 3, 4, 1, 6, 2, 3, 8, 1, 5, 2, 6, 4, 4, 8, 5, 3, 4, 4, 4, 4, 7, 4, 1, 4, 4, 6, 8, 1, 3, 10, 5, 8, 4, 5, 8, 3, 6, 2, 3, 7, 6, 3, 2, 2, 4, 7, 4, 5, 5, 9, 3, 7, 2, 2, 5, 3, 8, 8, 4, 9, 6, 6, 5, 5, 5, 6, 6, 3, 6, 5, 3, 5, 6, 10, 9, 8, 8, 9, 8, 7, 5, 4, 5, 4, 10, 6, 7, 3, 6, 8, 6, 5, 12, 6, 9, 8, 7, 4, 10, 17, 8, 10, 7, 14, 8, 10, 8, 10, 10, 8, 13, 5, 7, 6, 7, 4, 15, 9, 5, 7, 6, 13, 16, 7, 5, 23, 7, 9, 9, 13, 7, 15, 11, 14, 7, 7, 14, 13, 15, 17, 14, 8, 13, 18, 25, 16, 17, 19, 11, 13, 9, 8, 20, 19, 10, 12, 16, 20, 18, 21, 29, 27, 17, 14, 25, 23, 34, 18, 21, 21, 25, 27, 21, 20, 20, 30, 20, 23, 35, 22, 33, 26, 27, 26, 30, 37, 23, 37, 26, 38, 32, 38, 40, 40, 34, 37, 51, 43, 42, 43, 56, 59, 56, 49, 46, 53, 63, 61, 77, 73, 49, 78, 52, 62, 101, 105, 101, 104, 198, 118, 130, 127, 192, 316, 280, 202, 308, 290, 237, 350, 347, 231, 358, 259, 406, 342, 305, 436, 427, 398, 338, 369, 500, 406, 430, 469, 551, 513, 479, 447, 569, 578, 548, 524, 529, 602, 544, 584, 558, 486, 476, 421, 308 ] }, { "marker": { "color": "#17becf" }, "mode": "lines", "name": "gamma = 1.897", "type": "scatter", "x": [ 610, 609, 608, 607, 606, 605, 603, 599, 598, 597, 596, 595, 590, 588, 587, 585, 580, 579, 578, 577, 576, 573, 572, 571, 570, 569, 568, 565, 564, 563, 562, 561, 560, 559, 558, 557, 556, 555, 554, 553, 552, 551, 550, 548, 547, 546, 545, 544, 543, 542, 541, 540, 538, 537, 536, 535, 534, 532, 530, 529, 528, 527, 526, 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, 513, 512, 511, 509, 508, 507, 506, 505, 504, 502, 501, 499, 497, 495, 494, 493, 491, 490, 489, 488, 487, 486, 485, 483, 482, 480, 479, 478, 477, 476, 475, 474, 473, 472, 469, 468, 467, 466, 465, 464, 463, 462, 461, 459, 458, 454, 453, 452, 450, 448, 447, 446, 445, 444, 443, 442, 441, 440, 438, 437, 436, 435, 433, 432, 431, 429, 428, 427, 426, 425, 423, 422, 421, 420, 418, 417, 416, 415, 414, 413, 412, 411, 410, 409, 408, 406, 405, 404, 403, 402, 401, 400, 399, 398, 397, 396, 395, 393, 391, 390, 389, 388, 387, 386, 385, 384, 383, 382, 379, 378, 377, 376, 375, 374, 372, 371, 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, 360, 358, 357, 356, 355, 354, 352, 351, 350, 349, 348, 346, 345, 344, 343, 342, 341, 340, 339, 338, 337, 335, 334, 333, 332, 331, 330, 328, 326, 325, 324, 323, 322, 321, 320, 319, 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, 288, 287, 286, 285, 284, 282, 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 226, 225, 224, 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208, 207, 206, 205, 204, 203, 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, 189, 188, 187, 186, 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160, 159, 158, 157, 156, 155, 154, 153, 152, 151, 150, 149, 148, 147, 146, 145, 144, 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25 ], "y": [ 0.9698800007862567, 0.9729026519876125, 0.9759397139775929, 0.9789912793328406, 0.9820574413785836, 0.9851382941959365, 0.9913444522937567, 1.0039372829668465, 1.0071236705234974, 1.0103255296168039, 1.013542961473557, 1.0167760681542226, 1.0331803554414951, 1.0398554620106288, 1.0432177442785953, 1.049992316530903, 1.067225698381643, 1.0707241960051073, 1.074240239447108, 1.077773947289117, 1.0813254391214475, 1.092087829814447, 1.0957116740530597, 1.099353915732974, 1.1030146807194041, 1.1066940959615579, 1.1103922895038982, 1.1216008370458677, 1.125375446540607, 1.1291694913905628, 1.1329831064560496, 1.1368164277754202, 1.1406695925774797, 1.1445427392940528, 1.1484360075727078, 1.1523495382896358, 1.1562834735626921, 1.160237956764598, 1.164213132536309, 1.1682091468005475, 1.1722261467755068, 1.1762642809887263, 1.1803236992911388, 1.1885069942697832, 1.192631177393783, 1.1967772575318696, 1.2009453913689556, 1.2051357370014413, 1.2093484539525552, 1.2135837031878902, 1.217841647131137, 1.222122449680019, 1.2307532936527887, 1.2351036703885783, 1.2394775763871317, 1.2438751831626107, 1.2482966638032105, 1.2572119470075263, 1.2662248428542924, 1.2707683454673822, 1.275336794521494, 1.279930374623956, 1.2845492721020817, 1.2938637732107523, 1.2985597582711297, 1.3032818236067918, 1.30803016444014, 1.3128049778334652, 1.3176064627098685, 1.3224348198744638, 1.3272902520358594, 1.3321729638279298, 1.3370831618318788, 1.346986852671327, 1.351980768608618, 1.3570030170076135, 1.3671333799140912, 1.3722419340227217, 1.3773796998441532, 1.382546902528805, 1.3877437694121286, 1.3929705300401942, 1.4035146619239105, 1.4088325035600247, 1.4195609315057507, 1.4304146375391709, 1.4413955975677524, 1.4469344260275572, 1.452505826820329, 1.4637473807932673, 1.4694180581420013, 1.4751223562233637, 1.480860543737414, 1.486632892088355, 1.4924396754173692, 1.498281170635928, 1.510069418442174, 1.5160167390106978, 1.528019215190835, 1.5340749563416467, 1.540167428229852, 1.5462969311869326, 1.5524637686367564, 1.5586682471340036, 1.5649106764031484, 1.5711913693780146, 1.5775106422419052, 1.5967031516022652, 1.6031799722827045, 1.6096970039572185, 1.6162545831823933, 1.6228530500622518, 1.6294927482933785, 1.6361740252107173, 1.642897231834053, 1.6496627229151888, 1.6633219964062058, 1.6702165074143756, 1.6982357306371725, 1.7053527324288038, 1.7125153875300099, 1.7269792412767104, 1.7416305024535539, 1.7490274333974956, 1.756472452275041, 1.7639659805836585, 1.771508444473903, 1.779100274811416, 1.7867419072398907, 1.7944337822450234, 1.8021763452194697, 1.8178153415786134, 1.825712690882421, 1.8336625601309897, 1.8416654202624976, 1.8578320235935408, 1.8659967355546057, 1.874216376070179, 1.8908224415336685, 1.899209880177334, 1.9076542749253091, 1.916156147295233, 1.9247160248196533, 1.942011936040494, 1.9507490556370373, 1.9595463523627352, 1.9684043851084514, 1.9863049270074928, 1.9953485870051686, 2.0044552849008466, 2.0136256132159134, 2.0228601714873546, 2.032159566368024, 2.0415244117286004, 2.0509553287612508, 2.060452946085043, 2.070017899853137, 2.079650833861789, 2.099123256668289, 2.1089640722812817, 2.1188755219964057, 2.128858289526469, 2.1389130669215275, 2.1490405546916143, 2.1592414619315923, 2.169516506448168, 2.1798664148891045, 2.1902919228746853, 2.200793775131468, 2.211372725628378, 2.2327649842634147, 2.2544749207019024, 2.265451005247227, 2.2765089138637595, 2.2876494692341014, 2.298873504461989, 2.31018186323167, 2.321575399970143, 2.3330549800123075, 2.3446214797691, 2.3562757868986615, 2.3917746014953867, 2.4037892458080212, 2.4158963107039617, 2.4280967550974735, 2.4403915504387976, 2.452781680912033, 2.4778519488729325, 2.49053412023077, 2.5033156948829802, 2.5161977237821462, 2.5291812718817135, 2.5422674183612157, 2.55545725685575, 2.5687518956897897, 2.582152458115438, 2.595660082555209, 2.6092759228494433, 2.6230011485084535, 2.6368369449695077, 2.664845073258203, 2.679019857977861, 2.6933101198331593, 2.7077171279277663, 2.722242168941922, 2.7516515861023065, 2.766538626166605, 2.7815490276038926, 2.7966841695041844, 2.8119454503870633, 2.8428521223168994, 2.85850041055933, 2.8742806328700765, 2.890194290009693, 2.906242904253904, 2.9224280197661394, 2.93875120297762, 2.9552140429752023, 2.9718181518971365, 2.988565165336935, 3.0224945679020316, 3.039680349242908, 3.0570158204004425, 3.0745027406000265, 3.0921428951268988, 3.1099380957924234, 3.146001018281942, 3.1827065514250577, 3.2013051222615005, 3.2200701945285286, 3.2390037796288906, 3.2581079195946985, 3.2773846876508466, 3.296836188790601, 3.316464560363644, 3.336271972676895, 3.356260629608416, 3.376432769234735, 3.396790664471929, 3.4173366237307987, 3.4380729915865094, 3.4590021494630445, 3.480126516332868, 3.5014485494321725, 3.5229707449921093, 3.5446956389864215, 3.5666258078958912, 3.5887638694900494, 3.611112483626575, 3.6336743530688684, 3.6564522243222535, 3.679448888489303, 3.702667182144798, 3.7261099882308226, 3.749780236972543, 3.7736809068152026, 3.7978150253829193, 3.8221856704598447, 3.8467959709943047, 3.871649108126523, 3.8967483162405787, 3.922096884041243, 3.947698155656377, 3.973555531765586, 3.999672470755851, 4.026052489904871, 4.052699166592896, 4.079616139543812, 4.106807110096318, 4.13427584350602, 4.1900619875398535, 4.218387260428839, 4.247006023539551, 4.275922382387612, 4.305140514917713, 4.33466467304791, 4.364499184252582, 4.394648453185147, 4.4251169633416865, 4.455909278766676, 4.487030045802018, 4.518483994880677, 4.550275942366192, 4.582410792439434, 4.614893539033997, 4.647729267821659, 4.680923158249416, 4.714480485629606, 4.748406623284737, 4.782707044748651, 4.817387326025724, 4.852453147909865, 4.887910298365142, 4.923764674969888, 4.960022287426281, 4.996689260137356, 5.033771834853587, 5.071276373391153, 5.109209360424152, 5.147577406353059, 5.186387250251826, 5.225645762896098, 5.265359949875117, 5.305536954789976, 5.346184062540969, 5.38730870270689, 5.428918453019249, 5.471021042934462, 5.513624357307183, 5.556736440168099, 5.600365498609561, 5.644519906782634, 5.689208210009206, 5.734439129012986, 5.780221564273326, 5.826564600505982, 5.873477511275064, 5.920969763740581, 5.969051023546186, 6.017731159851865, 6.067020250516519, 6.116928587435576, 6.167466682038957, 6.218645270954942, 6.270475321845702, 6.376134871632513, 6.429987516066586, 6.484537926523221, 6.539798319807218, 6.595781182727379, 6.652499279315126, 6.709965658269876, 6.7681936606393585, 6.827196927743385, 6.886989409349987, 6.947585372113137, 7.008999408281682, 7.071246444689538, 7.134341752037567, 7.198300954478054, 7.2631400395131, 7.328875368218795, 7.395523685807472, 7.4631021325409295, 7.531628255008029, 7.601120017780674, 7.671595815462748, 7.743074485147318, 7.8155753192979365, 7.889118079070735, 7.963723008094612, 8.039410846727666, 8.116202846808816, 8.194120786924383, 8.273186988210341, 8.353424330711867, 8.434856270322797, 8.517506856328646, 8.601400749577966, 8.68656324130792, 8.773020272651197, 8.860798454852635, 8.949925090225305, 9.04042819387715, 9.132336516240832, 9.225679566440935, 9.320487636534386, 9.416791826661628, 9.514624071147963, 9.614017165596383, 9.715004795015249, 9.817621563026332, 9.921903022201006, 10.027885705574729, 10.135607159392574, 10.245105977141113, 10.35642183492491, 10.46959552824874, 10.584669010269922, 10.701685431588398, 10.82068918164576, 10.941725931808156, 11.064842680211985, 11.190087798455425, 11.317511080223314, 11.447163791937628, 11.579098725530724, 11.71337025344385, 11.85003438595903, 11.989148830978344, 12.130773056371021, 12.274968355015387, 12.421797912669893, 12.57132687881502, 12.7236224406159, 12.87875390016409, 13.036792755166019, 13.197812783255328, 13.361890130116773, 13.529103401620164, 13.699533760174763, 13.873265025526921, 14.050383780237171, 14.23097948008718, 14.415144569682209, 14.602974603530892, 14.794568372901612, 14.990028038773177, 15.189459271217368, 15.392971395572191, 15.600677545787324, 15.812694825347565, 16.029144476206206, 16.2501520561881, 16.475847625352255, 16.706365941835795, 16.9418466677358, 17.18243458562244, 17.42827982631676, 17.679538108609282, 17.936370991641592, 18.19894614072279, 18.46743760740601, 18.742026124707795, 19.02289941841519, 19.310252535492292, 19.604288190670424, 19.905217132383928, 20.213258529298137, 20.528640378767214, 20.851599938658232, 21.182384184084896, 21.521250290709897, 21.868466146400696, 22.224310893159576, 22.589075501396692, 22.96306337877571, 23.346591016035976, 23.739988672385426, 24.143601103265276, 24.55778833351278, 24.982926479194305, 25.419408621649026, 25.867645737576325, 26.328067689320136, 26.801124279853415, 27.287286377349155, 27.787047114643993, 28.300923169361006, 28.829456130963152, 29.37321396156386, 29.932792557931208, 30.508817422793435, 31.101945454292785, 31.712866863249957, 32.34230722880089, 32.99102970396132, 33.659837383773414, 34.34957584990503, 35.06113590691988, 35.795456526932064, 36.553528021018465, 37.336395457608575, 38.14516235012541, 38.98099463844076, 39.845124991261834, 40.73885745941958, 41.66357251321973, 42.62073250059105, 43.61188756677232, 44.638682080778445, 45.7028616189457, 46.806280561551404, 47.95091036492688, 49.138848578735484, 50.37232868629084, 51.65373085508221, 52.98559369521609, 54.37062713546312, 55.81172654023577, 57.31198820637151, 58.87472639635759, 60.503492084958594, 62.20209361950991, 63.974619520907474, 65.82546368313096, 67.75935326466728, 69.78137960626228, 71.89703255698481, 74.1122386457891, 76.43340359998206, 78.86745978689429, 81.42191924260133, 84.10493305413945, 86.92535798221009, 89.89283135338677, 93.01785541861629, 96.31189257358207, 99.78747307269704, 103.45831715002468, 107.33947379705673, 111.44747885111943, 115.8005355343141, 120.41872117017456, 125.324224517309, 130.54161902603119, 136.0981783831871, 142.02424201017942, 148.35363978117172, 155.12418721182144, 162.37826483608194, 170.1634985728549, 178.5335617598808, 187.54912442873777, 197.2789816163324, 207.80140046068877, 219.20573605769164, 231.59437929953043, 245.08511718353012, 259.8140087604427, 275.93890991293995, 293.6438202225961, 313.1442791274886, 334.69411187528135, 358.5939263746206, 385.2019015678063, 414.9476036434722 ] }, { "marker": { "color": "#e377c2" }, "mode": "lines", "name": "gamma = 2.226", "type": "scatter", "x": [ 239, 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, 221, 220, 219, 218, 217, 216, 215, 214, 213, 212, 210, 209, 208, 207, 206, 205, 204, 203, 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, 192, 191, 190, 189, 188, 187, 186, 185, 184, 183, 182, 181, 180, 179, 178, 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, 164, 163, 162, 161, 160, 159, 158, 157, 156, 155, 154, 153, 152, 151, 150, 149, 148, 147, 146, 145, 144, 143, 142, 141, 140, 139, 138, 137, 136, 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, 123, 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, 92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26 ], "y": [ 3.261857104164224, 3.2924442543271573, 3.323448833140381, 3.3548783348777587, 3.386740420908391, 3.4190429241541356, 3.451793853685741, 3.485001399462502, 3.5186739372205764, 3.552820033515291, 3.587448450922975, 3.622568153408102, 3.658188311861743, 3.694318309817579, 3.730967749351991, 3.7681464571749967, 3.805864490919102, 3.8441321456334085, 3.882959960490656, 3.9223587257151658, 3.9623394897400175, 4.00291356660213, 4.044092543584286, 4.085888289113539, 4.128312960925835, 4.171379014507113, 4.215099211821589, 4.2594866303384045, 4.3503170747225095, 4.396787918706542, 4.443981640462225, 4.491913041671802, 4.540597300638628, 4.590049983759617, 4.64028705740528, 4.691324900223914, 4.74318031588728, 4.795870546295884, 4.849413285262823, 4.903826692696047, 4.9591294092997895, 5.015340571816935, 5.072479828835086, 5.130567357180176, 5.189623878922634, 5.249670679022285, 5.310729623639439, 5.37282317914095, 5.43597443183144, 5.500207108441328, 5.565545597404934, 5.632014970963454, 5.699641008129483, 5.768450218551463, 5.8384698673184605, 5.9097280007476565, 5.9822534731991235, 6.056075974964751, 6.131226061280545, 6.2077351825141305, 6.285635715581925, 6.364960996653366, 6.445745355202515, 6.5280241494706255, 6.611833803406602, 6.697211845155865, 6.784196947171939, 6.872828968029126, 6.963148996018839, 7.055199394616748, 7.149023849912676, 7.244667420100262, 7.3421765871288684, 7.44159931062588, 7.542985084203752, 7.646384994272573, 7.751851781485847, 7.859439904954569, 7.969205609372435, 8.081206995203383, 8.195504092091534, 8.312158935662993, 8.431235647899092, 8.552800521271356, 8.676922106839907, 8.803671306529273, 8.933121469808569, 9.065348495016956, 9.20043093559016, 9.338450111459762, 9.479490225913901, 9.623638488226332, 9.770985242380151, 9.921624102233437, 10.07565209349635, 10.233169802913151, 10.394281535068384, 10.559095477263863, 10.727723872942812, 10.900283204169149, 11.076894383704085, 11.257682957258883, 11.442779316541989, 11.63231892376129, 11.826442548287899, 12.025296516237086, 12.229032973775038, 12.437810165017396, 12.651792725447178, 12.871151991846409, 13.096066329807796, 13.326721479970558, 13.56331092420878, 13.80603627309171, 14.055107676034082, 14.310744255661469, 14.57317456803149, 14.842637090477591, 15.119380738978416, 15.403665417104296, 15.695762598753475, 15.995955947066129, 16.304541972095137, 16.62183073002057, 16.948146566921658, 17.283828910367237, 17.629233112355998, 17.984731347432685, 18.350713570129408, 18.72758853623402, 19.115784892774613, 19.515752342032847, 19.927962885364074, 20.35291215311275, 20.79112082747276, 21.243136165759513, 21.709533632239875, 22.190918647414946, 22.68792846447585, 23.20123418356457, 23.73154291547868, 24.27960010757284, 24.846192045843374, 25.43214854854906, 26.03834586823799, 26.665709820734804, 27.31521916151553, 27.987909231982073, 28.68487590047174, 29.407279825429082, 30.156351071062886, 30.933394109048855, 31.73979324346459, 32.57701850020817, 33.44663202671536, 34.35029505292023, 35.28977547017796, 36.266956091377715, 37.283843662820004, 38.34257870673823, 39.44544628274678, 40.59488776715874, 41.79351376122315, 43.04411825310269, 44.34969417410183, 45.713450507560836, 47.1388311293007, 48.62953558194675, 50.18954201235611, 51.82313253229195, 53.53492129809643, 55.32988564620707, 57.21340066887852, 59.19127766953454, 61.269807001117854, 63.455805865227454, 65.75667173664789, 68.18044217938785, 70.73586193933258, 73.43245833843478, 76.28062616009642, 79.29172340998583, 82.47817956704108, 85.85361821324285, 89.43299625700462, 93.23276235495489, 97.27103760437916, 101.5678221409204, 106.14523195485411, 111.02777106134772, 116.2426451595313, 121.82012413484091, 127.79396225338567, 134.20188673545871, 141.08616766673737, 148.4942850248225, 156.47971211400647, 165.10283910591036, 174.43206593123287, 184.5451007922871, 195.53050951035365, 207.48957237800582, 220.53851995058798, 234.811238361885, 250.46255976030486, 267.67228636289764, 286.65014023408094, 307.64188916561534, 330.9369775576139, 356.87809797631974, 385.87328565785566, 418.4113215528276, 455.08151461128534 ] } ], "layout": { "autosize": false, "bargroupgap": 0.3, "font": { "color": "black", "family": "Courier New, monospace", "size": 14 }, "height": 480, "hovermode": "x", "margin": { "b": 100, "l": 50, "pad": 4, "r": 50, "t": 100 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "scatter": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "Degree distribution. The avg. deg. are 2861.541, 933.149,\nAvg clust:0.872" }, "width": 720, "xaxis": { "tickangle": -45, "title": { "text": "Degree" }, "type": "log" }, "yaxis": { "title": { "text": "Num of words" }, "type": "log" } } }, "text/html": [ "
\n", " \n", " \n", "
\n", " \n", "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plotly.offline.init_notebook_mode(connected=True)\n", "plotly.offline.iplot(fig, filename='degdistnew')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here one can see the degree distribution for both of the networks, and it is clear that they do show a scaling property. For the modified network, a $\\gamma = 2.226$ also shows that this is a real-world network. The title also shows the average degree, which also decreased by renorming the network, which is not surprising, and tells us that the network is densely connected. \n", "\n", "Unfortunately, computing the $d_{max}$ even only for the giant component would take more energy resources than I have, which I skipped therefore. " ] }, { "cell_type": "code", "execution_count": 182, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T14:49:13.281288Z", "start_time": "2019-11-19T14:48:47.834105Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "r = nx.centrality.betweenness_centrality(G2, weight='weight')\n", "\n", "sorted_x = sorted(r.items(), key=operator.itemgetter(1), reverse=True)" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T15:04:31.927047Z", "start_time": "2019-11-19T15:04:31.670084Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "num_to_show = 30\n", "\n", "x = [i[0] if i[0] == j else i[0] + \" (\" + j + \")\" for i,j in zip(sorted_x[:num_to_show], node[:num_to_show])]\n", "y = [i[1] for i in sorted_x[:num_to_show]]\n", "\n", "fig10 = go.Figure([go.Bar(x = x,y = y, name = 'betweenness', )\n", " ], layout=layout )\n", "\n", "\n", "fig10.update_xaxes(title_text = \"Node name\", tickangle=315)\n", "fig10.update_yaxes(title_text = \"Betweenness\")\n", "#fig10.update_layout(xaxis_type=\"log\", yaxis_type=\"log\")\n", "fig10.update_layout(title_text=\"Edges w highest betweenness\", font=dict(\n", " family='Courier New, monospace',\n", " size=14,\n", " color='black'\n", " ))\n", "\n", "fig10.update_layout({'hovermode': 'x',})\n" ] }, { "cell_type": "code", "execution_count": 200, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T16:46:44.922279Z", "start_time": "2019-11-19T16:46:44.488859Z" }, "slideshow": { "slide_type": "subslide" } }, "outputs": [ { "data": { "text/html": [ " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.plotly.v1+json": { "config": { "linkText": "Export to plot.ly", "plotlyServerURL": "https://plot.ly", "showLink": false }, "data": [ { "name": "betweenness", "type": "bar", "x": [ "the", "to", "a", "i", "and", "of", "it", "in", "you", "for", "is", "that", "on", "be", "have (this)", "this (have)", "my (with)", "with (my)", "we", "but (not)", "not (are)", "are (but)", "was (at)", "at (was)", "so", "all (as)", "as (all)", "get (your)", "can (get)", "me" ], "y": [ 0.41866890917612753, 0.3390368414692356, 0.29626519819123986, 0.2711888260762572, 0.2610320181098136, 0.2157065466046208, 0.2070755588574412, 0.20008891663832432, 0.1842731614628166, 0.16525426966436302, 0.1506775885213314, 0.13104623355084305, 0.11847692396753813, 0.11015628447593091, 0.1034316272262872, 0.0982646925616323, 0.09526642876344371, 0.09094715795472227, 0.08880627421364824, 0.07924054794308322, 0.07864938274991609, 0.07722239639143426, 0.07479790051175335, 0.0688618821933494, 0.06802277090274199, 0.06421841926289698, 0.06415704149820713, 0.06115666538131763, 0.05969984714272515, 0.059456578094802634 ] } ], "layout": { "autosize": false, "bargroupgap": 0.3, "font": { "color": "black", "family": "Courier New, monospace", "size": 14 }, "height": 480, "hovermode": "x", "margin": { "b": 100, "l": 50, "pad": 4, "r": 50, "t": 100 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "scatter": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "Edges w highest betweenness" }, "width": 720, "xaxis": { "tickangle": -45, "title": { "text": "Node name" } }, "yaxis": { "title": { "text": "Betweenness" } } } }, "text/html": [ "
\n", " \n", " \n", "
\n", " \n", "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plotly.offline.init_notebook_mode(connected=True)\n", "plotly.offline.iplot(fig10, filename='betw')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This figure shows the 30 nodes with the highest betweenness. For those nodes, where there is another word in the parentheses the latter shows the word with the same rank in the frequency table. For example, on this figure on the 15th place \"have\" is present (it is the 15th node with the highest betweenness) but the \"this\" word was the 15th most frequent. Mostly there only small changes meaning that high betweenness correlates with high frequency also." ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "#
Communities
\n", "\n", "Furthermore, I also tried to find communities with different algorithms but unfortunately the nested stochastic block model ([nsbm](https://graph-tool.skewed.de/static/doc/demos/inference/inference.html)) not only killed the kernel every single time but nearly killed my laptop. Due to this small disruption, I decided to use a greedy modularity algorithm. \n", "\n", "Community detection with Greedy Modularity algorithm:\n", "\n", "$$\n", "{\\displaystyle Q={\\frac {1}{2m}}\\sum \\limits _{ij}{\\bigg [}A_{ij}-{\\frac {k_{i}k_{j}}{2m}}{\\bigg ]}\\delta (c_{i},c_{j}),}\n", "$$\n", "\n", "where \n", "\n", "- $A_{ij}$ edge weight between node $i,j$,\n", "- $k_{i}$ sum of weights of the edges of $i$,\n", "- $m$ normalization due to weights (sum of all weights),\n", "- $c_{i}$ and $c_{j}$ are the communities of node $i$ and $j$.\n", "\n", "Goal is to maximize the modularity." ] }, { "cell_type": "code", "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T15:29:24.197073Z", "start_time": "2019-11-19T15:04:38.392654Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "from networkx.algorithms.community import greedy_modularity_communities\n", "c = list(greedy_modularity_communities(g))" ] }, { "cell_type": "code", "execution_count": 209, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T17:03:38.124314Z", "start_time": "2019-11-19T17:03:38.118312Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "comms = sorted([len(i) for i in c], reverse=True) # degree sequence\n", "# print \"Degree sequence\", degree_sequence\n", "comCount = collections.Counter(comms)\n", "degc, cntc = zip(*comCount.items())" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T17:08:21.668426Z", "start_time": "2019-11-19T17:08:21.460130Z" }, "scrolled": true, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "fig10 = go.Figure([go.Bar(x = degc ,y = cntc, name = 'betweenness', )\n", " ], layout=layout )\n", "\n", "\n", "fig10.update_xaxes(title_text = \"Cardinality\", tickangle=315)\n", "fig10.update_yaxes(title_text = \"Num of comms\")\n", "fig10.update_layout(xaxis_type=\"log\", yaxis_type=\"log\")\n", "fig10.update_layout(title_text=\"Distributon of the cardinality of communities\", font=dict(\n", " family='Courier New, monospace',\n", " size=14,\n", " color='black'\n", " ))\n", "\n", "fig10.update_layout({'hovermode': 'x',})\n" ] }, { "cell_type": "code", "execution_count": 294, "metadata": { "ExecuteTime": { "end_time": "2019-11-20T00:03:56.984750Z", "start_time": "2019-11-20T00:03:56.681789Z" }, "slideshow": { "slide_type": "subslide" } }, "outputs": [ { "data": { "text/html": [ " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "application/vnd.plotly.v1+json": { "config": { "linkText": "Export to plot.ly", "plotlyServerURL": "https://plot.ly", "showLink": false }, "data": [ { "name": "betweenness", "type": "bar", "x": [ 4419, 2962, 2042, 1996, 1331, 930, 914, 559, 378, 297, 233, 164, 146, 139, 136, 121, 107, 106, 104, 97, 96, 95, 90, 88, 87, 85, 84, 83, 82, 79, 77, 76, 75, 74, 72, 71, 69, 68, 64, 63, 62, 61, 60, 58, 55, 53, 51, 50, 49, 48, 47, 43, 40, 39, 38, 36, 35, 33, 32, 30, 28, 25, 24, 21, 20, 18, 16, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 ], "y": [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, 2, 1, 1, 1, 3, 1, 5, 1, 1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 2, 3, 3, 2, 1, 1, 2, 2, 3, 5, 2, 3, 1, 4, 1, 1, 9, 6, 22, 40, 89, 199 ] } ], "layout": { "autosize": false, "bargroupgap": 0.3, "font": { "color": "black", "family": "Courier New, monospace", "size": 14 }, "height": 480, "hovermode": "x", "margin": { "b": 100, "l": 50, "pad": 4, "r": 50, "t": 100 }, "template": { "data": { "bar": [ { "error_x": { "color": "#2a3f5f" }, "error_y": { "color": "#2a3f5f" }, "marker": { "line": { "color": "#E5ECF6", "width": 0.5 } }, "type": "bar" } ], "barpolar": [ { "marker": { "line": { "color": "#E5ECF6", "width": 0.5 } }, "type": "barpolar" } ], "carpet": [ { "aaxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "baxis": { "endlinecolor": "#2a3f5f", "gridcolor": "white", "linecolor": "white", "minorgridcolor": "white", "startlinecolor": "#2a3f5f" }, "type": "carpet" } ], "choropleth": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "choropleth" } ], "contour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "contour" } ], "contourcarpet": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "contourcarpet" } ], "heatmap": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmap" } ], "heatmapgl": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "heatmapgl" } ], "histogram": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "histogram" } ], "histogram2d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2d" } ], "histogram2dcontour": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "histogram2dcontour" } ], "mesh3d": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "type": "mesh3d" } ], "parcoords": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "parcoords" } ], "scatter": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter" } ], "scatter3d": [ { "line": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatter3d" } ], "scattercarpet": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattercarpet" } ], "scattergeo": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergeo" } ], "scattergl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattergl" } ], "scattermapbox": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scattermapbox" } ], "scatterpolar": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolar" } ], "scatterpolargl": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterpolargl" } ], "scatterternary": [ { "marker": { "colorbar": { "outlinewidth": 0, "ticks": "" } }, "type": "scatterternary" } ], "surface": [ { "colorbar": { "outlinewidth": 0, "ticks": "" }, "colorscale": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "type": "surface" } ], "table": [ { "cells": { "fill": { "color": "#EBF0F8" }, "line": { "color": "white" } }, "header": { "fill": { "color": "#C8D4E3" }, "line": { "color": "white" } }, "type": "table" } ] }, "layout": { "annotationdefaults": { "arrowcolor": "#2a3f5f", "arrowhead": 0, "arrowwidth": 1 }, "colorscale": { "diverging": [ [ 0, "#8e0152" ], [ 0.1, "#c51b7d" ], [ 0.2, "#de77ae" ], [ 0.3, "#f1b6da" ], [ 0.4, "#fde0ef" ], [ 0.5, "#f7f7f7" ], [ 0.6, "#e6f5d0" ], [ 0.7, "#b8e186" ], [ 0.8, "#7fbc41" ], [ 0.9, "#4d9221" ], [ 1, "#276419" ] ], "sequential": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ], "sequentialminus": [ [ 0, "#0d0887" ], [ 0.1111111111111111, "#46039f" ], [ 0.2222222222222222, "#7201a8" ], [ 0.3333333333333333, "#9c179e" ], [ 0.4444444444444444, "#bd3786" ], [ 0.5555555555555556, "#d8576b" ], [ 0.6666666666666666, "#ed7953" ], [ 0.7777777777777778, "#fb9f3a" ], [ 0.8888888888888888, "#fdca26" ], [ 1, "#f0f921" ] ] }, "colorway": [ "#636efa", "#EF553B", "#00cc96", "#ab63fa", "#FFA15A", "#19d3f3", "#FF6692", "#B6E880", "#FF97FF", "#FECB52" ], "font": { "color": "#2a3f5f" }, "geo": { "bgcolor": "white", "lakecolor": "white", "landcolor": "#E5ECF6", "showlakes": true, "showland": true, "subunitcolor": "white" }, "hoverlabel": { "align": "left" }, "hovermode": "closest", "mapbox": { "style": "light" }, "paper_bgcolor": "white", "plot_bgcolor": "#E5ECF6", "polar": { "angularaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "radialaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "scene": { "xaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "yaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" }, "zaxis": { "backgroundcolor": "#E5ECF6", "gridcolor": "white", "gridwidth": 2, "linecolor": "white", "showbackground": true, "ticks": "", "zerolinecolor": "white" } }, "shapedefaults": { "line": { "color": "#2a3f5f" } }, "ternary": { "aaxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "baxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" }, "bgcolor": "#E5ECF6", "caxis": { "gridcolor": "white", "linecolor": "white", "ticks": "" } }, "title": { "x": 0.05 }, "xaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "zerolinecolor": "white", "zerolinewidth": 2 }, "yaxis": { "automargin": true, "gridcolor": "white", "linecolor": "white", "ticks": "", "zerolinecolor": "white", "zerolinewidth": 2 } } }, "title": { "text": "Distributon of the cardinality of communities" }, "width": 720, "xaxis": { "tickangle": -45, "title": { "text": "Cardinality" }, "type": "log" }, "yaxis": { "title": { "text": "Num of comms" }, "type": "log" } } }, "text/html": [ "
\n", " \n", " \n", "
\n", " \n", "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "plotly.offline.init_notebook_mode(connected=True)\n", "plotly.offline.iplot(fig10, filename='betw')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In this plot one can see the distribution of the cardinality of the communities found by the algorithm. What is hardly seen here is a community consisting of $\\sim 4400$ nodes at the rightmost side. We also can see that there are many node which could not be clustered." ] }, { "cell_type": "code", "execution_count": 224, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T17:28:20.541743Z", "start_time": "2019-11-19T17:28:20.534692Z" }, "slideshow": { "slide_type": "skip" } }, "outputs": [], "source": [ "ones_twos = []\n", "for i in c:\n", " rtz = len(list(i))\n", " if rtz <= 2 :\n", " ones_twos.append(list(i)[0])" ] }, { "cell_type": "code", "execution_count": 226, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T17:29:26.438702Z", "start_time": "2019-11-19T17:29:26.433366Z" }, "scrolled": false, "slideshow": { "slide_type": "subslide" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['xrmjoel', 'katecrosby92', 'littlevix', 'kaydm49', 'viners_uk', 'bigmondo77', 'pwsplash', 'okwu_id', 'officialj_ramm', 'ste51510874', 'biseysolucem', 'alanweir85', 'shotonmo', 'alexxisfalcon', 'отлично', 'iainm97', 'ספרד', 'racisminfootbal', 'jokerlaugh', 'jackhosk', 'bewareofspock', 'impeachtrump', 'malisetweet', 'sleepmastereu', 'honestlyyyy', 'mqasem', 'classicshirt', 'حبيبي', 'mariacaulfield', 'occasion', 'fcroyals10', 'yhg_partington', 'riotbadg', 'ritirati', 'paulgarvey4', 'haww', 'aliiigriiiiaaa', 'loool', 'darpross', 'aesfet', 'wingyipstor', 'calumlawson_27', 'verbaldiahrreoa', 'pemalu', 'balang', 'shirlvemb', 'ditchthetori', 'hhclubnit', 'goddess', 'lxuren2000', 'teambori', 'امين', 'infoalishba', 'edie_raffi', 'anfieldedit', 'amirulhafiiiiz', 'stewood', 'fancy_that123', '_sammarriott', 'gawg', 'hollyyybain', 'يانجد', 'epsteinsuicidecoverup', 'saints1890', 'teamliam', 'rfitzgibbon_', 'mrprowsemath', 'jayneybarn', 'leedsandyorkpft', 'ollieoswin', 'j_cartwrightn0t', 'jwphxtographi', 'dup_onlin', 'dubiinbus', '한복낙서', 'adamlatchford', 'pgarrittypaul', 'izzycridland', 'fackkkk', 'za13aimbot', 'damianbaker1', 'buzzziiiinnnnnnnnn', 'helss19', 'رايك', 'tvcritic', 'toolzbab', 'hebridesnew', 'bradley_safc', 'xgabrielphoenix', 'fairwarning101', 'everymindmatt', 'markyholtend', 'valery_violet', 'riksredguard', 'lanaswond', 'abelarana', 'tedxdoncast', 'thehoundmma', 'perrycourtpri', 'chynafemdom', 'priceless', 'nor_edu', 'zaraali2k19', 'rolake_ba', 'barbervill', 'hcsarah', 'thundercat8366', 'melreylaw', 'fanfuck', 'kevvief', 'southcoastblok', 'jwhitehurst1989', '_bradleybutch', 'safiyya_db', 'stephiearnett', 'astonishingtrev', 'enjoyinglif', 'ryantwm', 'jackratuno', 'anaglogsdaughtr', 'asechat', 'gecfrost', 'londonahp', 'hawkpadilla', 'goalz', 'dbeasleyharl', 'driverfarms1', 'احم', 'sundaygirl74', 'marky_boy1968', 'mdrrr', 'tvtonightau', 'anfellyy', 'wassup', 'theumilk99', 'scollanangela', 'vamplacey', 'savestpeterward', 'grumpnow', 'katie_cak', 'tdunne888', 'sho_yah', 'jackcaudwel', 'overthink', 'oscarcain', 'passthepod', 'pranksnpup', 'skinny_fatblok', 'tomcampbel', 'seanwleach', 'johnjhammond', 'renad_alshareef', 'yike', 'adrianofcind', 'nrstirzak', 'michaelroseny', 'dusk', 'suzukicarsuk', 'moridura', 'destuhnym', 'adilabdalmahdi', 'readliverpoolfc', 'vgagymnast', 'heronbank_cat', 'lynnecampbell5', 'messyjessy85', 'revmaryhaw', 'bighairygrowl', 'doong', 'ambrob64', 'loooooooooool', 'momonobyy', 'tessabunney', 'sgtstockport', 'ra62156', 'wimbart', 'suzanne02190370', 'maashaallah', 'cathygremin', '07818114120', 'catalansfory', 'bathynotcathi', 'thepoliticalbe2', 'stevepith', 'kineticyouthltd', 'patchmcscratchi', 'fucker', 'sigh', 'wahaaga', 'nononononknon', 'vasazz', 'nl_vossi', 'nayimfromthehalfwaylin', 'therealsexpectr', 'leonagraham', 'こっちのおっさん達本当笑い声大きくて草', 'matttreaci', 'krystal_888', 'chrismouldink', 'pineappleslut', 'rgrodger', 'nottmbantam', 'itsjusdyl', 'ryanreynold', 'daus_sss', 'ilovem', 'thisiswhatticklesm', 'richydisney', 'joannablythman', 'finalfantasyxiv', 'sadietrent_92', 'elainedyson1', 'nani', 'theanxiousteac2', 'awesomofpl', 'hertscricket', 'collaredboi', 'drvbate', 'latemotivcero', 'justinemiller_', 'russiareport', 'mrgregblackman', 'kate_sir', 'katelawl', 'tiinawild', 'kulganofcryde', 'percochewin', 'oswtcatg', 'bigracek', 'k1ngfii', 'eeeek', 'tiredddd', 'allot50cornwal', 'sades023', 'ksjsksjs', 'broooooo', 'helpdip', 'jakeyl0l', 'dog_feel', 'fiyah', 'mrsclart', 'ohsinnerman', 'annhardey', 'ahmadjasem_', 'sirstevotimothi', 'silvioaquinog', 'saywhat', 'joolsd', 'vibin', 'deersh', 'سالخير', 'georgiarice_x', 'paulminor4r', 'akkitwt', 'heminguay_', 'alexcraftlfc', 'drinkinthemovi', 'simplelampoon', 'nuriyegülmenserbestbırakılsın', 'xxp123', 'notcapnamerica', 'harvkudo', 'openbritainshrp', 'bigspenderr1690', 'surbiton2012', 'bemoremariah', 'markpit35296344', 'itslibdemtim', 'deirdre_flynn', 'daffodilnebula', 'rhylhighp', 'dailymirror', 'pringster78', 'james_orrey', 'tescokingstonmk', 'marcrebillet', 'hantshighway', 'raahh', 'yayyy', 'aestheticsgroup', 'peteregan6', 'thesilentgirl6', 'tenorbenjohnson', 'bringiton28', 'being_ajay_', 'beaumontsduff', 'listerrd', 'followstevi']\n" ] } ], "source": [ "print(ones_twos)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Above one can see those nodes which were not clustered at all or were clustered in pairs. Despite some interesting nodes (\"epsteinsuicidecoverup\" and \"こっちのおっさん達本当笑い声大きくて草\" -- meaning \"This uncle is really laughing loud and grass\") there were a few normal words also (\"occasion\", \"overthink\" or \"priceless\") most of the words are meaningless or usernames/hashtags." ] }, { "cell_type": "code", "execution_count": 230, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T17:43:20.283646Z", "start_time": "2019-11-19T17:43:20.269999Z" }, "slideshow": { "slide_type": "subslide" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "21 ['द', 'आजक', 'स', 'क', 'ल']\n", "20 ['brenmac01', 'themuddlersclub', 'fuckri', 'so', 'westindi']\n", "18 ['b_isto__ar', 'indianregista', 'nycfc', 'hollybeang', 'towel']\n", "18 ['28s', 'suemurray14', 'snatch', 'thekophq', 'mall']\n", "16 ['ryan_kenny1', 'clivegreenwd', 'jasbar', 'cihfutur', 'eviecopland']\n", "16 ['pcso3580ruth', 'alicel', 'emilylinka', 'have', 'shirleysetia']\n", "14 ['эплу', 'хороший', 'очень', 'выпуск', 'iamvasabi']\n", "14 ['ଆଙ', 'ସ', 'ନ', 'ପ', 'ଳନ']\n", "14 ['samozřejmě', 'bambilionnásobně', 'platit', 'croplus', 'podl']\n", "13 ['debbiezimmer54', 'jilliemari', 'newworlddd555', 'djdebster', 'suzannelepage1']\n", "13 ['maureenb2b', 'burgessbev', 'joel_b2beditor', 'nailedit', 'elise_amil']\n", "13 ['eileenbwyatt', '7th_layer', 'lovemypir', 'c_licar', 'yulvazquez']\n", "13 ['boy1010tori', 'toxicambassador', 'sarzboogi', 'we', 'onejasonkayley']\n", "13 ['brockleymax', 'jimiadefirany', 'catcornucopia', 'brockleybreweri', 'thebrockleybuzz']\n", "12 ['misssdoherti', 'div', 'bravotv', 'scott_riley', 'button']\n", "12 ['มต', 'ดเข', 'ท', 'ยย', 'วก']\n", "11 ['rosefarmpreserv', 'godminsterfarm', 'pdevonian', 'jacobscreek', 'oliveset']\n", "11 ['brexiteerjacob', 'pole', 'stepto', 'ageofblhyt', 'deal']\n", "11 ['rabbi_matondo', 'kinnock', 'bentaleb', 'be', 'greedi']\n", "10 ['allezamani', 'napaul_', 'queen_hon', 'iamdahmmi', 'toluwanikri']\n", "9 ['私がチケットを手配したんですか', 'どなたか経由か言えないですかね', 'ツイッターだと', 'ところで', '気になります']\n", "9 ['millbrookafc', 'hafc125', 'ilfcombeafc', 'swsportsnew', 'devon_fa']\n", "9 ['they', 'rockcak', 'hughbarnett6', 'fir', 'rachamuffin']\n", "9 ['untuk', 'aimanhadiii', 'tidak', 'amirabdlatif', 'u2']\n", "8 ['itsbeenadayforcompoundword', 'jamlondon', 'jonnyburch', 'clearleft', 'intercomdesign']\n", "7 ['pbuckley05', 'for', 'sophdoy', 'tyler_campbeii', 'profootballtalk']\n", "6 ['الغلط', 'عليك', 'احـب', 'بالغلط', 'اسفه']\n", "6 ['つまりサブスタンスこそ肝心', '英語はあくまでツール', '初めて英語は生きてくる', 'そのツールで何に取り組むか', '英語だけ話せてバカ騒ぎしても気持ちが良いだけで何も産まない']\n", "6 ['هالشوف', 'يا', 'ويا', 'سعد', 'هالرجعه']\n", "6 ['نواياكم', 'hamza_tekin2023', 'وينصر', 'ربنا', 'الحسنة']\n", "6 ['bowmancourtney_', 'sixthemus', 'perryobre', 'westendcov', 'daniellest']\n", "6 ['ministerktr', 'ani_digit', 'zcwz_ghmc', 'arvindkumar_ia', 'commissionrghmc']\n", "6 ['passagechar', 'pathwayuk', 'itsgroundswel', 'lnnmhomeless', 'danabeal']\n", "6 ['lacnetworkuk', 'westheathlac', 'maffpott', 'catdre', 'bemorepir']\n", "6 ['kaan', 'wkwkwkwk', 'udaahh', 'silviahani_tj', 'eike']\n", "5 ['learningfromphilosophi', 'dumbarton_acad', 'strathfamili', 'rmps', 'rme']\n", "5 ['exeterchief', 'southwestcomm', 'moon_p1g', 'realaxelphim', 'backingben']\n", "5 ['hayleylev', 'hannahport2', 'northpowerwomen', 'greatersport', 'gmmove']\n", "5 ['kazimiergarden', 'thekazimi', 'spqrband', 'harvest_sun', 'smmmgmt']\n", "5 ['mattbeasty24', 'chrispiper4', 'bleacherreport', 'p1p3s', 'jcmack03']\n", "5 ['snoffl', 'garethjennings3', 'ldpierre1', 'pepere_06', 'samhepworth14']\n" ] } ], "source": [ "for i in c:\n", " rtz = len(list(i))\n", " if 5 <= rtz <=21 :\n", " print(rtz, list(i)[:5])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Communties above are listed their cardinality was between 5 and 21 and 5 of their members. Here there are interesting clusters: for example, not only the cluster with 21 nodes is probably the cluster of the hindi words but all the communities with a cardinality with 14 are distinct languanges (russian, hindi maybe(?) and czech, respectively). One can also find japanese characters (which are whole sentences by the way) and many arabic communities. An arabic group of six is about something bad, since the meanings of the words listed are the following: ['Mistake', 'You', 'Love', 'Mistake', 'Sorry']. Such a cheap drama. " ] }, { "cell_type": "code", "execution_count": 233, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T17:45:36.629544Z", "start_time": "2019-11-19T17:45:36.614219Z" }, "slideshow": { "slide_type": "subslide" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "4419 ['beginn', 'improv', 'temperatur', 'loncon19', 'xcase_', 'russtnuttz', 'davidhall75', 'wildearth', 'bbcnickrobinson', 'mike_lions_71']\n", "2962 ['constitu', 'regain', 'counter', 'shock', 'goodnewshackney', 'popsicle_____', 'penyrheolgerrig', 'lack', 'unlikeli', 'uklabour']\n", "2042 ['habit', 'gerad', 'slept', 'pusscat', 'ellarinajohn', 'wish', 'waveoflight2019', 'safeti', 'yoga', 'fat']\n", "1996 ['rasa', 'pásalo', 'mahez', 'marialal', 'illustriousg40', 'botham_sam', 'gedl', 'tywydd', 'tien', 'farklı']\n", "1331 ['quid', 'dvd', 'fu', 'profil', 'gibsidehotel', 'wildathearthq', 'th3gasman', 'merseaisland', 'lx', 'waywardhu']\n", "930 ['حرفيا', 'monetari', 'بعد', 'ربيع', 'يوم', 'سادگی', 'richardlatto', 'womeninart', 'المباركة', 'قسومنا']\n", "914 ['feather', 'angelahilleri', 'darzi', 'mindless', 'finest', 'twofussyblok', 'drinkwat', 'vicky_mcclur', 'tegen', '070906']\n", "559 ['bhamcitycouncil', 'sarashamma', 'referendumnin', 'royalfamili', 'gadaviman', 'gabe', 'chelseafran', 'nickybenedetti', 'audibleuk', 'vch_shropshir']\n", "378 ['lubnan', 'cleveley', 'bill', 'dancludlow', 'sore', 'wouldent', 'eleaonr', '104k', 'ptal', 'jamesaflanagan1']\n", "297 ['9b051e07df75489', 'cee', 'timolarch', 'limegrovecar', 'hollywood', 'davidlammi', 'other', 'gmail', 'cooi_daddi', 'sherrymanning85']\n" ] } ], "source": [ "for i in c[:10]:\n", " rtz = len(list(i))\n", " print(rtz, list(i)[:10])" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here you can see the 10 largest communitites with 10 members of that. Some interesting things:\n", "\n", "- the second largest group may be based on political tweets (according to these words),\n", "- the third probably is about fitness ('habit', 'wish', 'yoga', 'fat'),\n", "- the group 930 is probably the largest non-english group, which is listed totally below." ] }, { "cell_type": "code", "execution_count": 235, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T17:49:45.341137Z", "start_time": "2019-11-19T17:49:45.329173Z" }, "scrolled": false, "slideshow": { "slide_type": "subslide" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['حرفيا', 'monetari', 'بعد', 'ربيع', 'يوم', 'سادگی', 'richardlatto', 'womeninart', 'المباركة', 'قسومنا', 'ومراته', 'الأميرات', 'spay', 'الخاطفة', 'انا', 'الله', 'آکھے', 'بمشي', 'ثبات', 'حرام', 'georgia', 'favourit', 'بیغیرت', 'cleansman', 'الأساسية', 'قالتلي', 'الساعه', 'ایتھے', 'ph', 'غير', 'فخاري', 'فالدنيا', 'الرز', 'announc', 'joalsubai', 'طبية', 'الكوارث', 'العصر', 'بس', 'الشيخ', 'بنت', 'يفيدها', 'خبراء', 'الرياض', 'بالضرورة', 'تمنى', 'كأس', 'حساب', 'وسيوارى', 'العزاء', 'الانستقرام', 'كتاب', 'كلمة', 'مع', 'مررره', 'غيمة', 'زاد', 'karimahamed9', 'اريد', 'wigan', 'alfaskara7', 'travel', 'بندہ', 'انت', 'خربوك', 'احب', 'ونعوضها', 'لحضور', 'سوق', 'صار', 'لاحول', 'نجيب', 'ف', 'ترهبني', 'منزل', 'شيخة', 'complimentari', 'نحمد', 'م', 'مازرت', 'حاجة', 'اسهل', 'جعلنى', 'الغدا', 'classicbritcom', 'أجامل', 'الفردوس', 'اضبطها', 'الصغيرة', 'دار', 'الخرينج', '٧', 'المتعبة', 'roaa_alsabban', 'ghumman', 'ليه', 'عمرى', 'والديكتاتورية', 'والشيخة', 'آگ', 'أيامك', 'ق', 'المقربه', 'ظلمه', 'اطلع', 'ويتناقشه', 'ومصطلحات', 'کھوتی', 'كله', 'دمتما', 'يتعايش', 'ا', 'الرفيق', 'باذن', 'رايحة', 'واحد', 'jurgen', 'وإن', 'ابو', 'hadizonouzi', 'وهالزمن', 'المعدي', 'واقعا', 'ها', 'قبل', 'كامل', 'فيه', 'عزیز', 'مبالغ', 'رحم', 'الخريف', 'يلقى', 'ومنتفضين', 'إلا', 'بالساعات', 'الفاتحة', 'ويوفقنا', 'انها', 'انتقل', 'الذي', 'د', 'بالدنيا', 'فرحا', 'من', 'باللي', 'اس', 'تركب', 'destin', 'فضله', 'أو', 'وتفاؤلا', 'كانت', 'alirabiei_ir', 'منطقه', 'كورية', 'پھر', 'صديقة', 'سياسة', 'الويوو', 'thelifeofcoko', 'مختوم', 'أهواه', '٢٠٠', 'عبدالله', 'فيفى', 'girlfriend', 'نسى', 'walkden', 'عن', 'هذه', 'قتل', 'مصداقيتها', 'halquraan14', 'بالسياسة', 'عون', 'عمق', 'leicscipd', 'الخطير', 'اوقف', 'ما', 'مما', 'rush', 'نشوفكم', 'الجميل', 'خلينا', 'رياض', 'هذا', 'الف_رحمه_ونور', 'بالستر', 'كنا', 'كل', 'الشخص', 'dakota', 'لمن', 'حكي', 'قطعة', 'تسمح', 'يابيونه', 'کر', 'احسن', 'دعواه', 'کھان', 'العقلية', 'قلوبهم', 'والوفاء', 'jfk_man', 'او', 'صديقتها', 'مش', 'وقت', 'سواك', 'وكانوا', 'فيا', 'صباحا', 'مبارك', 'له', 'مضى', 'موثر', 'الكورية', 'أرجو', 'الهادي', 'يشعل', 'ن', 'وأصلح', 'جيت', 'تلتقي', 'اعتمادها', 'مثالية', 'اكتر', 'ناس', 'تظلم', 'rouhani_ir', 'اني', 'عايشين', 'مو', 'مصدرها', 'الثورة', 'بمين', 'rezgo9', 'ر', 'والفساد', 'الان', 'اضطراباتنا', 'وجهاتنا', 'ظهر', 'أنت', 'اكثر', 'بمناسبة', 'منها', 'نه', 'قولي', 'لبنان_يتنفض', 'كثير', 'ليا', 'العطر', 'قدوم', 'مقبرة', 'حديق', 'خبر', 'مصرف', 'در', '١١', 'الشهرة', 'بالحسبان', 'تسال', 'شفا', 'پر', 'mysmuttylif', 'المفروض', 'مشكلتى', 'lancashir', 'نفسيه', 'العالمي', 'التي', 'وعلشان', 'التأجيل', 'أكثر', 'السالفة', 'ثقة', 'وأخرجني', 'cipd', 'وامان', 'الخانقة', 'خبرية', 'الرجال', 'اتعجب', 'تمت', 'aldresehadiy', 'tantanman_46', 'حدث', 'stopmisus', 'ي', 'محلللك', 'جدى', 'linajululian', 'اور', 'تتكلمون', 'السياسة', 'اتغدا', 'المؤجلة', 'قوى', 'طا', 'تخليك', 'هل', 'liesssssss', 'unitedinfocus', 'الجنة', 'نتشارك', 'بالخير', 'منك', 'مصاحبه', 'ومننشرها', 'باقات', 'الشهداء', 'تو', 'أصدق', 'دھرنے', 'يقول', 'أصعب', 'وأخواته', 'كان', 'أشووفه', 'حسبنا', 'لبنان', 'تھے', 'الجديدة', 'الزحمة', 'وسياسته', 'یوتھئیو', 'اجيب', 'وتقريبا', 'جيران', 'عنوان', 'نشرت', 'کے', 'وبالغصب', 'me3j', 'لندن', 'لو', 'تعالى', 'يجعل', 'الكلاس', 'كلها', 'مجاديفه', 'bee', 'غلاك', 'ناسب', 'ينحل', 'القلب', 'عرفتى', 'ھموطنوں', 'rynivv', 'عنى', 'بفرقتين', 'الخيال', 'نفسي', 'نصر', 'رني', 'السلطة', 'لذلك', 'النية', 'a_rrz', 'الناس', 'لغة', 'حال', 'قلبك', 'مفوض', '٩', 'شكر', 'النقدية', 'قصص', 'manchest', 'ماكسبنا', 'سيزون', 'سلامة', 'ان', 'كنت', 'mnvll5', 'فارس', 'ليس', 'ولكل', 'longhair', 'المالية', 'يستطيع', 'zad_15', 'تويتر', 'الا', 'نشئ', 'إني', 'شاور', 'اوصلك', 'بمدينة', 'وشو', 'مصغ', 'كدرت', 'الثاني', 'كبيرة', 'بداية', 'وضعي', 'طرفة', 'نفس', 'فطری', 'عمي', 'اخت', 'بود', 'کو', 'حياة', 'm_oman00', 'وهذا', 'دیجیئے', 'منع', 'دياركم', 'رہے', 'يعبر', 'وعن', 'alsammak85', 'الموافق', 'مين', 'league10', 'وآل', 'هنعوضها', 'و', 'كيف', 'ابتسم', 'کہ', 'سعادة', 'فيما', 'أنا', 'ہے', 'لأندية', 'ودام', 'الأنتيم', '855', 'محد', 'جانب', 'الأميرة', 'موسم', 'firewithin', 'والود', 'جیسے', 'يسمع', 'الن', 'bno0oo', 'الكلام', 'بانيه', 'این', 'فينا', 'ماذا', 'جثمانه', 'يرحمه', 'رحمتك', 'العالم', 'بھی', 'مركزين', 'crossedthelin', 'استفسار', 'ألف', 'سليمان_بن_حسين', 'قرأ', 'حالي', 'إليه', 'فى', '١٠', 'ghislaine_howard', 'أقول', 'جريح', 'المنيو', '١', 'والله', 'بكره', 'silwoodsocialseminar', 'يعانق', 'غدا', 'ماحقق', 'حق', 'يقدر', 'وصلتنا', 'اللي', 'تیرے', 'seemegraja74', 'عطر', 'مصرالجديدة', 'تعالی', 'وعهدي', 'زعزع', 'کردار', 'تهد', 'الاشياء', 'omar_alomair', 'سررررررر', 'گئی', 'ثالث', 'خالة', 'يعني', 'بالله', 'في', 'محمد', 'بنخاف', 'حدودك', 'وان', 'مصر', 'ibrahimrrz', '07445', 'نجاة', 'northenrailf', 'جانتی', 'وحسن', 'ردي', 'ومنشرها', 'مساعد', 'أمورنا', 'sneak', 'اربع', 'يفرق', 'زمان', 'للعبة', 'where', 'الشمولية', 'businesskfu', 'افتقد', 'وطيبا', 'هي', '311', 'تتشهد', 'عشان', 'ہوتی', 'lolwootbox', 'تشوفو', 'mackiemayor', 'لغيره', 'ofteneatingchocol', 'stephani', 'لولو', 'حسينية', 'لما', 'واحب', 'الأحلام', 'أحسن', 'يسألني', 'fiscal', 'هوشمندانه', 'اقتصادي', 'حبيبته', 'tehran422', 'لترسم', 'کرے', 'jordan', 'جميل', 'بريك', 'ستأتيك', 'قباني', 'ذلك', 'manc', 'بقا', 'فحسب', 'قتلهم', 'ادخل', 'يجابل', 'مصطلحاتنا', 'النظم', 'القمررررر', 'صلاح', 'کامل', 'hepplestonefineart', 'اطالع', 'نیست', 'أعطاه', 'خواهد', 'حبيتهم', 'grey', 'راض', 'seiz', 'الم', 'busineessckfu', 'السفر', 'الذكر', 'نموذج', 'الفورمولا', 'وبصراحه', 'أجبر', 'جنبي', 'ضعف', 'عطرا', 'أن', 'بصراحه', 'sept', 'بأكره', 'ياأجمل', 'فلا', 'العطلات', 'كلنا', 'الصامل', 'قررت', '١٢٠٠', 'جاء', 'درجات', 'معروف', 'الصلاة', 'تبادل', 'الدنيا', 'الأردني', 'أقذر', 'المجامل', 'تعرف', 'أبن', 'لي', 'حيث', 'عونك', 'لهما', 'غروب', 'الت', 'وجدتى', 'قوة', 'يسهل', 'belong', 'للعام', 'لعبي', 'petergraystock', 'ظرة', 'watt', 'تكون', 'جاءه', 'وأنا', 'cipdace19', 'أحيان', 'ثانيه', 'اللقاء', 'للأسف', 'اقتصاد', 'كسر', 'جہنم', 'يالله', 'منى', 'نقد', 'بچے', 'وشوووو', 'تسبقها', 'الخاص', 'والدى', 'تكن', 'أعلنا', 'بسباق', 'sourdough', 'هو', 'وابتسامك', 'الجوية', 'علاقتها', 'اششراء', 'ونحو', 'بغاها', 'میمو', 'وإنما', 'السناب', 'alwayslearn', 'واصحابه', 'الوافين', 'الملك', 'r_creedbalboa76', 'تبريرات', 'خزينة', 'القائمين', 'وكل', 'بشاير', 'نواياها', 'basmah_omar', 'أهداف', 'مرور', 'أ', 'المشكلة', 'صالح_الدلال', 'المرء', 'بــ', 'مصدر', 'كلن_يعني_كلن', 'ہن', 'نظيف', 'صفحة', 'الخاصة', 'اللهم', 'تواضعا', 'lolarabia', 'فرح', 'غیر', 'pathogen', 'اسمع', 'بکاو', 'النارا', 'سنوات', 'شخص', 'مانشستر', 'ه', 'مبروك', 'تابعوني', 'نفتح', 'salford', 'ودلوقتى', 'بمكة', 'يعو', 'يناديني', 'بهذه', 'صح', 'ياأميرة', 'قلب', 'الجميلة', 'whatawast', 'گل', 'للمعرض', 'الطايرة', 'عطا', 'هيلعب', 'شيء', 'behalf', 'اننا', 'ومش', 'الاوادم', '_jimmydx', 'النشمي', 'الموضوع', 'نحتاج', 'ماخذين', 'إبعادها', 'لاتعقدهة', 'اول', 'ومكالمات', 'وجدى', 'بتتعمل', 'بصوت', 'كانوا', 'rdmgough', 'شو', 'emanshaband', 'دقيقة', 'وهل', 'ياربي', 'ودامت', 'النادي', 'وعنده', 'احد', 'نعمه', 'يفشل', 'تصویر', 'اشراء', 'نیا', 'به', 'تتوقع', 'راجعون', 'إلى', 'القادم', 'عبد', 'اشوفكم', 'المحيط', 'لنهرب', 'مناسبين', 'انجليزية', 'يخيب', 'لگائی', 'اهو', 'البيت', 'سپورٹ', 'عندما', 'كسبنا', 'طموحاته', 'ibuttar', 'للبقاء', 'formula', 'عمري', 'ولا', 'خبير', 'جميع', 'لا', 'عين', 'جدا', 'الاربعاء', 'الأمور', 'يلي', 'جمالك', 'زيارات', 'حرکت', 'خيراته', 'دام', 'lulufalmulhim', 'المتظاهرين', 'عامرة', 'فرماۓ', 'لم', 'كده', 'بعض', 'کی', 'تيانا', 'الدوام', 'اللہ', 'بعضهم', 'عني', 'منين', 'نزار', 'شهيد', 'الخير', 'يكسر', 'القلوب', 'حمد', 'لعبة', 'بأن', 'تحقيقات', 'هذة', 'سودمند', '٥', 'الرشيدي', 'باللكاعة', 'اطوف', 'symbol', 'اليوم', 'اختبار', 'خسرنا', 'الوقت', 'بتواجدي', 'اپنے', 'جميعا', 'ساعه', 'انسانی', 'البشر', 'بالعكس', 'الvoic', 'صبحان', 'اذا', 'علشان', 'على', 'بتدخل', 'كاراباو', 'تتدف', 'إن', 'ولی', 'الطبية', 'جواز_العصمة_بيد_المرأة', 'اي', 'سنين', 'مروه', 'ليفربول', 'انه', 'لن', 'ضو', 'وأنت', 'شارع٥٠٦', 'alrayah', 'مظبوطة', 'منسية', 'مشكله', 'معه', 'حفظ', 'ظنك', 'بهامة', 'قديم', 'أدانيه', 'منسدقها', 'الروح', 'المساء', 'وقصص', 'يادبلن', 'المخلوع', 'البطولتين', 'وزاده', 'افلامهم', 'قاعده', 'صاحب', 'هنا', 'thefirewithin', 'وعزوتي', 'لينا', 'ترة', 'حتى', 'کیاے', 'چ', 'روحه', 'cheaper', 'منطقة', 'كلمتان', 'إسمها', 'منا', 'رحمة', 'sayyed3li', 'الخوه', 'لمشاركتنا', 'ماخسرنا', 'ياااارب', '1sheryfa', 'ماعرفت', 'لحربنا', 'سورة', 'بالتوفيق', 'تملا', 'قلبين', 'وفرحة', 'two', 'وحضورك', 'إليكم', 'إله', 'عائشة', 'اخر', 'microchip', 'عائلة', 'alrayahuk_i', 'تجربتها', 'الهجر', 'وحشتيني', 'ديز', 'هم', 'غضبانين', 'asmi_malik_', 'يمكن', 'bluebadg', 'يسعنا', 'حبيبتي', 'وربي', 'التغطية', 'وانا', 'تكلني', 'aishaahmedjug', 'المقتطفات', 'سعيد', 'peek', 'pizza', 'كيوت', 'شاء', 'الكوريين', 'بيخافوا', 'تدري', 'مقابلة', 'شکل', 'آمین', 'فعله', 'شأني']\n" ] } ], "source": [ "print(list(c[5]))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Furthermore, I looked for Hungarian words. Based on [Wiktionary](https://en.wiktionary.org/wiki/Wiktionary:Frequency_lists/Hungarian_frequency_list_1-10000), in a code cell below, one can see the 50 most frequent words." ] }, { "cell_type": "code", "execution_count": 261, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T18:29:20.737910Z", "start_time": "2019-11-19T18:29:20.728645Z" }, "slideshow": { "slide_type": "subslide" } }, "outputs": [], "source": [ "szavak = [\"meg\", \"vagy\", \"van\", \"vagyok\", \"vannak\", \"vagytok\", \"volt\", \"már\", \"kell\", \n", " \"még\", \"és\", \"mint\", \"azt\", \"az\", \"akkor\", \"sem\", \"lehet\", \"mert\", \"minden\", \"olyan\",\n", " \"szerint\", \"pedig\", \"ezt\", \"ez\", \"így\", \"után\", \"úgy\", \"nagy\", \"fel\", \"majd\", \"két\", \n", " \"nem\", \"nagyon\", \"aki\", \"akik\", \"akit\", \"kit\", \"kik\", \"most\", \"több\", \"lesz\", \"itt\",\n", " \"magyar\", \"ami\", \"amik\", \"amit\", \"mit\", \"első\", \"között\", \"amely\", \"hanem\", \"nincs\",\n", " \"más\", \"illetve\", \"alatt\", \"egyik\", \"volna\", \"arra\", \"kft\", \"ilyen\", \"azonban\"] #deleted \"a\"" ] }, { "cell_type": "code", "execution_count": 82, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T12:57:04.300175Z", "start_time": "2019-11-19T12:57:04.271256Z" }, "scrolled": false, "slideshow": { "slide_type": "subslide" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "van van\n", "[('van', 'and'), ('van', 'i'), ('van', 'of'), ('van', 'is'), ('van', 'the'), ('van', 'me'), ('van', 'my')]\n", "\n", "mint mint\n", "[('mint', 'by'), ('mint', 'last'), ('mint', 'follow'), ('mint', 'it'), ('mint', 'this'), ('mint', 'the'), ('mint', 'absolut')]\n", "\n", "az az\n", "[('az', 'is'), ('az', 'via'), ('az', 'bekliyoruz'), ('az', 'sunayakin'), ('az', 'ağabey'), ('az', 'kaldı'), ('az', '19')]\n", "\n", "sem sem\n", "[('sem', 'do'), ('sem', 'a'), ('sem', 'como'), ('sem', 'de'), ('sem', 'se'), ('sem', 'o'), ('sem', 'que')]\n", "\n", "ez ez\n", "[('ez', 'is'), ('ez', 'via'), ('ez', 'az'), ('ez', 'te'), ('ez', 'nagyon'), ('ez', 'megérintett'), ('ez', 'ügi')]\n", "\n", "fel fel\n", "[('fel', 'i'), ('fel', 'un'), ('fel', 'y'), ('fel', 'n'), ('fel', 'w'), ('fel', 'r'), ('fel', 'yn')]\n", "\n", "nagyon nagyon\n", "[('nagyon', 'is'), ('nagyon', 'via'), ('nagyon', 'az'), ('nagyon', 'te'), ('nagyon', 'megérintett'), ('nagyon', 'ez'), ('nagyon', 'ügi')]\n", "\n", "aki aki\n", "[('aki', 'by'), ('aki', 'and'), ('aki', 'to'), ('aki', 'save'), ('aki', 'up'), ('aki', 'work'), ('aki', 'of')]\n", "\n", "kit kit\n", "[('kit', 'good'), ('kit', 'and'), ('kit', 'just'), ('kit', 'to'), ('kit', 'over'), ('kit', 'bar'), ('kit', 'i')]\n", "\n", "most most\n", "[('most', 'good'), ('most', 'chanc'), ('most', 'by'), ('most', 'last'), ('most', 'and'), ('most', 'now'), ('most', 'just')]\n", "\n", "ami ami\n", "[('ami', 'good'), ('ami', 'and'), ('ami', 'to'), ('ami', 'your'), ('ami', 'you'), ('ami', 'have'), ('ami', 'a')]\n", "\n", "más más\n", "[('más', 'me'), ('más', 'a'), ('más', 'london'), ('más', 'porqu'), ('más', 'como'), ('más', 'un'), ('más', 'de')]\n", "\n" ] } ], "source": [ "not_in = []\n", "for szó in szavak:\n", " stemd = snow.stem(szó)\n", " if g.has_node(stemd):\n", " print(szó, stemd)\n", " print(list(G2.edges(stemd))[:7])\n", " print()\n", " else:\n", " not_in.append(stemd)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Above are those \"Hungarian\" words which were present in the network. The listing is the following; in the first line one can see the pure word and the stemmed one (which appeared to be the same for all) and below the 7 of its connections. Unfortunately many Hungarian words have an English meaning, too (\"van\", \"mint\", \"kit\", \"most\"). There are two words which have either Spanish and/or Portuguese links (\"sem\", \"más\") and one with Turkish connections (\"az\"). However, it did find some Hungarian connections for \"ez\" and \"nagyon\". Maybe, do these words make up a whole cluster? Let us check for the cardinality of their communities." ] }, { "cell_type": "code", "execution_count": 80, "metadata": { "ExecuteTime": { "end_time": "2019-11-19T12:46:29.017626Z", "start_time": "2019-11-19T12:46:28.882578Z" }, "scrolled": false, "slideshow": { "slide_type": "subslide" } }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "11 mint 4441\n", "13 az 4441\n", "15 sem 4441\n", "23 ez 4441\n", "28 fel 4441\n", "32 nagyon 4441\n", "36 kit 4441\n", "52 más 4441\n", "2 van 2874\n", "33 aki 2874\n", "38 most 657\n", "43 ami 139\n" ] } ], "source": [ "for i in sorted(c):\n", " for cou, szó in enumerate(szavak):\n", " stemd = snow.stem(szó)\n", " if stemd in i:\n", " print(cou, stemd, len(i))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The listing here means the following: (rank in frequency, word, cardinality of its cluster). Unfortunately, the words which had Hungarian link appear to be in the largest \"quite meaningless\" group. Therefore we can say that the algorithm did not find a Hungarian cluster. " ] }, { "cell_type": "markdown", "metadata": { "slideshow": { "slide_type": "slide" } }, "source": [ "## Conclusions\n", "\n", "\n", "During this project I was not only able to utilize all the learnt abilities from the dataexp course but also got results which are in accordance with the literature. Gathering the tweets and preparing the data might have been the most difficult part of all the work, yet, measuring the properties of the network was undoubtedly the most time-consuming task. Thus, there are many improvements, including for example thresholding for number of occurrences or filtering for those tweets which were reposted or the user was disturbingly active posting. Furthermore, other stemmers probably would have stemmed the (foreign) words in other which would then create a slightly different network. Finally, if I had had the resources to conduct a measurement involving more complex community findig algorithms, comparing the outcoming clusters would have said a lot about the robustness about each method.\n", "\n", "\n", "Nevertheless, proving scale-free property and finding different communities not only based on the language but topic also are great achievements to notice. In my opinion I did everything I could to do my based on my time schedule. This project unambiguously helped my professional career as it seems to me, many companies do greet having knowledge about natural language processing. " ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" }, "toc": { "base_numbering": 1, "nav_menu": {}, "number_sections": true, "sideBar": true, "skip_h1_title": false, "title_cell": "Table of Contents", "title_sidebar": "Contents", "toc_cell": false, "toc_position": {}, "toc_section_display": true, "toc_window_display": false } }, "nbformat": 4, "nbformat_minor": 2 }