Analyzing twitter data

Analyzing Social Media Data in R

Sowmya Vivek

Data Science Coach

Course Overview

  • Extract and visualize twitter data
  • Analyze tweet text
  • Perform network analysis
  • View tweets on the map
  • Explore tweets on celebrities, brands, hot topics, and sports
Analyzing Social Media Data in R

Introduction to social media analysis

  • Collect data from social media websites
  • Analyze data to derive insights
  • Make improved business decisions

Social media analysis

Analyzing Social Media Data in R

About Twitter

Twitter logo

  • Social media platform
  • Short messages called tweets
  • Micro-blogging site
  • Information from tweets & tweet metadata
Analyzing Social Media Data in R

Power of twitter data

500 million tweets every day

Analyzing Social Media Data in R

Power of twitter data

330 million users every month

Analyzing Social Media Data in R

Power of twitter data

80 percent users are affluent millennials

Analyzing Social Media Data in R

Power of twitter data

11 percent more effective twitter ads

Analyzing Social Media Data in R

Power of twitter data

40 percent users purchased due to influencer tweets

Analyzing Social Media Data in R

Volume of tweets

  • Many functions available in R to extract tweets for analysis
  • stream_tweets() samples 1% of all publicly available tweets
  • Tweets extracted for a 30 second time interval by default
Analyzing Social Media Data in R

Volume of tweets

live_tweets <- stream_tweets("")
dim(live_tweets)
[1] 1047   90
Analyzing Social Media Data in R

Volume of tweets

live_tweets60 <- stream_tweets("", timeout = 60)
dim(live_tweets60)
[1] 3464   90
Analyzing Social Media Data in R

Applications of twitter data

Trending topics

Analyzing Social Media Data in R

Applications of twitter data

Customer opinion

Analyzing Social Media Data in R

Applications of twitter data

Public sentiment

Analyzing Social Media Data in R

Applications of twitter data

Reach

Analyzing Social Media Data in R

Applications of twitter data

Event detection

Analyzing Social Media Data in R

Advantages of twitter data

  • Twitter API is open and accessible
  • Easier to find conversations because of the hashtag norms
  • Since the length of tweets is limited, running algorithms is easy and controlled
Analyzing Social Media Data in R

Limitations of twitter data

  • Historical search is limited for a free account
  • A limited number of tweets extracted for a free account
  • 1% sample tweets extracted may not be accurate
  • Very small % of tweets have geographic tagging
Analyzing Social Media Data in R

Let's practice!

Analyzing Social Media Data in R

Preparing Video For Download...