Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Learning Social Media Analytics with R
Learning Social Media Analytics with R

Learning Social Media Analytics with R: Transform data from social media platforms into actionable business insights

Arrow left icon
Profile Icon Karthik Ganapathy Profile Icon Sarkar Profile Icon Sharma Profile Icon Raghav Bali
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Full star icon Full star icon 5 (4 Ratings)
Paperback May 2017 394 pages 1st Edition
eBook
€22.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
Arrow left icon
Profile Icon Karthik Ganapathy Profile Icon Sarkar Profile Icon Sharma Profile Icon Raghav Bali
Arrow right icon
€18.99 per month
Full star icon Full star icon Full star icon Full star icon Full star icon 5 (4 Ratings)
Paperback May 2017 394 pages 1st Edition
eBook
€22.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m
eBook
€22.99 €32.99
Paperback
€41.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

Learning Social Media Analytics with R

Chapter 2. Twitter – What's Happening with 140 Characters

An article in Forbes in 2012 outlined research undertaken by a Paris-based analytics firm. The research had found Jakarta to be the world's most active Twitter city (source: http://www.forbes.com/sites/victorlipman/2012/12/30/the-worlds-most-active-twitter-city-you-wont-guess-it/#3b3f7d16343b). This may be a surprise, given the population count and other dynamics of the city, but such insights aren't jaw-dropping any more. The world is now a place where every other person has a virtual identity on numerous social networking platforms. The previous chapter gave you a quick glimpse into what a social network is (in case you didn't already know it) and this chapter will build on those concepts and set the tone for the rest of the book.

Twitter, as we all know, is a chirpy social network that's meant for sharing information at break-neck speeds. Technically, it is a microblogging platform which...

Understanding Twitter

Understanding Twitter

Twitter's initial design. Image source: https://www.flickr.com/photos/jackdorsey/182613360/

Born in 2006, Twitter is a social networking cum online news service which enables its users to share content in bursts of 140 characters. Over the years, it has evolved like any other successful thing on the Internet and added and/or removed features. Our aim in this chapter is to understand different aspects of this service and use them to draw different insights or solve business problems.

Tip

Twitter was the brainchild of Jack Dorsey, Noah Glass, Biz Stone and Evan Williams. It started as the SMS of the Internet with very simple ideas. You can read the interesting story of its inception here: http://latimesblogs.latimes.com/technology/2009/02/twitter-creator.html

As discussed in the previous chapter, social networks are far reaching and dynamic. Twitter allows users to share information using text, images, videos, GIFs, links, hash tags, handles and so on from a variety...

Revisiting analytics workflow

As discussed in detail in Chapter 1, Getting Started with R and Social Media Analytics (see A typical social media analytics workflow), we defined some key steps involved in the analysis of data from different social networks. Continuing with the same theme for Twitter, the different use cases we will work on in the next sections can also be broken down into the following key steps:

  • Data access
  • Data processing and normalization
  • Data analysis
  • Insights

The data access step involves understanding the APIs and their corresponding R packages to tap into the social network. We've already talked about creating a Twitter app and did a quick connect and extraction of tweets using R. Each of the following sections will make use of the same initial step for data access and then build upon them based on the requirements. We will discuss and provide details for each of the other steps in this workflow as we progress with the use cases. Stay tuned.

Trend analysis

Twitter is a speedy medium. Information (along with rumors and nonsense) travels at breakneck speeds across the social network/world. It has now become a norm for an event or news to break first on Twitter and then on any other source of information. It is commonly observed that TV news channels usually play catchup with Twitter during any news breaks. Such a quick spread of information has its own pros and cons, but a discussion of these are out of the scope of this book.

It would be safe to say that if there's anything trending in the connected world, it will be on Twitter first. From brand promotions, sports events, government decisions, election results to news about terror attacks, natural disasters and the notorious fake celebrity death news, Twitter has it all.

Twitter uses search terms, what are called hashtags in Twitter-verse. Any word which begins with a # is termed as a hashtag and instantly becomes searchable on the platform. This not only helps users search...

Sentiment analysis

Twitter timelines are the new battlegrounds for brands, fans and organizations to fight it out and present a winner. Twitter is also a place where users usually rant about their disappointments or share their happiness. The dynamics of human interaction and our urge to share opinionated views on wide ranging topics, from cat pictures to wars and everything in between, have reached an altogether different level.

With its 300 million plus users and counting, Twitter is a virtual country in itself! Its huge user base which generates tweets (or opinions) by the count of millions every minute present a unique opportunity to study and utilize human sentiment and/or opinions. This study of our sentiments and emotion carries a lot more value than just pure academic research (which is, of course, still required by any standards). It carries a lot of business value for companies, governments and celebrities alike.

Before we dive into implementation details and a particular use case...

Follower graph analysis

So far, we have analyzed Twitter and tweets to uncover some interesting insights using techniques and concepts of trend analysis and sentiment analysis. We've utilized different attributes of tweets, like creation time, location and even the text itself, to answer certain questions. In this section, we will touch upon Twitter's network aspects. #BraceYourSelves

A social network is a network or a graph at its core. In formal words, a social network is generally a graph representing its users as nodes (or vertices) linked to each other based on certain relationships called edges. Each social network has its own definition of these relationships. For this section, we will focus on Twitter's relationships and network in general.

In Twitter-verse as we all know, there are no friends! A friend relationship is usually a bidirectional relationship, that is, if A is a friend of B, then it is safe to say that B is also a friend of A (well, usually; see Facebook...

Summary

A tweet is far more than just 140 characters, and Twitter offers quite a lot to play with for a social network. We covered a lot of ground in this chapter by looking at many concepts and solving use cases based on real Twitter data. We learned about different Twitter objects and its APIs. We created an app of our own and utilized R's twitteR package to connect and tap into its APIs. We performed trend analysis to understand how a hashtag is used by tweeple and its temporal affects. We also solved a use case involving sentiment analysis. Through this use case, we first understood the key concepts related to sentiment analysis and then employed them to understand what emotions @POTUS conveys through his tweets. We also performed hierarchical clustering of tweets to visualize common themes using a dendrogram. The final use case analyzed Twitter from a network/graph analysis stand point. We utilized R's different libraries to prepare a network map of followers and perform...

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • A practical guide written to help leverage the power of the R eco-system to extract, process, analyze, visualize and model social media data
  • Learn about data access, retrieval, cleaning, and curation methods for data originating from various social media platforms.
  • Visualize and analyze data from social media platforms to understand and model complex relationships using various concepts and techniques such as Sentiment Analysis, Topic Modeling, Text Summarization, Recommendation Systems, Social Network Analysis, Classification, and Clustering.

Description

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.

Who is this book for?

It is targeted at IT professionals, Data Scientists, Analysts, Developers, Machine Learning Enthusiasts, social media marketers and anyone with a keen interest in data, analytics, and generating insights from social data. Some background experience in R would be helpful, but not necessary, since this book is written keeping in mind, that readers can have varying levels of expertise.

What you will learn

  • Learn how to tap into data from diverse social media platforms using the R ecosystem
  • Use social media data to formulate and solve real-world problems
  • Analyze user social networks and communities using concepts from graph theory and network analysis
  • Learn to detect opinion and sentiment, extract themes, topics, and trends from unstructured noisy text data from diverse social media channels
  • Understand the art of representing actionable insights with effective visualizations
  • Analyze data from major social media channels such as Twitter, Facebook, Flickr, Foursquare, Github, StackExchange, and so on
  • Learn to leverage popular R packages such as ggplot2, topicmodels, caret, e1071, tm, wordcloud, twittR, Rfacebook, dplyr, reshape2, and many more

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : May 26, 2017
Length: 394 pages
Edition : 1st
Language : English
ISBN-13 : 9781787127524
Category :
Languages :
Concepts :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : May 26, 2017
Length: 394 pages
Edition : 1st
Language : English
ISBN-13 : 9781787127524
Category :
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 125.97
Mastering Machine Learning with R, Second Edition
€41.99
Machine Learning with R Cookbook, Second Edition
€41.99
Learning Social Media Analytics with R
€41.99
Total 125.97 Stars icon
Banner background image

Table of Contents

9 Chapters
1. Getting Started with R and Social Media Analytics Chevron down icon Chevron up icon
2. Twitter – What's Happening with 140 Characters Chevron down icon Chevron up icon
3. Analyzing Social Networks and Brand Engagements with Facebook Chevron down icon Chevron up icon
4. Foursquare – Are You Checked in Yet? Chevron down icon Chevron up icon
5. Analyzing Software Collaboration Trends I – Social Coding with GitHub Chevron down icon Chevron up icon
6. Analyzing Software Collaboration Trends II - Answering Your Questions with StackExchange Chevron down icon Chevron up icon
7. Believe What You See – Flickr Data Analysis Chevron down icon Chevron up icon
8. News – The Collective Social Media! Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Full star icon 5
(4 Ratings)
5 star 100%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
Amazon Customer Jun 11, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
One of the few books covering detailed use-cases and analytics on over 5-6 major social media platforms. I have read several books and blogs on social media mining but the current offerings had been lacking based on either content or problems showcased. This one definitely has a lot of examples and code which helps you get started with hands-on analysis yourself. Only con would be I wish there was an equivalent of this book in Python
Amazon Verified review Amazon
Swati Jul 28, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Well structured content with variety of examples and visualizations. Still going through the chapters. Best part: analysis for social networks is not available in other books/blogs eg stack exchange n foursquare
Amazon Verified review Amazon
Dhiraj Baurisetty Jul 19, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Really good book with a very deep insight into R.... Love to recommend it
Amazon Verified review Amazon
Amazon Customer Jun 11, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is a good read which covers mining info from multiple social media websites and apps. Really liked the coverage from normal analysis and visualizations to advanced methods like text mining and recommendations. Overall a great book if you are into R and want to analyze data from social websites.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.