| itle: “SwiftKey Exploratory Data Analysis” |
| uthor: “Swasthik Kotian” |
| ate: “2026-09-22” |
| utput: html_document |
The goal of this analysis is to explore the SwiftKey text data and understand its basic characteristics. The dataset contains three sources of text: blogs, news, and Twitter. The analysis focuses on the number of lines and words in each dataset and examines the distribution of words per line.
The three datasets contain a large amount of text.
summary_table
## Dataset Lines Words
## 1 Blogs 899288 37334131
## 2 News 1010206 34371031
## 3 Twitter 2360148 30373583
The blogs dataset contains 899,288 lines and approximately 37.3 million words. The news dataset contains 1,010,206 lines and approximately 34.4 million words. The Twitter dataset contains 2,360,148 lines and approximately 30.4 million words.
These results show that Twitter contains the largest number of lines, while the blogs dataset contains the largest number of words.
To understand the structure of the text, a random sample of 10,000 lines was taken from each dataset. Histograms were created to examine the number of words per line.
The distributions show that most lines contain a relatively small number of words, while longer lines occur less frequently. Twitter has a different distribution from blogs and news, reflecting the shorter and more concise nature of social media messages.
Several useful findings were identified during the exploratory analysis:
The next stage of the project will focus on building a prediction algorithm that can suggest the next word based on previously entered words. The analysis will use the text data to identify common word combinations and patterns.
A Shiny application will eventually provide an interactive interface where a user can enter text and receive a predicted next word.
The exploratory analysis confirms that the SwiftKey dataset has been successfully downloaded and loaded. Basic summaries and visualizations have been created to understand the size and structure of the data. These findings provide a foundation for developing the prediction algorithm and Shiny application.