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
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
Index

Venue graph – where do people go next?


Our next use case on Foursquare data is geared more towards creative data extraction. We will demonstrate how the combination of some creativity with the basic data can give rise to unusual datasets. The base data of Foursquare is not really suitable for extracting a graph-based dataset. But a close examination of the APIs reveals an end point which will give the next five venues people go to from any given venue. This can be combined with a graph search algorithm such as a depth-first search to create a graph in which venues can be linked to the next possible venues.

To extract this data, we will use our two utility functions:

  • extract_venue_details: This function will get us the venue details of each venue occurring in our traversal

  • extract_next_venue_details: This function will get us information about the next five venues to which users go from a particular venue

  • extract_dfs_data: This the implementation of a depth-first search in R which will take...