Tutorial: Data Collection from Twitter

In this tutorial, we will show you how to import publicly available data from Twitter using Communalytic.

Communalytic only collects replies (and replies to replies) in response to a given tweet. For example, it doesn’t collect tweets on a given topic. Also, the current import function only supports collection of replies posted within the past week (7 days). 

While many programs now support collection of tweets, Communalytic allows collection and analysis of conversations that unfold in response to a given tweet, such as the following tweet from Donald Trump that received over 20k replies.

To collect replies corresponding to a given tweet, you would need to locate and provide tweet’s unique URL, and Communalytic will collect replies to this tweet and replies to those replies, as long as they are posted within the past 7 days.  

Once collected, you will be able to represent and visualize replies as a communication network (as illustrated below). You will also be able to run a toxicity analysis to understand the overall tone of these replies.

A network representation of replies to a given tweet

Step 1: On Twitter, identify a popular tweet and its URL that you would like to examine.

Step 2: After doing this, you’re ready to collect public replies in response to this twee. In Communalytic, from the “My Datasets” page,  click on the “Twitter” button under “Collect data from” to start data collection. 

It’s worth noting that you will need to create Twitter Developer’s account and generate so-called “bearer” access token to import data from Twitter. Please visit our Twitter Bearer API tutorial if you have yet to obtain one.

Step 3: Enter a name for your dataset and specify URL of a tweet in order to collect replies to this tweet.

Once ready, click on the “Start Collection” button.

Step 4: You should be able to see your new dataset listed on the “My Datasets” page. To check the progress of your data collection, refresh this page.

When your data import is complete, it will say “Complete” under the Status column, as shown below. 

Step 5: Once the dataset is ready, you’ll be able to access, analyze and export it by clicking on the name of your dataset.

Now it’s time for you to collect and explore public tweets on your own!