Skip to content

Add comprehensive NetworkX tutorials to exercise notebooks#1

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/restructure-notebook-for-networkx
Draft

Add comprehensive NetworkX tutorials to exercise notebooks#1
Copilot wants to merge 2 commits intomainfrom
copilot/restructure-notebook-for-networkx

Conversation

Copy link

Copilot AI commented Oct 24, 2025

Overview

This PR restructures the three main exercise notebooks by adding comprehensive NetworkX tutorial sections that explain key concepts and functions before students attempt the exercises. Previously, students were diving directly into exercises without reference material or explanations of the NetworkX functions they needed to use.

Changes

Added tutorial sections to three exercise notebooks:

📓 ex-1-2.ipynb (Complex Network Analysis - Parts 1 & 2)

  • Graph I/O and Basics Tutorial: Covers reading/writing graphs in various formats (edgelist, Pajek, GML, GraphML), graph types (directed, undirected, multigraphs), basic operations (add/remove nodes and edges), and graph comparisons
  • Connected Components and Subgraphs Tutorial: Explains connected components, strongly/weakly connected components for directed graphs, giant component extraction, subgraph creation, and network resilience analysis

📓 ex-3-4.ipynb (Complex Network Analysis - Parts 3 & 4)

  • Graph Visualization Tutorial: Details layout algorithms (spring, circular, random, shell, spectral, kamada-kawai), customizing node and edge appearance, coloring by properties, and drawing components separately
  • Degree Analysis Tutorial: Covers degree functions, degree distributions, statistical analysis, the friendship paradox concept, and rich club coefficient

📓 ex-6.ipynb (Complex Network Analysis - Part 6)

  • Assortativity, Clustering, Centrality, and Path Length Tutorial: Comprehensive coverage of assortativity measures, local and global clustering coefficients, multiple centrality measures (degree, betweenness, closeness, eigenvector, PageRank, Katz), path length metrics, and homophily analysis

Tutorial Features

Each tutorial section includes:

  • ✅ Clear explanations of concepts and when to use them
  • ✅ Practical code examples with function signatures
  • ✅ Links to official NetworkX documentation for deeper learning
  • ✅ Best practices and usage tips
  • ✅ Context that prepares students for the exercises that follow

Example

Before:

# Part 1: Reading graphs from files / writing graphs to files + graph basics

## Exercise 1: Graph Reading and Types
Load the Facebook dataset as both undirected and directed graphs...

After:

# Part 1: Reading graphs from files / writing graphs to files + graph basics

## NetworkX Tutorial: Graph I/O and Basics
Before starting the exercises, let's review the key NetworkX concepts...

### Reading and Writing Graphs
...code examples...

### Graph Types
...explanations and examples...

📚 References:
- [NetworkX I/O Documentation](https://networkx.org/...)

---

## Exercise 1: Graph Reading and Types
Load the Facebook dataset as both undirected and directed graphs...

Impact

This enhancement improves the learning experience by:

  • Providing reference material directly within the notebooks
  • Reducing frustration from not knowing which functions to use
  • Creating a clearer learning progression from tutorial to practice
  • Making the notebooks more self-contained and useful for review

Students can now learn NetworkX concepts and immediately apply them to exercises in the same notebook, following best practices for educational Jupyter notebook design.

Original prompt

Restructure the notebook adding corresponding networkx tutorials


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: andreafailla <77196675+andreafailla@users.noreply.github.com>
Copilot AI changed the title [WIP] Restructure notebook to include networkx tutorials Add comprehensive NetworkX tutorials to exercise notebooks Oct 24, 2025
Copilot AI requested a review from andreafailla October 24, 2025 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants