Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Network Science with Python and NetworkX Quick Start Guide
Network Science with Python and NetworkX Quick Start Guide

Network Science with Python and NetworkX Quick Start Guide: Explore and visualize network data effectively

eBook
€8.99 €19.99
Paperback
€24.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Network Science with Python and NetworkX Quick Start Guide

What is a Network?

In 1736, a Swiss mathematician pondered routes for a sightseeing trip along the Pregel River in Königsberg. In 1880, an Italian painter turned zoologist sought to settle a hotly-contested controversy: whether or not birds protect crops by reducing insect populations. In 1932, the superintendent of a girls' reformatory school in Hudson, New York, hired a sociologist to investigate the cause of a recent wave of runaways. In 1955, a U.S. Army General and a mathematician developed a technique for identifying bottlenecks in the Soviet railway system. And, in 1998, two mathematicians in Ithaca, New York tried to figure out (among other things) why exactly all movie stars seem to be connected by Kevin Bacon.

These puzzles, taking place at different times and different places, might, at first glance, appear unrelated. But they have one thing in common: they all revolve around relationships – between people, between places, or between species – and they were all solved using the science of relationships, which has come to be known as network science. Interest in network science has grown considerably in recent years, as online social network platforms, such as Facebook, Twitter, WeChat, and Mastodon, have become increasingly popular.

This book covers the fundamental concepts of network science, as well as how to put them into practice using the Python-based NetworkX package. Part I (Chapter 1, What is a Network?, to Chapter 4, Affiliation Networks) introduces the concept of a network, as well as how to build, manipulate, and visualize networks in NetworkX. Part II (Chapter 5, The Small Scale – Nodes and Centrality, to Chapter 7, In-Between – Communities) demonstrates how to analyze network structure at various scales. Part III (Chapter 8, Social Networks and Going Viral, to Chapter 11, Visualization) applies network science to understanding complex systems using modeling, simulation, and visualization. In this introductory chapter, you'll learn some of the history of network science and the differences between common types of networks. You'll also see examples of different ways that relationships in a network can be interpreted. Finally, you'll get to build and visualize your first network using NetworkX!

In this chapter, we will cover the following topics:

  • Network science: Learn the history of the study of networks.
  • What is a network?: Understand the fundamental concepts of network science.
  • What is NetworkX?: Getting familiar with the NetworkX Python package.
  • Types of networks: Meet common variants of networks, and understand their applications.
  • Your first network in NetworkX: Try a simple example.

Network science

The origins of network science trace back to many different fields. For the most part, researchers in these fields developed the tools and methods of network science without much knowledge of how it was being applied in other fields. It may seem astonishing that scientists working independently in very different fields could develop tools and techniques similar enough to now be considered a single field.

How did this happen? The answer lies in one insight: sometimes, it is useful to study the relationships between things without worrying about the specifics of what those things are. Network scientists didn't study networks for their own sake* – they studied networks in order to better understand people, animal species, atoms, and so on. (* Except for mathematicians. We like to think about weird abstract concepts such as networks just for fun.)

When the specifics of the people/species/atoms being studied were abstracted away, seemingly different problems suddenly became very similar. And that's the power of network science; it provides a general language to talk about relationships and connections, allowing discoveries about one thing to be translated into useful information about many other types of things.

The history of network science

The earliest work recognizable as network science came from the branch of mathematics known as graph theory. Graph theory originated with Leonhard Euler's 1736 solution (Euler, 1953) to the seven bridges problem. At the time, the city of Königsberg, Prussia (now Kaliningrad, Russia) had seven bridges connecting the banks of the Pregel River to two islands (pictured as follows). It was not known whether it was possible to find a path through the city that crossed every bridge exactly once. Euler showed that it was impossible, and he did so using new methods that became the basis for graph theory, and later for network science.

