Skip to content

simoneSantoni/net-analysis-smm638

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Network Analytics (SMM638)

License: MIT Quarto R Python

This is the official repository for SMM638 - Network Analytics, an MSc module at City, University of London. The course teaches network analysis theory and practice using R and Python, with a focus on business and organizational applications.

🌐 Course Website: https://simonesantoni.github.io/net-analysis-smm638


πŸ“š About This Course

Networks are ubiquitous in modern life:

  • Job opportunities reach us through interpersonal connections
  • Social media content is shaped by our digital relationships
  • Market valuations emerge from social influence spreading across networks
  • Innovation diffuses through organizational and professional networks

This module provides students with cutting-edge network theories and practical analytical tools to understand the organization and functioning of diverse networks. The goal is to develop a distinctive perspective on how networks create value for individuals, organizations, and communities.


🎯 Learning Objectives

By the end of this module, students will be able to:

  1. Understand Network Properties

    • Analyze structural characteristics of networks (density, centralization, clustering)
    • Identify network substructures (dyads, triads, motifs)
    • Evaluate reciprocity and transitivity patterns
  2. Analyze Communities

    • Detect community structures using multiple algorithms
    • Evaluate community quality and overlap
    • Understand modularity and community evolution
  3. Assess Individual Positions

    • Calculate node centrality measures (degree, betweenness, closeness, eigenvector)
    • Identify influential nodes and structural holes
    • Analyze brokerage positions
  4. Visualize Networks

    • Create effective network visualizations
    • Choose appropriate layouts for different network types
    • Communicate network insights visually
  5. Apply Technical Skills

    • Use R packages: igraph, tidygraph, ggraph, network, sna
    • Use Python libraries: networkx, graph-tool, plotly, pyvis
    • Implement statistical tests for network properties
  6. Solve Real-World Problems

    • Apply network analytics to business challenges
    • Design recommendation systems
    • Analyze organizational structures
    • Study information diffusion

πŸ“ Repository Structure

net-analysis-smm638/
β”œβ”€β”€ website/                    # Quarto website source (PRIMARY)
β”‚   β”œβ”€β”€ weeks/                 # Weekly course materials
β”‚   β”‚   β”œβ”€β”€ week-1/           # Introduction to networks
β”‚   β”‚   β”œβ”€β”€ week-2/           # Network visualization
β”‚   β”‚   β”œβ”€β”€ week-3/           # Node centrality
β”‚   β”‚   β”œβ”€β”€ week-4/           # Dyads and triads
β”‚   β”‚   β”œβ”€β”€ week-5/           # Network dynamics & case study
β”‚   β”‚   β”œβ”€β”€ week-6/           # Community detection
β”‚   β”‚   └── week-7-10/        # Advanced topics
β”‚   β”œβ”€β”€ course/               # Course information
β”‚   β”‚   β”œβ”€β”€ syllabus.qmd      # Course syllabus
β”‚   β”‚   β”œβ”€β”€ schedule.qmd      # Weekly schedule
β”‚   β”‚   β”œβ”€β”€ support.qmd       # Office hours & help
β”‚   β”‚   └── team.qmd          # Teaching team
β”‚   β”œβ”€β”€ project/              # Course projects
β”‚   β”‚   β”œβ”€β”€ midTermProject/   # Mid-term project specs
β”‚   β”‚   └── finalCourseProject/ # Final project specs
β”‚   β”œβ”€β”€ _quarto.yml           # Website configuration
β”‚   β”œβ”€β”€ theme.scss            # Light theme
β”‚   β”œβ”€β”€ theme-dark.scss       # Dark theme
β”‚   └── _site/                # Generated website (auto-built)
β”‚
β”œβ”€β”€ data/                      # Network datasets
β”‚   β”œβ”€β”€ soundcloud/           # SoundCloud case study data
β”‚   β”œβ”€β”€ deezer/               # Music streaming network
β”‚   β”œβ”€β”€ twitch/               # Gaming platform network
β”‚   └── xoxoday/              # Employee network
β”‚
β”œβ”€β”€ tutorials/                 # Python tutorials
β”œβ”€β”€ finalCoursework/          # Final coursework materials
β”œβ”€β”€ CLAUDE.md                 # Repository guide for AI assistants
└── README.md                 # This file

πŸ†• Recent Updates

Week 5 (Latest)

  • πŸ“Š SoundCloud Case Study: Platform ecosystem analysis with network dynamics
  • πŸ“ˆ Network Properties Analysis: Comprehensive reciprocity and transitivity testing
    • Implemented Conditional Uniform Graph (CUG) tests
    • Statistical comparison with ErdΕ‘s-RΓ©nyi random graphs
    • Fixed package conflicts between sna and igraph
  • πŸ”§ Technical Improvements:
    • Added freeze: auto for reproducible builds
    • Resolved GitHub Actions deployment issues
    • Enhanced data visualization with course branding

Week 4

  • Dyads and Triads: Comprehensive analysis of network substructures
  • Structural Balance: Theory and practice of signed networks
  • Practical Exercises: Hands-on dyad census and triad census calculations

Week 3

  • Node Centrality: In-depth coverage of centrality measures
  • Interactive Visualizations: Custom network plots with ggraph
  • Practice Exercises: Centrality calculations on real networks

