Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Learning Social Media Analytics with R

You're reading from   Learning Social Media Analytics with R Transform data from social media platforms into actionable business insights

Arrow left icon
Product type Paperback
Published in May 2017
Publisher Packt
ISBN-13 9781787127524
Length 394 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (4):
Arrow left icon
 Sarkar Sarkar
Author Profile Icon Sarkar
Sarkar
Karthik Ganapathy Karthik Ganapathy
Author Profile Icon Karthik Ganapathy
Karthik Ganapathy
Raghav Bali Raghav Bali
Author Profile Icon Raghav Bali
Raghav Bali
 Sharma Sharma
Author Profile Icon Sharma
Sharma
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Learning Social Media Analytics with R
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
1. Getting Started with R and Social Media Analytics FREE CHAPTER 2. Twitter – What's Happening with 140 Characters 3. Analyzing Social Networks and Brand Engagements with Facebook 4. Foursquare – Are You Checked in Yet? 5. Analyzing Software Collaboration Trends I – Social Coding with GitHub 6. Analyzing Software Collaboration Trends II - Answering Your Questions with StackExchange 7. Believe What You See – Flickr Data Analysis 8. News – The Collective Social Media! 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...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at £13.99/month. Cancel anytime
Visually different images