This is Part III of a four-part post. Part I talks about collecting text data from Twitter while Part II discusses analysis on text data i.e. text mining. Part III outlines the process of presenting the data using Tableau and Part IV delves into insights from the analysis.
Capabilities of tool Tableau:
- The numbers of each reaction, namely Likes, Replies, and Retweets to each tweet, are stored as column variables. To show them within a single graph (and not three graphs), drag "Measure Values" to Rows.
- "SUM(Number of Records)" will also be included under "Measure Values", but drag "Measure Values" to Rows beside "Measure Values" instead. Two separate graphs will show up but to make them within the same graph, make use of the Dual axis capability. Click the drop-down on "Measure Values".
- By default, a bar chart will show up. Under Marks, change the graph type for "SUM(Number of Records)" to Line.
- If the line graph does not show up in front of the bar chart, right click on the left axis and select "Move marks to front".
- To label certain points, right click on the point and select Annotate > Mark...
- Next, we load in a new data source. From the top, click Data > New Data Source and load in the dataset that we had created previously in Text Mining - Process - R. Tableau allows us to create a word cloud. We can play the data through a loop across consecutive time periods (or any sequential variable). The speed can be adjusted by clicking on the one-bar/ two-bar/ three-bar button within the legend key.
- We can also adjust the color scheme for the word cloud.
- I have created another variable to always exclude certain words.
- Finally, for the tweets, Tableau allows us to show the top 10 most popular tweets by number of likes.
- As the top tweets are in 2017, if we want to see the top 10 tweets within different year(s), right click "YEAR(Timestamp)" under Filter and select "Add to Context".
Alternatively, click here to view the interactive Tableau dashboard.
The scraped dataset is not available for download in order to adhere to Twitter's data sharing policies.