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
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Python Social Media Analytics

You're reading from   Python Social Media Analytics Analyze and visualize data from Twitter, YouTube, GitHub, and more

Arrow left icon
Product type Paperback
Published in Jul 2017
Publisher Packt
ISBN-13 9781787121485
Length 312 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Authors (3):
Arrow left icon
Baihaqi Siregar Baihaqi Siregar
Author Profile Icon Baihaqi Siregar
Baihaqi Siregar
Siddhartha Chatterjee Siddhartha Chatterjee
Author Profile Icon Siddhartha Chatterjee
Siddhartha Chatterjee
Michal Krystyanczuk Michal Krystyanczuk
Author Profile Icon Michal Krystyanczuk
Michal Krystyanczuk
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Introduction to the Latest Social Media Landscape and Importance FREE CHAPTER 2. Harnessing Social Data - Connecting, Capturing, and Cleaning 3. Uncovering Brand Activity, Popularity, and Emotions on Facebook 4. Analyzing Twitter Using Sentiment Analysis and Entity Recognition 5. Campaigns and Consumer Reaction Analytics on YouTube – Structured and Unstructured 6. The Next Great Technology – Trends Mining on GitHub 7. Scraping and Extracting Conversational Topics on Internet Forums 8. Demystifying Pinterest through Network Analysis of Users Interests 9. Social Data Analytics at Scale – Spark and Amazon Web Services

Data pull


We start the analysis by selecting the channel and the video. For the purpose of this chapter we select the Sony PlayStation YouTube channel, as it is one of the most popular brands in the entertainment sector. We find its URL by performing a search on the YouTube search engine and get a result similar to the following: https://www.youtube.com/channel/UC-2Y8dQb0S6DtpxNgAKoJKA

The ID of the channel corresponds to the last element of the URL, which in this case is UC-2Y8dQb0S6DtpxNgAKoJKA.

In the first place, we will extract the videos with the most views to understand what kind of videos gather most interest from users. In order to perform this task we have to define two functions:

  • get_channel_videos(): A function to list all the videos associated with the channel
  • get_statistics(): A function that collects statistics (number of views, likes, dislikes) for a single video

It is required to split this part in two steps as there is no endpoint that retrieves all the videos for a channel...

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 $19.99/month. Cancel anytime
Banner background image