5 Ways to Manage Your Twitter Account With Dataiku

tutorial| Data analysis| twitter | | Uli Bethke

At Sonra, we have created a couple of Twitter plugins that will turn Dataiku Data Science Studio (DSS) into an efficient engine to manage your Twitter account(s). In this post we will cover the five recipes we have created and how they can be used to cover some common Twitter use cases.

Before we can use the recipes, we need to install the Twitter tools plugins. You can download it from the Dataiku website. We also need to create a Dataiku Twitter connection.

Recipe 1: My Followers Recipe

Who are your followers? The first recipe will return all of the attributes of your followers into a Dataiku dataset. We create a new Followers recipe:

Creating a new follower recipe


This recipe does not require an input data set. Next we need to select the connection we want to use. The delay between API calls is in seconds.

Getting followers info

 There are various use cases that this plugin can handle, e.g., you can generate reports on your Twitter follower population such as location, language etc.

If you want to be more sophisticated, you could use Dataiku clustering algorithms to generate follower clusters. You can track your followers over time by making a regular nightly extract of your followers. In combination with the following recipe you can determine your follow back rate, which is the rate that users that you are following are following you back.

Follower tracking

Recipe 2: Keyword Search Plugin

Which followers are interested in a specific topic? The keyword search plugin returns all of the Twitter users that have a particular keyword in their profile or description.

The maximum number of records that the Twitter API returns is 500. If you have a broad term that returns a lot of results, you need to combine it with more granular keywords, e.g., instead of searching for “big data” search for “big data Ireland.” For the recipe to work, we need an input dataset with the various keywords we want to search for. You could upload a file from CSV or Excel, or you could just create an editable dataset in Dataiku, which we are using in the example below:

User Keyword


Next we create the Search Users by Keyword recipe

Searching users by Keyword

Finally we supply the name of the Dataiku Twitter connection, and that’s it. We just need to run the recipe et voilá ! We have our data set auto generated with a schema.

An auto-generated dataset

This recipe can be useful to find relevant accounts you would like to follow; for example, you may want to identify CTOs or CIOs on Twitter. It can be used in combination with the Follow recipe that will allow you to follow a list of Twitter accounts that you specify.

Combining User Keywords

Recipe 3: Following Recipe

Which kind of people do you follow? The Following Recipe returns all of the users you are following. It can be used to profile your Following population. You can use this recipe in combination with the My Followers recipe to determine your follow back rate by doing an outer Join between the two data sets to check which users haven’t followed you back.

It also allows you to determine which users don’t follow you back and you can use it in combination with the Unfollow Plugin to unfollow those users.

Recipe 4: Follow Users Recipe

How can you automatically increase the number of people you follow? We can use the Follow Plugin in combination with the Keyword Search Plugin to follow a selected number of users.

Following Users

Recipe 5: Unfollow Users Recipe

How to automatically unfollow specific users? This plugin allows you to unfollow users from a dataset that you supply, e.g., one generated from the Following Recipe. It can be used to unfollow users that don’t follow you back.

Start Cooking Now!

With such recipes, we are confident you'll master Twitter pretty soon to gain more influence and insights. Enjoy! And don't forget to follow Sonra and Dataiku Twitter accounts.

Want to give it a try too? Download Dataiku's free edition of Dataiku Data Science Studio and follow this blogpost's instructions! Or, check out some of the other sample project we've done using Twitter data.

Try Dataiku

Other Content You May Like