Book Image

Mastering Social Media Mining with Python

By : Marco Bonzanini
Book Image

Mastering Social Media Mining with Python

By: Marco Bonzanini

Overview of this book

Your social media is filled with a wealth of hidden data – unlock it with the power of Python. Transform your understanding of your clients and customers when you use Python to solve the problems of understanding consumer behavior and turning raw data into actionable customer insights. This book will help you acquire and analyze data from leading social media sites. It will show you how to employ scientific Python tools to mine popular social websites such as Facebook, Twitter, Quora, and more. Explore the Python libraries used for social media mining, and get the tips, tricks, and insider insight you need to make the most of them. Discover how to develop data mining tools that use a social media API, and how to create your own data analysis projects using Python for clear insight from your social data.
Table of Contents (10 chapters)

Mining the conversation

After focusing on user profiles and how they are explicitly connected via follower/friend relationships, in this section, we will analyze a different type of interaction-the conversation. On Twitter, users can publish a tweet in reply to a particular piece of content. When two or more users follow up with this process, a proper conversation can unfold.

Figure 3.3 shows a conversation represented as a network. Each node of the network is a tweet (uniquely identified by its ID) and each edge represents a reply to relationship.

This type of relationship has an explicit direction as it can only go in one way (parent-child relationship). For example, if tweet 2 is a reply to tweet 1, we cannot see tweet 1 being a reply to tweet 2. The cardinality of this relationship is always one, meaning that a given tweet can be a reply to one and only one tweet (but we can have multiple tweets in reply to a given one, making the relationship a one-to-many). Moreover, cycles are not...