Leonhard Euler was a prolific 18th century mathematician. His surname is pronounced "oiler" (and his work does indeed lubricate the gears of modern mathematics). He is perhaps best remembered by his namesake: Euler's number, e 2.7 (which, confusingly, was discovered by Jacob Bernoulli):
Seventeenth-century Königsberg and its seven bridges

The study of networks also has a rich history in sociology. The sociologists, Jacob L. Moreno and Helen Hall Jennings proposed tools for the quantitative study of interpersonal relationships, which they called sociometry (Moreno & Jennings, 1934). These tools included the sociogram, a graphical representation of social networks very similar to the type of network diagrams currently in use.

When Moreno was hired by Fannie French Morse, superintendent of the New York Training School for Girls, to investigate a wave of runaways, it was sociograms that allowed him to visualize and communicate the nature of the social forces driving the runaways. Many of the tools used in modern network science—centrality, affiliation networks, community detection, and others—come from sociology. Over the past several decades, sociometry has branched into social network analysis, a rich and active subfield within network science.

Sociology is the science concerned with how individuals and their interactions produce institutions and societies. Networks are used in sociology to represent and quantify the relationships between individuals.

Various other fields have found it useful to study network structure, and have shared their tools and findings with each other as part of the interdisciplinary complex systems community. Ecologists study food webs—relationships between predator and prey species. Biologists study networks of interactions between genes. Physicists study magnetic interactions between neighboring atoms in crystals. All of these fields are doing exciting work with network science.

Complex systems are those that arise from the interactions of simpler components, for example, traffic from cars, stock markets from stock trades, and ecologies from species. Networks are used to analyze and study the interrelationships between components.

And then, of course, there's the internet. The internet itself is literally a network—computers and routers connected to each other by copper wire, fiber optic cables, and so on. But, on top of that, the content on the internet is also networked. Links between web pages form networks, and online social networks allow people to interact by friending or following each other. The Google search engine was founded on the PageRank algorithm (Page et al., 1999), a network-science-based approach to identifying popular websites. Online social networks typically make money by selling advertising space, and using network science to show ads to the people most likely to click on them. If you see a picture of a cute cat online, you can use network science to understand how the picture got to your computer screen, how the picture connects you with your friends, and what the picture tells you about other sites you might like to visit.

Online activity leaves digital trace data—records of activity stored in logs and databases. Digital trace data can often be used to construct networks of relationships between individuals. From these networks, it is surprisingly easy to predict many things, such as purchasing preferences (Zhang & Pennacchiotti, 2013), political ideology (Cohen & Ruths, 2013), and even sexual orientation (Jernigan & Mistree, 2009). The powerful techniques available for such data raises both exciting possibilities and complex ethical considerations.

Network science today

With its interdisciplinary nature, network science draws practitioners from a wide variety of backgrounds. At the time of writing this book, only a handful of universities offer programs dedicated to network science, so network scientists tend to be self-taught, or trained as sociologists, physicists, ecologists, and so on. My own path to network science was similarly convoluted. Once an aspiring physicist, I came to realize I cared more about people than atoms, and left grad school to work on technology for civic organizing. When I eventually came across network science, I was excited to find that it was a powerful tool for understanding group behavior, and that the skills I'd learned from physics transferred directly to network science. Since then, I have been using network science to better understand how groups can organize and collaborate more effectively. Whatever your background, network science is a place where everyone fits in because no one fits in.

Network science has experienced rapid growth in recent years, in part due to the popularity of online social networks, digital trace data, and tools such as NetworkX. Once scattered across many different fields, universities are now creating research centers and Ph.D. programs specifically dedicated to network science. Companies have rushed to hire data scientists, including network scientists. There has never been a better time to explore the delightful world of network data.

What is a network?

If you walk down into the Kendall Square subway station in Cambridge, Massachusetts, through the turnstiles and past the Paul Matisse art installation, you will see a common feature of all subways: a map.

If you have ever used a subway map, you know that they are not quite like other maps, which tend to be concerned with details like distance and terrain. Subway maps leave all that out, showing you the bare minimum you need to know to get from one place to another: which stations are connected to each other.

