Brand New Excel Add-in: Data Explorer (And How to: Social Media Analytics)
April 13, 2013 36 Comments
This blog is about a new excel Add-in Microsoft introduced in PASS Business Analytics Conference 2013 this week.
The name of this powerful Add-in is Data Explorer Power Query (Download Here):
We will go through the general introduction of this add-in and then, we will see how it can be used for Social Media Analytics.
First part of the add-in is ‘Get External Data’. As the picture above depicts, there are four sources you can fetch data from using this add-in:
Being a Social Analytics enthusiast, the first thing that caught my attention was nothing but ‘Import data from Facebook‘!
For next few hours, I played with ‘Data Explorer’ on Social Media front and the results were mind blowing!
Fundamentally, this add-in uses Facebook Graph API to fetch data for you and it starts with asking for your Facebook credentials.
Signing in will lead you to ‘Microsoft Data Explorer’ Facebook application; it will ask you to grant access for the application to fetch data for you.
Hit the ‘save’ button and you are all set for data exploration with this awesome add-in.
I started with fetching data from my own Facebook profile. By default, for Graph API, my username would be ‘me’. Here is a snapshot of my first query. I asked “Data Explorer” to fetch dataset containing all the movies I have ‘liked’ on Facebook.
Hitting the OK button, you will get a Facebook Graph Query window like this:
Hit the ‘Done’ button and you will get all your data loaded in an excel worksheet.
(You can fetch the same kind of data about your friends ‘likes’ using your friends’ user name or object id in the query)
Now, at this point- I thought all I can get is data from my own profile, my friends’ profile or from Facebook pages I manage.
Here is something I tried doing and the results amazed me!!
I tried to fetch the Post level data of Starbucks Facebook Page (which is not an easy task to carry out without having admin rights of Starbucks Facebook Page, in my view). This add-in made this task a piece of cake!
Hitting the OK and Done button, I confirmed the query and this is what I got:
Incredible, isn’t it?
Further, I tried to see if I can get the Fan feed.
To my surprise, the next thing I saw was this!
Now, here is something I noticed that was beyond incredible for me! The feeds I was going to load by hitting the ‘done’ button were more in numbers than what I could see on Starbucks Facebook Page. Guess what! I could see the negative feeds posted by Starbucks Fans which Starbucks chose to hide from their page!
In a few minutes, Data Explorer fetched more than 12,000 rows of Starbucks Facebook Page feed for me!
‘Data Explorer’ also provides you with a ‘Refresh’ button which fetches the latest data for the same query with just a single click!
There is also another way to do it… in the query section under ‘Table Tools’, you can hit the “refresh” button!
On the same panel, one can also merge or append multiple queries.
In other functions, there is a ‘Design’ option available under the same ‘Table Tools’ segment.
With one of the queries I tried, “Data Explorer” succeeded in fetching more than 15K records of data from Starbucks Facebook page!
So, with this blog we saw how powerful this add-in can be! One of the most difficult parts is getting the data from a Facebook Page (especially when you don’t own it), but this add-in makes Data Collection so easy that anybody can do it.
Now, what can we do with the data? A lot many things! If I want to analyse how my business is doing on Facebook, I can do it with this add in. Once I get the data, I can run sentiment analysis and see how things are going for me. At the same time, I can also do competitive analysis by getting data from my competitor brand’s Facebook page. If I have a Facebook Profile for my business (and not a Facebook Page), I would be able to get a valuable set of data about my brand’s friends (not fans) with this add-in.
One may not have the capability to fetch statistical data (Likes, Reach, Talking about) from a Facebook Page with ‘Data Explorer’, but all the interactions and post level data (Post type, Post time and Date, Comments etc.) are just a few clicks away!
Please drop a comment on what you think about this add-in or how it may help you / your organization to do Social Media Analytics. I would be more than happy to explore all possible use cases.
*Update: Tackling the ‘limit=1000’ error*
Sometimes, due to the limit imposed on the amount data you can pull from Facebook, you will get this error:
The solution is to eat the elephant one bit at a time:
After you fetch ‘feed’ from a business page, the default query would look something like this:
= Facebook.Graph(“https://graph.facebook.com/disney/feed“)
As you can see, there is no limit parameter included, and hence, Power Query is trying to pull as much data as possible (and faces the limit=1000 error).
All you have to do to tackle this error is – add ‘limit’ parameter:
Here I typed in a new parameter supported by Facebook graph API and this is how it looks:
= Facebook.Graph(“https://graph.facebook.com/disney/feed?limit=100“)
This query will fetch you 100 updates starting from the latest update published on the page.
Now, because you may want more than 100 updates, we will have to run this query again… but with one more Facebook graph API parameter: ‘until’.
Just like the ‘limit’ parameter, you can type in ‘&until=2012-10-30′ after the ‘limit’ parameter. This addition will fetch you 100 updates until 2012-10-30 (YYYY-MM-DD). Sometimes, I add ‘since’ parameter: The ‘since’ parameter fetches you updates since the date specified by you in the query.
If you want to pull ‘feed’ from specific time period: you can use both ‘until’ and ‘since’.
= Facebook.Graph(“https://graph.facebook.com/disney/feed?since=2012-10-20&until=2012-12-31“)
If you get the ‘limit=100’ error (in case there are more than certain number of updates made during this time period), you can add limit parameter to this query:
= Facebook.Graph(“https://graph.facebook.com/disney/feed?limit=100&since=2012-10-20&until=2012-12-31“)
Note: You should be able to see two columns carrying date when you pull your data: ‘created_time’ and ‘updated_time’.
Here, it is important to understand that the time period specified in your query is in reference to ‘created_time’ (column) and not ‘updated_time’ (column).
I hope this proves to be helpful when you encounter the ‘limit’ error; please feel free to write in your comment if you face any other type of errors while pulling the data from Facebook, or if you have certain interesting use-cases to share about this Power Query feature.
Related Articles:
DIY: Analytics Driven Social Media (Facebook) [Parth Acharya – Blog]
Six Social Media Analytics Technologies You Should Know About [Parth Acharya – Blog]
Social media and customer dialog management at Starbucks [Parth Acharya – Blog]
I would end this post by thanking Paras Doshi who blogged about his first day at the PASS Business Analytics Conference 2013 in which this add-in was mentioned.
informative read…
Pingback: Microsoft Excel Add-in: GeoFlow… and Data Visualization | Parth Acharya - Blog
For me, this is not how informative I was getting for this post of Mr. Parth. The important I have get is the knowledge for the add-ons of excel. That was really amazing.
can you Query multiple Fans and append only new posts with some automated scripts?
Yes, it is possible to query multiple fans. And I do not believe you can append only new posts with some automated scripts, however you can refresh the query with a single click and download all the updated data with new posts.
Thank you so much! Can’t wait to give this a go! could save us thousands in social tools!
Pingback: Facebook (Page) Insights Dashboard with Tableau | Parth Acharya - Blog
Hi, I’ve been doing this for a couple of months, and all of the sudden the company’s profile I’m doing this for is giving me a limit size=1000 error. Have you got this sometime? did you fix it? really appreciate if you can help. THanks!!
Hi Martin – yes, I have got that error sometimes, especially when I try to pull ‘feed’ or ‘posts’ from business pages. To tackle this error, I add ‘limit’ and ‘until’ parameter to the query. I should update the blog to throw light on this error and its solution. Thanks.
Thanks for your reply! Meantime, would you share the details, so I can tackle it out myself and deliver the info to the client? Thanks a Lot !!!
There… updated! – Let me know if the described solution does not work for you.
Fantastic!! it works like a charm. There is this little matter of the records limit… in my case, is 200… So I think I’ll be doing a little programming, or just copypasting and editing the formula to get what I need (2nd half 2013 from a major bank). but it’s far better than copy/paste the contents from Fb directly, and far more insightful!!!
According to updated Graph API the “unitl” and “since” parameters must be in the UNIX timestamp code (i.e. 1459382400) not in the MM-DD-YYYY or YYYY-MM-DD format. UNIX
Thank you for the call out. :)
That’s awesome. Do you know how the same can be done in other spreadsheet softwares such as LibreOffice?
Hi Akshita,
I do not think you can do this with other spreadsheet software such as LibreOffice – mainly because it is not Excel that does it per se, but an Excel Add-in “Power Query” that has this capability.
*Unless LibreOffice comes up with its own extension that supports Facebook API*
Thanks a lot Parth to share this add-in. One does not now need to totally depend on social media technologies. I did read in comments that its not possible to append new data in existing sheet. Just wanted to check again in case we are able to download more than 1000 comments for a particular date range. Or maybe if we want it for a longer date range with too many updates we have to download in different sheets, right? Any similar add-in for twitter, YouTube, Instagram or other social platforms?
Hi Princee,
If you are referring to the 1000 posts limit, I updated to blog to cover a way around that limitation. I believe using multiple files gives flexibility, but I think you can essentially use the same file with multiple tabs to gather a broader (date) range of data.
There is one more thing – when you see the data e.g. for Starbucks feed and scroll right to columns Likes and Comments, it shows not value but just Table or null. Any idea on how we can get the values for same.
The likes and comments, if null, should define that a post does not carry the values in the fetched data. I do not think there is a way around if the add-in is not able to capture those data pieces.
To your question about other social networks, I have not seen an update of this add-in that includes any other social network than Facebook. However, there are free/commercial tools out there that can help you gather Social data from different social feeds, which in turn can be pulled to excel for further analysis as required. Hope this helps.
Hi.. quick question — I’ve been having issues with the 1,000 limit. We have a site with 500K and 1M fans respectively. I’m trying to better understand who is commenting or liking our posts. Is this possible? Essentially get to a table that says “Mary Smith” made XXX comments in December.
Hi.. quick question — I’ve been having issues with the 1,000 limit. We have a site with 500K and 1M fans respectively. I’m trying to better understand who is commenting or liking our posts. Is this possible? Essentially get to a table that says “Mary Smith” made XXX comments in December.
Hi Vipul,
Yes it is certainly possible, however you will have to use a different Graph API query in order to get the data using this add-in. Also, because of the manual nature of this add-in, I believe you will have to gather data post-by-post basis. Meaning, you will have to come up with your own method of creating the kind of analysis you are looking for.
Here is one way (although seemingly long, “but free”) of conducting such analysis:
1. Using Graph API query, get all the comments on each post. You will need each post ID and you will have to decide how much time after publishing a post, you want to run the query.
2. As a result of the query, you should expect comments and commentator. (alongside other data-points like date, time etc.)
3. If you do this for all historic posts (you can go as far as you can, it will just consume time as you run query for individual posts), and continue to do so for all your future posts, you will have some rich data about comments and people who comment on your posts.
4. Using this data, you can create a blended excel file with all the data combined, create a pivot table and get the results that you want.
A couple of extra points that are coming to my mind:
1. You can also conduct it for multiple posts (if you dont wish to go post-by-post), but I think it has risk of facing data limitations (mentioned in the blog) considering you have 1M fans who may be engaging in large volume with your posts.
2. If you create a Graph API query once (to get the required data for a post-id: comments, commentator), the rest is going to become kind of a repetitive exercise (relief!)… but as I said, you can also try date range parameter to get data for multiple posts at once with a risk of not-getting-all-the-data you may expect to get from Facebook.
Hi Parth
I installed Data Explorer and when connecting to facebook to import data it’s asking to – Specify the Object or a Connection in Facebook graph and i entered my facebook email id and connection as friends list and it does not get connected. Throwing up an error…
Do i have to install any other software to access the facebook
Thanks for your great help, the limits for FB each time is 100, so can we have a more convenient way to change this limit?
Hi!
I wanted to extract my Facebook comments, but I get the following message:
Facebook: (#803) Cannot query users by their username (here stands my Facebook username)
Hi Karankhian – Since v2.0 of the API, you are not supposed to use usernames at all – and that´s why you can’t query users by their username anymore. The only way to get access to data of a user is by authorizing that user and using the /me endpoint.
https://developers.facebook.com/docs/apps/changelog
Hi,
I’ve been using the power query to get all my page’s posts’s likes and comments. Can I get my fan base and manage to sort them (by gender and age for instance)?
Thks for the work you’ve done by the way, very explicative and clear.
Cheers
Hi Parth,
This looks like a tool with a great amount of potential. With likes, shares, comments at the post level, I can see which posts are the best performing ones. This especially helps to learn from my competitor’s pages.
However, one of my competitors has a page with 21 million likes. When trying to fetch information about their ‘posts’, I get an error message that says:
We encountered an error while trying to connect.
Details: “Facebook: Please reduce the amount of data you’re asking for, then retry your request”
I tried ‘Starbucks’ as well, going with your example. I get the same error. Any work around? Thanks :)
Hi!
See if the part of the blog following *Update: Tackling the ‘limit=1000’ error* helps; essentially – including the ‘limit’ parameter in the query should help bypass the data limitation error.
Also, if you are attempting to query large amount of data, these data limits may apply (snippet from this page):
Limits
Hi Parth,
Unfortunately, the error I’m getting doesn’t give me the option to set or change limits. So, the error I’m getting is before the limit stage error.
Hi Parth,
Any thoughts?
Thanks :)
Hi there, how can i change the log-on credential details ? seems i cant change at all after I’ve signed in using my own profile.
This is an old post; not sure if the plug-in is updated since then – but you may try getting rid of it and add it back again to your Excel. Sorry, wasn’t very helpful.
Cdata Software has developed The Facebook Excel Add-In is a powerful tool that allows you to connect with live Facebook data directly from Microsoft Excel. Use Excel to search, aggregate, read, write, and update your Facebook feeds, etc. Perfect for mass imports / exports / updates, data cleansing & de-duplication, Excel based data analysis, and more!
Here are some of my favorite features:
Easy import of data into Excel
Easy to save changes back
Ability to filter and sort, not just a raw import
Establishes a live, refreshable connection, not just a static dump
Modify and delete records
Quickly export and backup data
Operate on data with Charts and Pivot Tables
The robust features of the Excel Add-In are easy to use, thanks to out-of-the-box functionality. You can install the Add-In, configure the connection to your data source, and, thanks to the point-and-click interface, immediately begin working with your data.
While the default options allow you to access and manipulate your data without writing any code, the Add-In is supported in macros/VBA functions. This gives you robust, granular control of your data on top of the generic queries possible through the Excel Add-In user interface.
For more information go to: https://www.cdata.com/drivers/facebook/excel/
Approving the comment for people to see. I have not used this tool myself, but other people may benefit, in case they are looking to use something other than Power Query.