Book Image

Learning Social Media Analytics with R

By : Dipanjan Sarkar, Karthik Ganapathy, Raghav Bali, Tushar Sharma
Book Image

Learning Social Media Analytics with R

By: Dipanjan Sarkar, Karthik Ganapathy, Raghav Bali, Tushar Sharma

Overview of this book

The Internet has truly become humongous, especially with the rise of various forms of social media in the last decade, which give users a platform to express themselves and also communicate and collaborate with each other. This book will help the reader to understand the current social media landscape and to learn how analytics can be leveraged to derive insights from it. This data can be analyzed to gain valuable insights into the behavior and engagement of users, organizations, businesses, and brands. It will help readers frame business problems and solve them using social data. The book will also cover several practical real-world use cases on social media using R and its advanced packages to utilize data science methodologies such as sentiment analysis, topic modeling, text summarization, recommendation systems, social network analysis, classification, and clustering. This will enable readers to learn different hands-on approaches to obtain data from diverse social media sources such as Twitter and Facebook. It will also show readers how to establish detailed workflows to process, visualize, and analyze data to transform social data into actionable insights.
Table of Contents (16 chapters)
Learning Social Media Analytics with R
About the Author
About the Reviewer
Customer Feedback

The sentimental rankings

In the first use case, we explored the venue data from Foursquare and built some analysis and a proper solution on top of that data. In this section, we will focus on the textual aspect of the Foursquare data. We will extract the tips generated for a venue by users and perform some basic analysis on them. Then we will try to build a use case in which we will use those tips to arrive at a decision.

Extracting tips data – the go to step

By now we know the analysis work flow off by heart and as always the first step is getting to the required data. We have already detailed the steps involved in data extraction with Foursquare APIs. So instead of restating the obvious, we will start with the process of data extraction.

We have written two utility functions for the extraction of tips data from the identified end point:

  • extract_all_tips_by_venue: This function takes the ID of the venue as an argument and extracts the JSON object containing all the tips for that venue

  • extract_tips_from_json...