When you're using a subway, it doesn't matter how long a stretch of track is, what exact direction it goes in, or even whether it is above ground, underground, or under water. All you have to do is get on at one station and get off at another, possibly with some transfers between the two. Such a map is an excellent example of the types of networks used by network scientists.

Nodes and edges

In network science, a network is simply a set of things and the connections between them. The things are called nodes, and the connections are called edges. Nodes are really just placeholders for any type of thing that can have a connection or relationship, such as subway stations, people, or atoms. Similarly, edges are placeholders for connections or relationships, such as subway tracks, friendships, or molecular bonds. Just like the subway map, representing a system as a network strips away a lot of information, making it possible to focus just on the structure.

Sometimes, you might see nodes called vertices, or edges called links. Mathematicians like vertices and edges, while computer scientists prefer nodes and links. NetworkX uses nodes and edges (perhaps as a compromise?), so I will use that terminology in this book.

Visualizing networks

Networks are often visualized by drawing a dot or circle for each node and a line for each edge, as in the following diagram:

Example network with five nodes

Looking at the network in this diagram, you might as yourself where to draw the nodes. The answer is wherever you want! (Although technically possible, it might be advisable to avoid hot surfaces, the mouths of large predatory animals, and/or important historical documents.) Because networks are meant to focus on structure and connectivity, there are many ways to draw the same network. Nodes can be drawn anywhere. Edges can be straight or squiggly, long or short. Edges can even cross, but that should never be interpreted as being connected to each other!

The same network can be drawn in many other ways, as shown in the following diagram. The nodes have been labelled with letters to make it easier to compare between different network diagrams. Regardless of which diagram you look at, any particular node will be connected to the same set of other nodes. While different ways of drawing the same network are equally correct, some may be helpful at highlighting particular features of the network. Chapter 11, Visualization, describes common approaches to visualizing networks and their various applications:

Equivalent networks

What is NetworkX?

Remember NetworkX? This is a book about NetworkX. NetworkX is a Python package for modeling, analyzing, and visualizing networks. It provides classes to represent several types of networks and implementations of many of the algorithms used in network science. NetworkX is relatively easy to install and use, and has much of the functionality built-in, so it is ideal for learning network science and performing analyses on small or medium sized networks. There is excellent documentation available on the project website at https://networkx.github.io/.

At the time of writing, NetworkX is in version 2.3. While many things are exactly the same between 1.x versions and 2.x, some basic functionality has changed, so documentation and books relating to older versions may no longer be accurate. This book assumes versions at or above 2.3, so all examples here should work with recent versions of NetworkX.

NetworkX is Free and Open Source Software (FOSS). That means that the source code is available to read, modify, and redistribute (under certain conditions). The code itself is available at https://github.com/networkx/networkx. In addition to the original authors and project maintainers, NetworkX has been written by a community of dozens of contributors. If you have an idea for a new feature or a way to improve the software, you can write it yourself and contribute it back to the community.

When contributing to FOSS projects, it is good etiquette to read the contributor guidelines. These guidelines help project contributors collaborate effectively, avoid conflicting changes, and ensure reliability of the software.

Types of networks

The networks presented in this chapter so far have just the bare essentials. These networks are called simple networks because, well, they are simple. In NetworkX, simple networks are represented by the Graph class, described in detail in Chapter 2, Working with Networks in NetworkX.

The name Graph comes from the term used in math to describe networks. You'd think it would mean a picture or drawing, but in this case, it just means a network. Mathematicians often use everyday words in very specific ways that are quite different from their everyday meanings, for example, "graph", "bundle", "ring", and "clearly".

Directed networks

Sometimes, it helps to add just a little more detail to a network. The edges we've seen so far don't have any sense of coming from or going to; they are simply connections between two nodes, so they are called symmetric or undirected.

