Reader small image

You're reading from  Network Science with Python

Product typeBook
Published inFeb 2023
PublisherPackt
ISBN-139781801073691
Edition1st Edition
Right arrow
Author (1)
David Knickerbocker
David Knickerbocker
author image
David Knickerbocker

David Knickerbocker is the chief engineer and co-founder of VAST-OSINT. He has over two decades of rich experience working with and around data in his career, with his focus being on data science, data engineering, software development, and cybersecurity.
Read more about David Knickerbocker

Right arrow

Network Analysis

In this chapter, I am going to describe three different topics, but at a very high level: graph theory, social network analysis, and network science. We will begin by discussing some of the confusion around the word network and why that will probably remain confusing. Then, we will go over a tiny bit of the past and present of all three. Finally, we will dive into how network analysis has helped me and hopefully how it can help you. This isn’t a code-heavy chapter. This is a high-level introduction.

The following topics will be discussed in this chapter:

  • The confusion behind networks
  • What is this network stuff?
  • Resources for learning network analysis
  • Common network use cases
  • Advanced network use cases
  • Getting started with networks

The confusion behind networks

First, to reduce confusion, if you see me mention NetworkX, that is not a typo. That is a Python library we will be making heavy use of in this book. Python is a very popular programming language.

I have worked in information technology (IT) my entire career, and have even gone farther than that. During some points of my career, I pursued security certifications such as Security+ and CISSP for job requirements, and I have constantly worked with other IT professionals, such as network engineers. So, believe me when I tell you that I understand the awkwardness that is involved in discussing network science with people who view networks as primarily based on TCP/IP and subnets.

Networks are all around us and even inside of us. In fact, our brain is the most complex thing we have found in the universe, as discussed in the book How to Create a Mind (Kurzweil, 2012). Our brain comprises of hundreds of billions of cells interlinked through trillions of...

What is this network stuff?

Let’s break things down a little further. I want to discuss the differences between graph theory, social network analysis, and network science separately. I am going to keep this very high level so that we can get to building as soon as possible. There are probably dozens of books available on Amazon if you want to dive deeper into any of these, and I personally probably have 10 or so books and will buy more as soon as I notice a new one is out.

Graph theory

There has been a lot of excitement about graph theory lately. I have noticed it the most in data science communities, but I have even seen database administrators and security professionals take an interest. Judging by the hype, one could assume that graph theory is something brand new, but it is actually hundreds of years old.

History and origins of graph theory

The history and origins of graph theory began in 1735, 286 years ago. Back then, there was a puzzle called The Seven Bridges...

Resources for learning about network analysis

So, what is needed to begin a journey into network thinking? I’ll give a few suggestions just to help you get started, but be aware that by the time this book has been published, some of this might already be a bit outdated and new technologies and techniques may have emerged. This is not a complete list. It is the bare minimum. The first thing that you need is a curious mind. If you are willing to investigate the hidden networks that make up our existence, then you already have the first prerequisite. Still, let me give you some more suggestions.

Notebook interfaces

I do all of my network analysis in Jupyter Notebooks. You can download and install Jupyter via Anaconda at: https://docs.anaconda.com/anaconda/install.

If you don’t want to install Jupyter, you can also use Google Colab without any installation. You can find and immediately start using Google Colab at https://research.google.com/colaboratory.

Rather...

Common network use cases

As I did in Chapter 1, Introducing Natural Language Processing, I will now also explain some of my own favorite use cases for working with network data. I mentioned at the beginning of the chapter that there are many different kinds of networks, but I personally prefer working with social networks and what I call dataflow networks.

Here are some of the uses I have for working with network data:

  • Mapping production dataflows
  • Mapping community interactions
  • Mapping literary social networks
  • Mapping historical social networks
  • Mapping language
  • Mapping dark networks

I will start with dataflow networks, as that was the first use case I realized for network data and something that revolutionized how I work.

Mapping production dataflow

As mentioned, this was the first idea that I had for my own use of network data. I have worked in software for over 20 years, and I have spent a significant amount of time “dissecting&...

Advanced network use cases

In Chapter 1, Introducing Natural Language Processing, I specified several advanced use cases for NLP, such as language translation and text generation. However, while thinking about network analysis, my mind immediately asked, what would an advanced network use case even mean? This is all pretty advanced stuff. With NLP, you have simple tasks, such as tokenization, lemmatization, and simple sentiment analysis (positive or negative, hate speech or not hate speech), and you have advanced tasks. With networks, I can think of three potentially advanced use cases:

  • Graph ML
  • Knowledge graphs
  • Recommendation systems

However, I don’t think of any of them as all that advanced. I think of them as just having different implementations from other things I have mentioned. Furthermore, just because something is more technically challenging does not make it advanced or more important. In fact, if it is more difficult and returns less useful...

Getting started with networks

If you want to jump into your first original network analysis project, you need to first think up something that you are curious about. With social network analysis, you are often looking to build a sociogram, a visual map of how humans interact. So, for your first network project, you could ask something such as the following:

  • How do the characters from <book> interact with each other?
  • Do the different animals in the book Animal Farm only interact with the same type of animals? Do humans only interact with certain types of animals, or do they interact with all types of animals?
  • What does the Twitterverse of my own town look like?
  • What does a network visualization of ingredients to meals look like? How does this differ for different regions in the world? What does a network visualization of ingredients to region look like?
  • What does the Twitter social network that exists around a certain politician look like? What does the...

Summary

We covered a lot of material in this short chapter. We discussed the confusion around the word network, went into the history and origins of graph theory, social network analysis, and network science, discussed resources for learning and practice, discussed some of my favorite network use cases, and finished by explaining how you can start formulating your own network research.

I hope this chapter gave you a rough idea of what all of this network stuff is. I know I did not go into great detail on the origins, and I mostly talked about social network analysis, but that is because that is my area of interest. I hope you now understand what networks can be used for, and I hope you understand that I have only scratched the surface. My goal was to ignite your curiosity.

In the next chapter, I will explain the tools used for NLP. We are going to gradually move past theory and into data science.

Further reading

  • Barabási, A.L. (2014). Linked. Basic Books.
  • Kurzweil, R. (2012). How to Create a Mind. Penguin Books.
  • Newman, M. (2018). Networks. Oxford University Press.
lock icon
The rest of the chapter is locked
You have been reading a chapter from
Network Science with Python
Published in: Feb 2023Publisher: PacktISBN-13: 9781801073691
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
David Knickerbocker

David Knickerbocker is the chief engineer and co-founder of VAST-OSINT. He has over two decades of rich experience working with and around data in his career, with his focus being on data science, data engineering, software development, and cybersecurity.
Read more about David Knickerbocker