Mastering Social Media Mining with R
eBook - ePub

Mastering Social Media Mining with R

  1. 248 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Mastering Social Media Mining with R

About this book

Extract valuable data from your social media sites and make better business decisions using R

About This Book

  • Explore the social media APIs in R to capture data and tame it
  • Employ the machine learning capabilities of R to gain optimal business value
  • A hands-on guide with real-world examples to help you take advantage of the vast opportunities that come with social media data

Who This Book Is For

If you have basic knowledge of R in terms of its libraries and are aware of different machine learning techniques, this book is for you. Those with experience in data analysis who are interested in mining social media data will find this book useful.

What You Will Learn

  • Access APIs of popular social media sites and extract data
  • Perform sentiment analysis and identify trending topics
  • Measure CTR performance for social media campaigns
  • Implement exploratory data analysis and correlation analysis
  • Build a logistic regression model to detect spam messages
  • Construct clusters of pictures using the K-means algorithm and identify popular personalities and destinations
  • Develop recommendation systems using Collaborative Filtering and the Apriori algorithm

In Detail

With an increase in the number of users on the web, the content generated has increased substantially, bringing in the need to gain insights into the untapped gold mine that is social media data. For computational statistics, R has an advantage over other languages in providing readily-available data extraction and transformation packages, making it easier to carry out your ETL tasks. Along with this, its data visualization packages help users get a better understanding of the underlying data distributions while its range of "standard" statistical packages simplify analysis of the data.

This book will teach you how powerful business cases are solved by applying machine learning techniques on social media data. You will learn about important and recent developments in the field of social media, along with a few advanced topics such as Open Authorization (OAuth). Through practical examples, you will access data from R using APIs of various social media sites such as Twitter, Facebook, Instagram, GitHub, Foursquare, LinkedIn, Blogger, and other networks. We will provide you with detailed explanations on the implementation of various use cases using R programming.

With this handy guide, you will be ready to embark on your journey as an independent social media analyst.

Style and approach

This easy-to-follow guide is packed with hands-on, step-by-step examples that will enable you to convert your real-world social media data into useful, practical information.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Mastering Social Media Mining with R by Sharan Kumar Ravindran, Vikram Garg in PDF and/or ePUB format, as well as other popular books in Computer Science & Computer Science General. We have over one million books available in our catalogue for you to explore.

Mastering Social Media Mining with R


Table of Contents

Mastering Social Media Mining with R
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Fundamentals of Mining
Social media and its importance
Various social media platforms
Social media mining
Challenges for social media mining
Social media mining techniques
Graph mining
Text mining
The generic process of social media mining
Getting authentication from the social website – OAuth 2.0
Differences between OAuth and OAuth 2.0
Data visualization R packages
The simple word cloud
Sentiment analysis Wordcloud
Preprocessing and cleaning in R
Data modeling – the application of mining algorithms
Opinion mining (sentiment analysis)
Steps for sentiment analysis
Community detection via clustering
Result visualization
An example of social media mining
Summary
2. Mining Opinions, Exploring Trends, and More with Twitter
Twitter and its importance
Understanding Twitter's APIs
Twitter vocabulary
Creating a Twitter API connection
Creating a new app
Finding trending topics
Searching tweets
Twitter sentiment analysis
Collecting tweets as a corpus
Cleaning the corpus
Estimating sentiment (A)
Estimating sentiment (B)
Summary
3. Find Friends on Facebook
Creating an app on the Facebook platform
Rfacebook package installation and authentication
Installation
A closer look at how the package works
A basic analysis of your network
Network analysis and visualization
Social network analysis
Degree
Betweenness
Closeness
Cluster
Communities
Getting Facebook page data
Trending topics
Trend analysis
Influencers
Based on a single post
Based on multiple posts
Measuring CTR performance for a page
Spam detection
Implementing a spam detection algorithm
The order of stories on a user's home page
Recommendations to friends
Reading the output
Other business cases
Summary
4. Finding Popular Photos on Instagram
Creating an app on the Instagram platform
Installation and authentication of the instaR package
Accessing data from R
Searching public media for a specific hashtag
Searching public media from a specific location
Extracting public media of a user
Extracting user profile
Getting followers
Who does the user follow?
Getting comments
Number of times hashtag is used
Building a dataset
User profile
User media
Travel-related media
Who do they follow?
Popular personalities
Who has the most followers?
Who follows more people?
Who shared most media?
Overall top users
Most viral media
Finding the most popular destination
Locations
Locations with most likes
Locations most talked about
What are people saying about these locations?
Most repeating locations
Clustering the pictures
Recommendations to the users
How to do it
Top three recommendations
Improvements to the recommendation system
Business case
Reference
Summary
5. Let's Build Software with GitHub
Creating an app on GitHub
GitHub package installation and authentication
Accessing GitHub data from R
Building a heterogeneous dataset using the most active users
Data processing
Building additional metrics
Exploratory data analysis
EDA – graphical analysis
Which language is most popular among the active GitHub users?
What is the distribution of watchers, forks, and issues in GitHub?
How many repositories had issues?
What is the trend on updating repositories?
Compare users through heat map
EDA – correlation analysis
How Watchers is related to Forks
Correlation with regression line
Correlation with local regression curve
Correlation on segmented data
Correlation between the languages that user's use to code
How to get the trend of correlation?
Reference
Business cases
Summary
6. More Social Media Websites
Searching on social media
Accessing product reviews from sites
Retrieving data from Wikipedia
Using the Tumblr API
Accessing data from Quora
Mapping solutions using Google Maps
Professional network data from LinkedIn
Getting Blogger data
Retrieving venue data from Foursquare
Use cases
Yelp and other networks
Limitations
Summary
Index

Mastering Social Media Mining with R

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: September 2015
Production reference: 1180915
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-631-2
www.packtpub.com

Credits

Authors
Sharan Kumar Ravindran
Vikram Garg
Reviewers
Richard Iannone
Hasan Kurban
Mahbubul Majumder
Haichuan Wang
Commissioning Editor
Pramila Balan
Acquisition Editor
Rahul Nair
Content Development Editor
Susmita Sabat
Technical Editor
Manali Gonsalves
Copy Editor
Roshni Banerj...

Table of contents

  1. Mastering Social Media Mining with R