Imagine a network that represents a system of roads (edges) and intersections (nodes). A network with undirected edges would be a good representation, until you came across a one-way street. An undirected edge suggests that you can travel in either direction equally well, while in reality, driving against traffic is likely to be a rather different experience from driving with it.

When direction matters, a network is called directed. In a directed network, each edge has a source node and a target node. Typically, the edge represents a flow of some kind, for example, traffic, from the source to the target. But what if not all connections are one-way? Easy! Two-way connections are made by combining two directed edges going in opposite directions. In directed networks, edges are drawn with arrows pointing toward the target, as shown in the following diagram. In NetworkX, directed networks are represented by the DiGraph class, also described in Chapter 2, Working with Networks in NetworkX:

Example of a directed network

Weighted networks

Returning to the case of undirected networks, sometimes, not all edges are created equal. For example, in a network representing a city's water distribution system, the edges could represent a series of tubes that carry the water from one place to another. Some of these might have greater capacity than others. When edges can have different strengths, the network is called weighted, and the strength is quantified by a number called the weight. Both directed and undirected networks can be weighted. An example of a weighted network is shown in the following diagram. When visualizing a network, edge weights are often indicated by varying the thickness or opacity of the edge. Edge weights can be used to represent many different types of attributes. The most common ones are described in the next section:

Example of a weighted network

Understanding edges

Edges represent the connections and relationships that make a network. The edges and their weights can have different interpretations, depending on what the network represents. Some common interpretations include the following:

  • Friendships
  • Flows
  • Similarity
  • Distance

Social networks

In social networks, edges most often represent friendship or other interpersonal relationships. Edge weights then represent the strength of the friendship, for example, time spent together, messages exchanged, or the number of common interests.

Flow networks

Flow networks describe the movement of something (people, information, fluid, and so on) from place to place. Edge weights might represent capacity—the maximum amount that can be transported between two nodes—or the actual amount that has traveled through/across the connection.

Similarity networks

In similarity networks, connections are less literal and more abstract. Edge weights correspond to how similar two nodes are, often with zero being not at all, and one being identical. For example, one type of similarity between different people could be calculated by taking their top-10 favorite online cat videos and using the fraction of videos that appear for both people. In this case, the edge weight doesn't have anything to do with whether two people have any kind of relationship. It's quite possible to have an edge with a very high weight connecting two individuals who have never even met!

Spatial networks

Edges can also represent distance (or closeness), especially when nodes represent locations in space. When using edge weights to represent distance, the distance of an entire trip can be calculated by adding together all of the edge weights along a path. Using edge weights to represent distance can sometimes be confusing because a larger number means a weaker connection, and non-existent edges are actually edges with an infinite weight. Sometimes, it can be more intuitive to use a measure of closeness, such as the reciprocal of the distance, although that can complicate working with paths across many edges.

The previous examples cover many of the common applications of networks, but they are by no means exhaustive. Whenever a group of things can have any type of relationship or connection with each other, it is possible to capture the structure of those connections using a network.

Your first network in NetworkX

Now, let's create and visualize a small network using NetworkX! For the code in this book, you will need Python 3.4 or higher and NetworkX 2.2 or greater. I also highly recommend Jupyter Lab as an interactive Python environment. The code in this book is available as Jupyter notebooks at https://github.com/PacktPublishing/Network-Science-with-Python-and-NetworkX-Quick-Start-Guide.

The code in this book was written using NetworkX 2.3. At time of writing, NetworkX 2.3 is available but has not been officially released. All of the examples will work with NetworkX 2.2, but may have minor differences in node color and formatting.

The following example creates an undirected, unweighted network, adds edges and nodes, and then generates a visualization. Other types of networks will be discussed in Chapter 2, Working with Networks in NetworkX. First, we import the networkx package. In this book, I will use the convention of importing the library with the alias nx:

import networkx as nx

Next, we create a Graph object, representing an undirected network, given as follows:

G = nx.Graph()

