Social Media Analytics in 10 minutes

SlicingDice Team
SlicingDice.com Blog
6 min readApr 23, 2017

Go from zero to social media analytics hero in less than 10 minutes, without managing any infrastructure or worrying about data size.

This guide will show how to use SlicingDice for social media analytics, a Serverless Data Warehouse and Analytics Database as a Service.

Everyday SlicingDice receives more than 1.1 billion data inserts and millions of queries from multiple indie devs and companies, many of them doing analytics on top of social media data, such as Twitter’s data.

Scenario description

Let’s imagine you collect social media data and want to use them to find the most relevant users or to understand the user’s behaviors.

Example of social media analytics questions we want to answer:

  1. What are the most used hashtags last week among the followers of famous Twitter accounts?
  2. How many users twitted the hashtag #slicingdice in the past 24 hours and follow @SlicingDice?

Sending your social media data to SlicingDice

Sending data to SlicingDice is very simple and fast. You can use our easy-to-use API or any of our clients available in Python, Ruby, JavaScript, Java, .NET/C#, PHP, Go and Arduino.

In order to send your data, first you simply need to:
1. Define what your entity is going to be. We consider an entity to be like a user, a customer, a person and so on. That’s basically a way of saying: who owns the data? So looking both questions above, the data is clearly produced by a Twitter user, that we will consider to be our entity.

2. Once you know what is your entity, you simply need to specify the columns and values you want to associate to your entities.

Check this data insertion example below

Pro Tip: Click here to generate a personal free demo API Key, so you can copy & paste all the cURL command examples below on your own terminal and play with it live using our /test endpoint.

In this example below our entities are Twitter users and we will insert some of their data on SlicingDice, such as hashtags used and the users they follow.

Looking this data insertion command above, we can clearly see that we have three user entities: @user1, @user2 and @user3.

For these three entities we associated two columns: following and hashtags.

As you can see, all entities @user1, @user2 and @user3 have the same columns following and hashtags, but each with different values.

What is happening here is that you are telling SlicingDice that the following values of the entity @user1 are [“@user3” and “@SlicingDice”], and that the hashtags value “#123” was used on “2017–xx–xxT05:52:38Z” , the “#abc” values was used on “2017–xx–xxT05:26:20Z” and so on.

The exactly same thing is happening for the entities @user2 and @user3, but with different values.

That’s it. Simple like that. As we now have some data stored, let’s answer the questions we defined in the beginning of this post:

  1. What are the most used hashtags last week among the followers of famous Twitter accounts?
  2. How many users twitted the hashtag #slicingdice in the past 24 hours and follow @SlicingDice?

Querying your data

Making queries on SlicingDice is simple and easy. It’s possible to do multiple types of analysis using our API and you can get to speed by seeing all the ready-to-use query examples we have on our Github clients repositories for Python, Ruby, JavaScript, Java, .NET/C#, PHP, and Go.

In order to answer the question What are the most used hashtags last week among the followers of famous Twitter accounts? we will be making an aggregation analysis.

Aggregation is a powerful way to cross data in order to find insights and unexpected patterns. You can think about it like being an Excel Pivot Table.

What is happening under the hood on this simple aggregation query below is that we are asking SlicingDice to:
1. first retrieve all users having the Top 5 most common values for the “following” column;
2. then for each of the five “following” values, make an intersection of these users with all the users having the “hashtags” column, finally selecting the Top 5 results of the intersection to show.

Based on the data we inserted before, if you run this query above on your own terminal, you should be able to see these results below:

As you can see, results are basically showing the most used hashtags for each famous Twitter accounts followed. You can answer a lot of questions using aggregations and more importantly, discover insights out of your data.

Now let’s answer the second question we have: How many users twitted the hashtag #slicingdice in the past 24 hours and follow @SlicingDice?. We can easily answer this question by using the count entities analysis.

Count entities is a simply and fast way to know how many unique entities (cookies) you have that satisfies some set of conditions you define.

Let’s take as example our query below, what is happening here is that we want to know how many Twitter users (entities) have the “#slicingdice” value added for the “hashtag” column in the “last 24 hours” AND also have the “@SlicingDice” value for the “following” column.

Note that we are putting a name for this query (number-of-twitter-users) because our API accepts making multiple count queries in a single request.

Based on the data we inserted before, if you run this query above on your own terminal, you should be able to see these results below:

As you can see, the results are basically showing there is 1 Twitter user (entity) satisfying all conditions of the query.

Now, if you want to know who are these users (entities), you can simply make this result data extraction query below:

As you can see below, it’s showing that the @user3 is the one that used the “#slicingdice” hashtag in the last 24 hours and is also following “@SlicingDice”.

What other questions and analysis can I make?

SlicingDice supports multiple types of data analysis, so you can basically answer any kind of question you may need for analytics purposes, for example:

  • How many “@SlicingDice” followers are also following “@Google” and “@Facebook” but not “@Amazon”?
  • How many times the hashtag #slicingdice was twitted in the past 24 hours?

You nailed it, hero! — Next steps

That’s it. You are now ready to start making as much social media analysis as you want.
If you are inclined to think that SlicingDice might work for you, we suggest you take a look on our documentation and at least follow our quickstart guide.

Please, don’t hesitate to contact our developer support team at any time, for any reason. We are here to support your needs.

Loved it… but, how much does it cost?

Our price is really innovative and cheap. We charge based on the quantity of columns you have, doesn’t matter how many rows you store for them.

So for example you can store unlimited data on SlicingDice for this use case presented above (Twitter users, for example) for less $ 10.00 per month. It’s true. Check our website pricing page.

Why SlicingDice?

Developers want to store and query their data, but they hate having to manage complex data infrastructure, so we do it for them.
All they have to do is simply store and query billions of real-time and historical data, without managing any infrastructure.

High availability?
You don’t need to worry. We always replicate and backup your data on three different datacenters, located in France, Canada and Germany.

Query speed?
If any query takes longer than 10 seconds to complete, no matter the query complexity or data size, you receive a 10¢ discount for each query. We believe ensuring fast queries is our responsibility, not yours.

Not sure if we can support your needs?

Click here and schedule a 15-minute talk with our developers, totally free of charge, so we can evaluate your case together.

Don’t know how to model your data in order to send it to SlicingDice?
No problem at all, schedule a time so we can talk or let’s chat online now.

--

--

SlicingDice Team
SlicingDice.com Blog

Dev team of SlicingDice — Serverless Data Warehouse and Analytics Database-as-a-service