Learning Social Media Analytics with R
eBook - ePub

Learning Social Media Analytics with R

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

Learning Social Media Analytics with R

About this book

Tap into the realm of social media and unleash the power of analytics for data-driven insights using RAbout This Book• 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.Who This Book Is ForIt 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 moreIn DetailThe 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.Style and approachThis book follows a step-by-step approach with detailed strategies for understanding, extracting, analyzing, visualizing, and modeling data from several major social network platforms such as Facebook, Twitter, Foursquare, Flickr, Github, and StackExchange. The chapters cover several real-world use cases and leverage data science, machine learning, network analysis, and graph theory concepts along with the R ecosystem, including popular packages such as ggplot2, caret, dplyr, topicmodels, tm, and so on.

Information

Learning Social Media Analytics with R


Table of Contents

Learning Social Media Analytics with R
Credits
About the Author
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
Customer Feedback
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
Downloading the color images of this book
Errata
Piracy
Questions
1. Getting Started with R and Social Media Analytics
Understanding social media
Advantages and significance
Disadvantages and pitfalls
Social media analytics
A typical social media analytics workflow
Data access
Data processing and normalization
Data analysis
Insights
Opportunities
Challenges
Getting started with R
Environment setup
Data types
Data structures
Vectors
Arrays
Matrices
Lists
DataFrames
Functions
Built-in functions
User-defined functions
Controlling code flow
Looping constructs
Conditional constructs
Advanced operations
apply
lapply
sapply
tapply
mapply
Visualizing data
Next steps
Getting help
Managing packages
Data analytics
Analytics workflow
Machine learning
Machine learning techniques
Supervised learning
Unsupervised learning
Text analytics
Summary
2. Twitter – What's Happening with 140 Characters
Understanding Twitter
APIs
Registering an application
Connecting to Twitter using R
Extracting sample Tweets
Revisiting analytics workflow
Trend analysis
Sentiment analysis
Key concepts of sentiment analysis
Subjectivity
Sentiment polarity
Opinion summarization
Features
Sentiment analysis in R
Follower graph analysis
Challenges
Summary
3. Analyzing Social Networks and Brand Engagements with Facebook
Accessing Facebook data
Understanding the Graph API
Understanding Rfacebook
Understanding Netvizz
Data access challenges
Analyzing your personal social network
Basic descriptive statistics
Analyzing mutual interests
Build your friend network graph
Visualizing your friend network graph
Analyzing node properties
Degree
Closeness
Betweenness
Analyzing network communities
Cliques
Communities
Analyzing an English football social network
Basic descriptive statistics
Visualizing the network
Analyzing network properties
Diameter
Page distances
Density
Transitivity
Coreness
Analyzing node properties
Degree
Closeness
Betweenness
Visualizing correlation among centrality measures
Eigenvector centrality
PageRank
HITS authority score
Page neighbours
Analyzing network communities
Cliques
Communities
Analyzing English Football Club's brand page engagements
Getting the data
Curating the data
Visualizing post counts per page
Visualizing post counts by post type per page
Visualizing average likes by post type per page
Visualizing average shares by post type per page
Visualizing page engagement over time
Visualizing user engagement with page over time
Trending posts by user likes per page
Trending posts by user shares per page
Top influential users on popular page posts
Summary
4. Foursquare – Are You Checked in Yet?
Foursquare – the app and data
Foursquare APIs – show me the data
Creating an application – let me in
Data access – the twist in the story
Handling JSON in R – the hidden art
Getting category data – introduction to JSON parsing and data extraction
Revisiting the analytics workflow
Category trend analysis
Getting the data – the usual hurdle
The required end point
Getting data for a city – geometry to the rescue
Analysis – the fun part
Basic descriptive statistics – the usual
Recommendation engine – let's open a restaurant
Recommendation engine – the clichés
Framing the recommendation problem
Building our restaurant recommender
The sentimental rankings
Extracting tips data – the go to step
The actual data
Analysis of tips
Basic descriptive statistics
The final rankings
Venue graph – where do people go next?
Challenges for Foursquare data analysis
Summary
5. Analyzing Software Collaboration Trends I – Social Coding with GitHub
Environment setup
Understanding GitHub
Accessing GitHub data
Using the rgithub package for data access
Registering an application on GitHub
Accessing data using the GitHub API
Analyzing repository activity
Analyzing weekly commit frequency
Analyzing commit frequency distribution versus day of the week
Analyzing daily commit frequency
Analyzing weekly commit frequency comparison
Analyzing weekly code modification history
Retrieving trending repositories
Analyzing repository trends
Analyzing trending repositories created over time
Analyzing trending repositories updated over time
Analyzing repository metrics
Visualizing repository metric distributions
Analyzing repository metric correlations
Analyzing relationship between stargazer and repository counts
Analyzing relationship between stargazer and fork counts
Analyzing relationship between total forks, repository count, and health
Analyzing language trends
Visualizing top trending languages
Visualizing top trending languages over time
Analyzing languages with the most open issues
Analyzing languages with the most open issues over time
Analyzing languages with the most helpful repositories
Analyzing languages with the highest popularity score
Analyzing language correlations
Analyzing user trends
Visualizing top contributing users
Analyzing user activity metrics
Summary
6. Analyzing Software Collaboration Trends II - Answering Your Questions with StackExchange
Understanding StackExchange
Data access
The StackExchange data dump
Accessing data dumps
Contents of data dumps
Quick overview of the data in data dumps
Posts
Users
Getting started with data dumps
Data Science and StackExchange
Demographics and data science
Challenges
Summary
7. Believe What You See – Flickr Data Analysis
A Flickr-ing world
Accessing Flickr's data
Creating the Flickr app
Connecting to R
Getting started with Flickr data
Understanding Flickr data
Understanding more about EXIF
Understanding interestingness – similarities
Finding K
Elbow method
Silhouette method
Are your photos interesting?
Preparing the data
Building the classifier
Challenges
Summary
8. News – The Collective Social Media!
News data – news is everywhere
Accessing news data
Creating applications for data access
Data extraction – not just an API call
The API call and JSON monster
HTML scraping from the links – the bigger monster
Sentiment trend analysis
Getting the data – not again
Basic descriptive statistics – the usual
Numerical sentiment trends
Emotion-based sentiment trends
Topic modeling
Getting to the data
Basic descriptive analysis
Topic modeling for Mr. Trump's phases
Cleaning the data
Pre-processing the data
The modeling part
Analysis of topics
Summarizing news articles
Document summarization
Understanding LexRank
Summarizing articles with lexRankr
Challenges to news data analysis
Summary
Index

Learning Social Media Analytics with R

Copyright © 2017 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 warrant...

Table of contents

  1. Learning Social Media Analytics with R

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 how to download books offline
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 990+ topics, we’ve got you covered! Learn about our mission
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 about Read Aloud
Yes! You can use the Perlego app on both iOS and 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 Learning Social Media Analytics with R by Raghav Bali, Dipanjan Sarkar, Tushar Sharma in PDF and/or ePUB format, as well as other popular books in Computer Science & Data Mining. We have over one million books available in our catalogue for you to explore.