CHAPTER 19 Social Network Analytics1
In this chapter, we examine the basic ways to visualize and describe social networks, measure linkages, and analyze the network with both supervised and unsupervised techniques. The methods we use long predate the Internet, but gained widespread use with the explosion in social media data. Twitter, for example, makes its feed available for public analysis, and some other social media firms make some of their data available to programmers and developers via an application programming interface (API).
Python
In this chapter, we will use pandas and numpy for data handling. The networkx library specializes in manipulating and analyzing networks. It makes use of matplotlib to visualize network plots.
import required functionality for this chapter
import collections import pandas as pd import networkx as nx import matplotlib.pyplot as plt
19.1 Introduction2
The use of social media began its rapid growth in the early 2000s with the advent of Friendster and MySpace, and, in 2004, Facebook. LinkedIn, catering to professionals, soon followed, as did Twitter, Tumblr, Instagram, Yelp, TripAdvisor, and others. These information-based companies quickly began generating a deluge of data—especially data concerning links among people (friends, followers, connections, etc.).
For some companies, like Facebook, Twitter, and LinkedIn, nearly the entire ...
Get Data Mining for Business Analytics now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.