In this chapter, we are going to use the Twitter dataset. The dataset can be downloaded from Kaggle (https://www.kaggle.com/kingburrito666/better-donald-trump-tweets). In addition to that, you can find the dataset inside this book's GitHub repository. The dataset is found inside the CH13 folder. The file is called Donald-Tweets!.csv.
Let's dive into the exercise by running the Jupyter notebook we've been using throughout this book. Once you have the notebook up and running, import the required essential packages. Most of the Python packages should be very familiar by now:
from textblob import TextBlob
import math
import pandas as pd
import numpy as np
import os
from pandas import DataFrame
from sklearn.cluster import KMeans
from sklearn import preprocessing
import matplotlib.pyplot as plt
from matplotlib import style
import matplotlib.pyplot as...