Text Mining

Exploratory Data Analysis

Daniel Amaral

2020-08-28

Overview

The goal of this project is just to display that you have gotten used to working with the data and that you are on track to create your prediction algorithm. Please submit a report on R Pubs (http://rpubs.com/) that explains your exploratory analysis and your goals for the eventual app and algorithm. This document should be concise and explain only the major features of the data you have identified and briefly summarize your plans for creating the prediction algorithm and Shiny app in a way that would be understandable to a non-data scientist manager. You should make use of tables and plots to illustrate important summaries of the data set.

The motivation for this project is to:

  • Demonstrate that you have downloaded the data and have successfully loaded it in.
  • Create a basic report of summary statistics about the data sets.
  • Report any interesting findings that you amassed so far.
  • Get feedback on your plans for creating a prediction algorithm and Shiny app.

Summarise the Data

Let’s create a function that gives us some basic information about a certain set of generic text data.

Let’s get some basic information and statistics from the data sets read.

Data Size(Mb) #Lines Min. Char Max. Char Word Count
Blogs 255.35 899,288 1 40,833 37,334,131
News 257.34 1,010,242 1 11,384 34,372,530
Twitter 318.99 2,360,148 2 140 30,373,543

Exploratory Charts

In exploratory analysis we will visualize the top 10 most frequent n-grams, with \(n \in \{1,2,3\}\).

Feedback

As the bag of words algorithm and in general the techniques require a lot of processing and storage power, we use a small sample… As future work I intend to use multiple n-grams in prediction model and apply some technique that allows more data to be used without compromising the computational efficiency for the shiny app.