The Repustate Promoter Score (RPS) explained

Repustate’s new metric

One of the newest and most popular features of Repustate’s Social Media Monitoring platform has been the addition of a metric we call the Repustate Promoter Score, or RPS for short. The RPS provides a simple score, from 0 to 10, that indicates the overall sentiment people have about a particular topic in question. This could be a person, a brand, a product, anything.

The RPS is calculated as follows: Take the total number of positive mentions, the total number of negative mentions, compute the Wilson Confidence interval¬†using those two numbers, and then multiple by 10 to get a score between 0 and 10. That’s a mouth full, let’s dig a bit deeper.

How it works

Total number of positive & negative mentions is easy enough to understand, but what’s this about a Wilson Confidence interval? Well, it’s a math formula which tries to determine how confident you are about a particular outcome given the data. To put this in social terms, let’s say we have 1 tweet about the Apple iPhone and that tweet is positive. How confident are we that everyone is positive about the iPhone? Well, not too confident, because we only have 1 piece of data. But let’s say we have 1000 tweets, and 950 are positive. Now our confidence level rises, and that’s the thinking behind using the Wilson Confidence internal.

Some examples

Here are some examples of Repustate Promoter Scores given a number of positive and negative mentions:

Positive: 1, Negative: 0, RPS: 2
Positive: 10, Negative: 0, RPS: 7
Positive: 10, Negative: 10, RPS: 3
Positive: 0, Negative: 100, RPS: 0
Positive: 100, Negative: 5, RPS: 9

When you create a new data source, Repustate calculates the RPS on an ongoing basis so you can see how the RPS fluctuates over time in your dashboard.

Using Python to data mine Twitter

With the launch of our Social API a little over a month ago, Repustate now allows its customers to create rules to monitor social media, all without ever leaving the confines of your favourite programming environment. But the piece that was missing was the ability to get various statistics and reports about your data sources. Today, that changes with Repustate’s new visualize API call.

If you’re impatient, here’s the gist of it:

If you look through the above gist, you’ll see the steps we take are pretty simple and can be parametrized and automated so you can create graphs and charts as part of your regular reporting process. Our code sample was in Python, but it can easily be ported to Ruby, PHP, Go, or any language of your choosing. To summarize the above code snippet:

  1. We created a new data source
  2. We added a monitoring rule to the source. In this case, we want all mentions of iOS7 on Twitter
  3. We then asked for a graph depicting the gender breakdown for all tweets with positive sentiment for this data source.

With very little code, we’re able to create and visualize complex queries. Neat, huh?
We’ll be adding more visualizations to the API as time passes. And by all means, if you have any suggestions, please let us know!

 Data mining Twitter with Python РA little more detail

Now that we’ve skimmed the surface with that code sample up above, let’s dive a little bit deeper and see what’s going on and what the Social API allows us to do.

The first concept we introduced was the data source. A data source is any social network Repustate monitors (currently Twitter & Facebook). Now, you can create multiple instances of data sources, that is to say you can monitor Twitter for all sorts of different things at the same time.

Each data source can have one or more rules. You’ll see in the code above on lines 14-19, we define our rule. Our rule says “Get me any mention of iOS7 on Twitter, don’t include any retweets, and only tweets from people with at least 1,000 followers”. The last bit, filtering by number of followers, helps remove any spam bots.

At this point, Repustate has enough info to start fetching your data. It might take a few minutes before any data gets populated but once it does, you can run the visualize API call to create graphs and charts that summarize your data. In the above example, we chose the gender filter type, which displays the breakdown of male to female tweeters in our data source.

Here’s a sample of a graph the Repustate returns using the visualize API call:

Positive category filtered by gender

Let’s do another one. This time, let’s take a look at all devices used to create this content, sorted by those which were most commonly used:

Devices used for this data source

You can see with just a few API calls and just a few more lines of Python, we’re able to create pretty insightful visuals. No need for Excel or your own ETL processes – just Repustate’s Social API.