Now that the graph exists, we can add nodes one at a time with the add_node() method, or all at once with add_nodes_from(). When adding nodes to a network, each node has to have a unique ID. The ID can be a number, a string, or a tuple. In fact, you can use any Python object as an ID, as long as it has a __hash__() method defined. For this example, we'll use letters as node IDs, shown as follows:

G.add_node('A')
G.add_nodes_from(['B', 'C'])

Similarly, edges can be added one at a time with add_edge(), or all at once with add_edges_from(), shown as follows:

G.add_edge('A', 'B')
G.add_edges_from([('B', 'C'), ('A', 'C')])

So far, the A, B, and C nodes, as well as the edges connecting them, have been added. The following code draws a simple visualization of the network:

plt.figure(figsize=(7.5, 7.5))
nx.draw_networkx(G)
plt.show()

In the preceding code, figure() is used to create a 7.5 by 7.5 inch figure, which will hold the visualization. The draw_networkx() function uses the Graph object G to produce a visualization. The show() function renders the visualization, but can be omitted if you are running the examples in Jupyter Lab. The visualization should appear similar to the following:

Output of draw_networkx()
NetworkX has several functions for visualizing networks, each of which allows you to customize the visualization style. Some of these functions and parameters are discussed over the remaining chapters, in particular Chapter 11, Visualization.

Your visualization may look slightly different from the one shown previously. This is because visualizations in NetworkX sometimes use randomized algorithms. The randomized algorithms can be configured to produce the same output each time by setting the random seed. The following code sets the random seeds used by NetworkX (this code will also appear at the beginning of the example code for all future chapters):

import random
from numpy import random as nprand
seed = hash("Network Science in Python") % 2**32
nprand.seed(seed)
random.seed(seed)
The pyplot figure() function is used in the preceding code to set the size of the visualization figure, but doing that each time can be tedious. Instead, it is possible to set the default figure size as follows:

plt.rcParams.update({'figure.figsize': (7.5, 7.5)})

Nodes can also be added using a nifty shortcut. If you try to add an edge referring to a node ID that isn't in the network, NetworkX will automatically add the node! So, in practice, you won't often need to call add_node() directly. The following code adds nodes and edges so that the network matches the example network from earlier and creates a new visualization:

G.add_edges_from([('B', 'D'), ('C', 'E')]) 
nx.draw_networkx(G)

The draw_networkx() function now produces a visualization including the new D and E nodes:

Output of draw_networkx() after adding nodes

Summary

From the bridges of 17th century Königsberg to the internet, network science emerged from a diverse range of fields, all seeking to quantify and study relationships of some kind. The networks in network science model relationships as edges between nodes, which can represent anything from a species of flower, to an atom in a crystal, to an individual in a society. To quantify properties of relationships, edges can be directed and/or weighted. NetworkX provides Python classes and functions to create and manipulate such networks with ease. By now, you should have a sense of the types of problems network science and NetworkX can solve. The following chapters will cover various applications of network science as well as related features of NetworkX, with examples of how they can be applied to real datasets.

References

The following is a list of resources that you can consider to get further knowledge:

  • Cohen, R., & Ruths, D. (2013). Classifying political orientation on Twitter: It's not easy!. In Seventh International AAAI Conference on Weblogs and Social Media.
  • Euler, L. (1953). Leonhard Euler and the Königsberg bridges. Scientific American, 189(1).
  • Jernigan, C., & Mistree, B. F. (2009). Gaydar: Facebook friendships expose sexual orientation. First Monday, 14(10).
  • Moreno, J. L., & Jennings, H. H. (1934). Who Shall Survive? Nervous and Mental Disease.
  • Page, L., Brin, S., Motwani, R., & Winograd, T. (1999). The PageRank citation ranking: Bringing order to the web. Stanford InfoLab.
  • Zhang, Y., & Pennacchiotti, M. (2013, May). Predicting purchase behaviors from social media. In Proceedings of the 22nd international conference on World Wide Web. ACM.
Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Understand the terminology and basic concepts of network science
  • Leverage the power of Python and NetworkX to represent data as a network
  • Apply common techniques for working with network data of varying sizes

