egonetworks – Python package for Ego network structural analysis¶
This package contains classes and functions for the structural analysis of ego networks.
An ego network is a simple model that represents a social network from the point of view of an individual. This model considers only the social relationships that a focal node in the network (termed ego) maintains with other nodes (termed alters). Note that the model supported by this package does not consider relationships between alters (aka mutual friendship relationships), but only the star topology of alters connected to the ego. This ego network model is known as “Dunbar’s ego network”. See [1] and [2] for additional information about ego networks and ego network analysis.
The package offers several methods for the static and dynamic analysis of ego networks. For example, the package provides a function to obtain the “social circles” of the ego network, which are discrete groups of alters at similar level of tie strength with the ego. In addition, there are functions to analyse the dynamic evolution of ego networks and to calculate their stability over time. These functions are useful, for example, for the analysis of human behaviour in different social environments as well as to identify particularly active, dynamic or sociable people from their communication traces.
The package offers specialised classes for building and studying ego networks from Twitter data and from coauthorship or collaboration networks (i.e. networks where the ego is an author and the alters are people with whom he or she coauthored publications).
These are the main modules of the package:
egonetworks.core – Basic ego network classes and functions¶
This is the main module of the package and contains the basic ego network models and functions for ego network analysis.
The main class of the module is the abstract class egonetworks.core.EgoNetwork
. This contains the
data structures to represent generic social relationship between people (specified by a list of alter identifiers and
the frequencies of contact between the ego and these alters). In addition, the class provides the main methods for the
static and dynamic analysis of ego networks. For example,
egonetworks.core.EgoNetwork.get_optimal_num_circles
returns the optimal number of ego network circles
of the ego network, and egonetworks.core.EgoNetwork.get_circles_properties
returns the properties of
the circles given their number a priori.
Note that egonetworks.core.EgoNetwork
cannot be instantiated directly. Its main implementation, within this
module, are egonetworks.core.FrequencyEgoNetwork
and egonetworks.core.ContactEgoNetwork
. The
former class implements methods to add relationships to the ego network by specifying contact frequencies directly,
whereas the latter implements methods to add single social contacts (i.e. interactions involving communication between
the ego and the alters such as text messages or online posts) to the ego network. In
egonetworks.core.ContactEgoNetwork
, contact frequencies are calculated automatically from social contacts.
These are the definitions of the objects returned (or required as arguments) by some of the methods of the classes in this module:
egonetworks.twitter – Twitter ego networks¶
This module contains classes and methods to build and analyse ego networks from Twitter data.
These are the main classes of the module:
egonetworks.coauthorship – Coauthorship ego networks¶
This module contains classes and methods to build and analyse ego networks from coauthorship data.
These are the main classes of the module:
egonetworks.generic – Generic classes and functions¶
This module contains generic classes and functions that are used by other classes in the package.
These are the main classes of the module:
egonetworks.similarity – similarity and dissimilarity measures¶
This module contains similarity and dissimilarity measures of lists.
These are the main methods of the module:
egonetworks.error – Exceptions¶
The egonetworks.error module defines the exception classes for exceptions raised by classes of egonetworks package.
These are the main exceptions of the module:
References¶
[1] | R.I.M. Dunbar, V. Arnaboldi, M. Conti, A. Passarella, “The Structure of Online Social Networks Mirrors Those in the Offline World”, Social Networks, Vol. 43, October 2015, Pages 39-47 |
[2] |
|