Book Image

Python Social Media Analytics

By : Baihaqi Siregar, Siddhartha Chatterjee, Michal Krystyanczuk
Book Image

Python Social Media Analytics

By: Baihaqi Siregar, Siddhartha Chatterjee, Michal Krystyanczuk

Overview of this book

Social Media platforms such as Facebook, Twitter, Forums, Pinterest, and YouTube have become part of everyday life in a big way. However, these complex and noisy data streams pose a potent challenge to everyone when it comes to harnessing them properly and benefiting from them. This book will introduce you to the concept of social media analytics, and how you can leverage its capabilities to empower your business. Right from acquiring data from various social networking sources such as Twitter, Facebook, YouTube, Pinterest, and social forums, you will see how to clean data and make it ready for analytical operations using various Python APIs. This book explains how to structure the clean data obtained and store in MongoDB using PyMongo. You will also perform web scraping and visualize data using Scrappy and Beautifulsoup. Finally, you will be introduced to different techniques to perform analytics at scale for your social data on the cloud, using Python and Spark. By the end of this book, you will be able to utilize the power of Python to gain valuable insights from social media data and use them to enhance your business processes.
Table of Contents (17 chapters)
Title Page
About the Authors
About the Reviewer
Customer Feedback

Uncovering emotions

So far in the chapter, we have applied text analysis techniques to extract a lot of information about the Google brand page on Facebook. Now, we'll use some advanced techniques like emotion analysis to get more qualitative about the content. In order to achieve, this we'll be using the Alchemy API, which is now a part of IBM. The Alchemy API has an interesting set of tools that allow you to perform semantic analysis and natural language processing.

How to extract emotions?

We will now have a brief discussion on Emotion Extraction.

Introducing the Alchemy API

Alchemy API became a part of IBM Watson technology, which currently is offered on the Bluemix platform.

The service, called AlchemyLanguage, is a collection of text analysis functions that derive semantic information from your content. It can be accessed via API calls and a rich portfolio of methods.

Connecting to the Alchemy API

The authentication to the AlchemyLanguage API works by passing an API key as a query parameter...