Course contentsShow
← Data Science
Lesson 1316 of 2,14533. Advanced Visualization TechniquesFree lesson

Introduction to Network Graphs and Graph Theory Basics

Understanding nodes, edges, directed vs undirected graphs, and when network visualizations are appropriate for your data.

Introduction to Network Graphs and Graph Theory Basics

You'll learn: How to represent relationships between entities using network graphs and when to choose them over traditional visualizations.

What Are Network Graphs?

Network graphs visualize relationships between entities. Unlike scatter plots or bar charts that show measurements, network graphs show connections. Think of social networks (people connected by friendships), the internet (computers connected by links), or airline routes (cities connected by flights).

Core Components

Nodes (Vertices)

These are the entities in your network—people, websites, airports, proteins, or any discrete items. They're typically drawn as circles or points.

Edges (Links)

These are the connections between nodes—friendships, hyperlinks, flight routes, or interactions. They're drawn as lines connecting nodes.

Directed vs Undirected Graphs

Undirected graphs show symmetrical relationships. If Alice is Bob's friend, Bob is Alice's friend. The edge has no direction—it's mutual.

Directed graphs show asymmetrical relationships. If Alice follows Bob on Twitter, Bob doesn't automatically follow Alice back. Edges have arrows showing the direction of the relationship.

Think of undirected edges like hallways (you can walk both ways) and directed edges like one-way streets.

When to Use Network Visualizations

Network graphs are appropriate when:

  • Your primary question involves relationships or connections, not measurements
  • You want to identify clusters, influencers, or isolated entities
  • You're analyzing flows, hierarchies, or dependencies
  • Examples: organizational charts, citation networks, supply chains, disease transmission paths

They're not appropriate for showing distributions, trends over time, or comparing quantities across categories.

Key Takeaway: Network graphs use nodes and edges to visualize relationships; choose directed edges when connections have direction, undirected when they're mutual, and use them only when relationships matter more than measurements.