Description

NetworkX is a leading free and open source package used for network science with the Python programming language. NetworkX can track properties of individuals and relationships, find communities, analyze resilience, detect key network locations, and perform a wide range of important tasks. With the recent release of version 2, NetworkX has been updated to be more powerful and easy to use. If you’re a data scientist, engineer, or computational social scientist, this book will guide you in using the Python programming language to gain insights into real-world networks. Starting with the fundamentals, you’ll be introduced to the core concepts of network science, along with examples that use real-world data and Python code. This book will introduce you to theoretical concepts such as scale-free and small-world networks, centrality measures, and agent-based modeling. You’ll also be able to look for scale-free networks in real data and visualize a network using circular, directed, and shell layouts. By the end of this book, you’ll be able to choose appropriate network representations, use NetworkX to build and characterize networks, and uncover insights while working with real-world systems.

Who is this book for?

If you are a programmer or data scientist who wants to manipulate and analyze network data in Python, this book is perfect for you. Although prior knowledge of network science is not necessary, some Python programming experience will help you understand the concepts covered in the book easily.

What you will learn

  • Use Python and NetworkX to analyze the properties of individuals and relationships
  • Encode data in network nodes and edges using NetworkX
  • Manipulate, store, and summarize data in network nodes and edges
  • Visualize a network using circular, directed and shell layouts
  • Find out how simulating behavior on networks can give insights into real-world problems
  • Understand the ongoing impact of network science on society, and its ethical considerations

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 26, 2019
Length: 190 pages
Edition : 1st
Language : English
ISBN-13 : 9781789950410
Category :
Languages :
Concepts :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Apr 26, 2019
Length: 190 pages
Edition : 1st
Language : English
ISBN-13 : 9781789950410
Category :
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 79.97
Python Machine Learning Cookbook
€29.99
Python Data Mining Quick Start Guide
€24.99
Network Science with Python and NetworkX Quick Start Guide
€24.99
Total 79.97 Stars icon
Banner background image

Table of Contents

13 Chapters
What is a Network? Chevron down icon Chevron up icon
Working with Networks in NetworkX Chevron down icon Chevron up icon
From Data to Networks Chevron down icon Chevron up icon
Affiliation Networks Chevron down icon Chevron up icon
The Small Scale - Nodes and Centrality Chevron down icon Chevron up icon
The Big Picture - Describing Networks Chevron down icon Chevron up icon
In-Between - Communities Chevron down icon Chevron up icon
Social Networks and Going Viral Chevron down icon Chevron up icon
Simulation and Analysis Chevron down icon Chevron up icon
Networks in Space and Time Chevron down icon Chevron up icon
Visualization Chevron down icon Chevron up icon
Conclusion Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Full star icon Full star icon 5
(3 Ratings)
5 star 100%
4 star 0%
3 star 0%
2 star 0%
1 star 0%
Black May 09, 2020
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Excelente book for beginners.The codes are really helpful
Amazon Verified review Amazon
David E. Battey Oct 01, 2019
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This book does an excellent job of going from only a basic understanding of Python to all important aspects of NetworkX that are necessary for exploring and visualizing networks. There are excellent (and often humorous) examples, which were easy to run and understand. I used Jupyter Notebook, as recommended in the preface.I used this book for a Hackathon at work, and was able to quickly load up a data set that my team produces, which has different types of relationships between nodes, into a MultiDigraph. By adapting some of the examples in the book, I was able to create some pretty complex visualizations with very little effort.
Amazon Verified review Amazon
ajitB Mar 03, 2024
Full star icon Full star icon Full star icon Full star icon Full star icon 5
...makes this book the best book on use of NetworkX algo for understanding a wide variety of networks... social ones, economic ones, electrical ones ....and how to use many different metrics (e.g. Centrality) to understand what function these networks perform
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.