Hi! We've renamed ScraperWiki.
The product is now QuickCode and the company is The Sensible Code Company.

Blog

Getting Twitter connections

Introducing the Get Twitter Friends tool

Chain Linkage by Max Klingensmith is licensed under CC BY-ND 2.0``

Chain Linkage by Max Klingensmith is licensed under CC BY-ND 2.0

Our Twitter followers tool is one of our most popular: enter a Twitter username and it scrapes the followers of that account.

We were often asked if it’s possible not only to get the users that follow a particular account, but the users that are followed by that account too. It’s a great idea, so we’ve developed a tool to do that which we’re testing before we roll it out to all users very soon.

The new “Get Twitter friends” tool is as simple as ever to use. The difference is that when you look at the results with the “View in a table” tool now, you’ll see two tables: twitter_followers and twitter_following. Together, these show you all of a user’s Twitter connections.

How close is @ScraperWiki to our followers?

Our Twitter followers

Our lovely Twitter followers 🙂

With this new tool, we can get an idea of how well connected any Twitter user is to their followers. For instance, how many of ScraperWiki’s followers does ScraperWiki follow back?

Using the “Download as a spreadsheet” tool, we can import the data into Excel. By using filters, we can discover how many users are common to both the list of users who follow and are followed by an account. Alternatively, if you’re intrepid enough to use SQL, you can perform this query directly on ScraperWiki’s platform using the “Query with SQL” tool:

SELECT COUNT(*) FROM
(
SELECT id FROM twitter_followers
INTERSECT
SELECT id FROM twitter_following
);

This gives 774, over half of the total number of users that @ScraperWiki follows. We’re certainly interested in what many of our own followers are doing!

Finding new users to follow

To get suggestions for other Twitter users to look out for, you could track who the users you’re particularly interested in are following.

For instance, Tableau make one of the data visualisation software packages of choice here at ScraperWiki, and we’re fans of O’Reilly’s Strata conferences too. Which Twitter accounts do both of these two accounts follow, that ScraperWiki isn’t already following on Twitter?

It wasn’t too tricky to answer this question using SQL queries on the SQLite databases that the Twitter tool outputs. (Again, you could download the data as spreadsheets and use Excel to do your analysis.)

It turns out that there were 86 accounts that are followed by @tableau and @StrataConf, but not by @ScraperWiki already. Almost all of these are working with data. There are individuals like Hadley Wickham, responsible for R’s ggplot2, and Doug Cutting, who’s one of the creators of Hadoop. And there are businesses like Gnip and Teradata, all relevant suggestions.

Twitter accounts followed by @tableau and @StrataConf, but not by @ScraperWiki

Followed by @tableau and @StrataConf; not by us… yet!

It’s also possible to easily sort these results by user follower count. This lets you see the most popular Twitter accounts that probably belong to companies or people who are prominent in their field. At the same time, you might want to track accounts with relatively few followers: in our example, if both @tableau and @StrataConf are following them, then no doubt they’re doing something interesting.

Want to try it?

We’ve released it to all users now, so visit your ScraperWiki datahub, create a new dataset and add the tool!

Tags: , , ,

One Response to “Getting Twitter connections”

  1. Francis Irving April 2, 2014 at 12:19 pm #

    This is now live!

We're hiring!