Creating a Twitter data set

You can create a Twitter data set record to track and analyze the text-based content that is posted on the Twitter social media site. By analyzing users' input, you can gain insight that helps you to structure the data in your application to deliver better services to customers and increase your customer base.

For example, by tracking and analyzing tweets about your organization or your products, you can discover whether the customer response to the release of one of your products was positive or negative.

Use the Twitter data set to filter tweets according to the keywords that you specify. First, create a Twitter data set to connect with the Twitter API. Next, reference the data set from a data flow and use the Text Analyzer rule to analyze the text-based content of tweets.

CAUTION:
Do not reference a Twitter data set from multiple data flows because stopping one data flow stops the Twitter data set in all other data flows.

Prerequisites

Before you create a Twitter data set, perform the following tasks:

  • Register a Twitter application for your Twitter account on the Twitter applications portal to obtain the OAuth settings that you need to specify in the Twitter data set.
  • To get the metrics that determine the social influence of users, obtain the Klout score API key from the Klout website.
  1. In Designer Studio, click + Create > Data Model > Data Set.
  2. Provide the data set label and identifier.
  3. From the Type list, select Twitter.
  4. Provide the ruleset, Applies to class, and ruleset version of the data set.
    Note: The Applies to class for Twitter data sets must always be Data-Social-Twitter.
  5. Click Create and open.
  6. In the Retrieve tweets section, select the way in which your application retrieves tweets form the data set:
    • Stream – Retrieves new tweets when they are posted.
    • Playback – Retrieves historical posts from the time period that you provide. For example, you can use this mode when you want to retrieve the tweets made while your application was inactive.
  7. On the Twitter tab, in the Access details section, provide the following OAuth settings from your Twitter application:
    • Consumer key
    • Consumer secret
    • Access token
    • Access token secret
  8. View the metrics about the social influence of the Twitter users that you track. In the Access details section, enter the Klout score API key.
  9. In the Keywords section, perform the following actions:
    1. Optional: Limit data retrieval to the text-based content of tweets by selecting the Search only in tweet text (ignore author handles and profile) check box.
    2. Click Add keyword and enter the words that you want to find in the tweets.

      You can also enter the Twitter authors that you want to find in tweets (for example, @JohnSmith).

  10. In the Retrieve timeline section, click Add author and enter the names of users whose tweets you want to analyze (for example, @LouiseSimpson).
  11. Enter the names of users that you want to ignore. In the Ignore section, click Add twitter handle, and enter appropriate user handles.
    Note: See the Twitter REST API documentation for information about limitations when specifying keywords and authors.
  12. In the Search section, define the retrieval settings for tweets:
    • Enter a range of time during which tweets were made. For example, you can retrieve tweets made within the last 24 hours.
    • Optional: Select the Search for a maximum number of tweets check box and enter the maximum number of tweets for the system to retrieve.
    Note: The Search section is displayed only when you select the Playback option in the Retrieve tweets section.
  13. Optional: Configure additional options for filtering the data that is retrieved by the Twitter data set by clicking the Advanced options tab.
  14. Click Save.