Week 1-2

  • Network Terminology Glossary: Interactive visualizations covering:
    • One-mode and two-mode networks
    • Directed vs undirected networks
    • Signed and weighted networks
  • Enhanced Materials: Updated with visual examples and case studies

πŸš€ Getting Started

Prerequisites

For R Users

# Install required R packages
install.packages(c(
  "tidyverse",      # Data manipulation and visualization
  "igraph",         # Network analysis
  "tidygraph",      # Tidy network manipulation
  "ggraph",         # Network visualization
  "network",        # Network objects
  "sna",            # Social network analysis
  "ergm",           # Exponential random graph models
  "intergraph"      # Convert between network formats
))

For Python Users

# Create conda environment
conda env create -f smm638.yaml
conda activate smm638

# Or install with pip
pip install numpy scipy matplotlib pandas networkx plotly pyvis

Building the Website Locally

# Clone the repository
git clone https://github.com/simonesantoni/net-analysis-smm638.git
cd net-analysis-smm638

# Navigate to website directory
cd website

# Render the entire website
quarto render

# Or preview with live reload
quarto preview

πŸ“– Course Content

Weekly Structure

Each week follows a consistent 5P framework:

  1. πŸ“š Prepare: Pre-class readings and materials
  2. πŸ‘₯ Participate: Interactive lectures and discussions
  3. πŸ’» Practice: Hands-on coding exercises
  4. πŸ“ Perform: Assessed assignments
  5. πŸ€” Ponder: Reflection questions and further reading

Core Topics

Week Topic Key Concepts
1 Introduction to Networks Network terminology, data structures, basic visualization
2 Network Visualization Layout algorithms, aesthetic principles, interactive plots
3 Node Centrality Degree, betweenness, closeness, eigenvector centrality
4 Dyads & Triads Subgraph analysis, structural balance, transitivity
5 Network Dynamics Reciprocity, platform ecosystems, case study
6 Community Detection Modularity, Louvain, Label Propagation algorithms
7 Two-Mode Networks Bipartite graphs, affiliation networks, projections
8 Exponential Random Graph Models Statistical modeling of networks, ERGM estimation
9-10 Advanced Topics Temporal networks, diffusion, link prediction

πŸ”¬ Featured Analyses

SoundCloud Network Analysis (Week 5)

Comprehensive analysis of a music streaming platform with:

  • 8,000 users, 1.2M tracks, 100K+ social connections
  • Exploratory Data Analysis: User behavior, content patterns, engagement metrics
  • Network Properties Testing: Statistical tests for reciprocity and transitivity
  • Visualization: Interactive network plots and statistical distributions

Technologies: R, igraph, tidyverse, sna, CUG tests

Key Features

  • Rigorous Statistical Testing: Both ErdΕ‘s-RΓ©nyi and Conditional Uniform Graph (CUG) tests
  • Reproducible Research: Frozen computational outputs for CI/CD compatibility
  • Professional Visualizations: Course-branded plots with consistent styling

πŸ› οΈ Technical Stack

Website Infrastructure

  • Framework: Quarto - Scientific and technical publishing system
  • Languages: R (primary), Python (supplemental)
  • Deployment: GitHub Pages via GitHub Actions
  • Theme: Custom dual-mode (light/dark) with Atkinson Hyperlegible font

R Packages

# Core network analysis
igraph, tidygraph, ggraph, network, sna

# Statistical modeling
ergm, btergm, statnet

# Visualization
networkD3, visNetwork, ggplot2, gridExtra

# Data manipulation
tidyverse (dplyr, tidyr, purrr, readr)

Python Libraries

# Core network analysis
networkx, graph-tool

# Visualization
plotly, bokeh, pyvis, matplotlib, seaborn

# Data manipulation
numpy, scipy, pandas

πŸ“Š Datasets

The repository includes several curated network datasets:

Dataset Nodes Edges Type Description
SoundCloud 8,000 100K+ Directed Music platform with users, tracks, follows
Deezer 50K 200K+ Undirected Music streaming social network
Twitch 10K 30K+ Directed Gaming platform follower network
Xoxoday 500 1.5K Undirected Employee collaboration network

Data Location: data/ directory (some files are .gitignored due to size)


πŸŽ“ Assessments

Mid-Term Project (30%)

  • Network analysis of real-world dataset
  • Individual work
  • Due: Week 6

Final Project (70%)

  • Comprehensive network analytics project
  • Group work (2-3 students)
  • Includes presentation and written report
  • Due: End of term

🀝 Contributing

This is an active teaching repository. Contributions are welcome:

  1. Report Issues: Use GitHub Issues for bugs or suggestions
  2. Submit Pull Requests: For typos, clarifications, or enhancements
  3. Share Feedback: Contact the teaching team

πŸ‘₯ Teaching Team

  • Module Leader: Dr. Simone Santoni
  • Teaching Assistants: See course website

Office Hours: Check the support page


πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

Educational materials are provided for academic use. Please cite appropriately when using course materials in your work.


πŸ”— Links


πŸ“§ Contact

For course-related queries:


⭐ Acknowledgments


Last Updated: November 2025

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •