Make Money Online SOCIAL TRAFFIC Introduction to NetworkX in Python

Introduction to NetworkX in Python

Introduction to NetworkX in Python post thumbnail image


Python is a high-level, interpreted, general-purpose programming language, created on December 3, 1989, by Guido van Rossum, with a design philosophy entitled, “There’s only one way to do it, and that’s why it works.”

In the Python language, that means explicit is better than implicit. It also gives rise to the infamous Python telegraph pole analogy attributed to creator Guido van Rossum, which goes like this:

There is beauty in π because it is perfect. There is elegance in an all-numeric telephone keypad . . . I am attracted to the simpleness of a perfect poker face, and the serenity of perfect punctuation mark placement. Just as art to be appreciated and music to be enjoyed, Python was designed for humans to enjoy programming.”

With that in mind, let’s take a look at one of Python’s most elegant libraries, NetworkX.

NetworkX is a Python library for the creation, manipulation, and study of complex networks. NetworkX supports both directed and undirected graphs. It includes implementations of classic graph theory algorithms such as edge connectivity and shortest path algorithms.

NetworkX also has functions to generate random graphs according to classic probability models such as the Erdős–Rényi model and the Watts–Strogatz model. The core package provides data structures for representing many types of networks, or graphs, including simple graphs, directed graphs, and weighted graphs.

The software package also provides basic graph algorithms such as shortest path algorithms and algorithms for determining connectivity components. NetworkX can be extended through the use of plugins and custom node objects can be defined using direct subclassing ofnetworkx.Node.
The latest release of NetworkX can be installed from PyPI using pip:

pip install networkx

Documentation for NetworkX is available online at http://networkx.readthedocs.io/

Related Post