Western University
Department of Modern Languages and Literatures
Digital Humanities – DH 3501

Instructor: David Brown
E-mail: dbrow52@uwo.ca
Office: AHB 1R14

The Structure and Function of Networks

  • Fundamentals of graph theory and network analysis
  • Application of graph theory in data storage and analysis
  • Introduction to advanced topics in graph theory

    • Random graphs

    • Strategy and interaction

    • Diffusion

  • Innovative Research in Graph Theory

DH at Western

  • IDI in Digital Humanities - “mastering high levels of digital literacy” and “formalizing and storing of cultural and historical data in complex relations”
  • Tooling/pedagological ecosystem

    • Python based*
  • Integrated at third year level

    • DH3501
  • Attract students from social/biological sciences

*This course can also be offered without Python prereq...

Theory and Practice

  • Core readings
  • Applied classroom activity
  • WALS classrooms
  • "Real" assignments

Open Source Course

  • All software is FREE

  • Texts/readings are all available freely (at least for Western Students)

Python

@asyncio.coroutine
def recv_coro(gc):
    yield from gc.send("g.V().has(n, val).values(n)",
        bindings={"n": "name", "val": "gremlin"})
    while True:
        f = yield from gc.recv()
        if f is None:
            break
        self.assertEqual(f[0], "gremlin")


>>> gc.run_until_complete(recv_coro(gc))

Gephi

Neo4j Graph Database

Gremlin Ecosystem

  • Networks, Crowds, and Markets

    • David Easley and John Kleinberg
  • Social and Economic Networks

    • Matthew O. Jackson
  • Graph Databases

    • Ian Robinson, Jim Webber and Emil Eifren
  • SNA for Startups

    • Alexander Kouznetsov and Maksim Tsvetovat

Course Content

Core graph theory/network analysis

NetworkX


In [3]:
# Config environment for code examples.
%matplotlib inline
import networkx as nx
import matplotlib as plt
g = nx.scale_free_graph(10)
nx.draw_networkx(g)


Individual node metrics

Formal representations of networks

  • $graph = (N,g)$
  • $N = \{1, 2, 3\}$
  • $g = \begin{bmatrix}0 & 1 & 0\\1 & 0 & 1\\0 & 1 & 0\end{bmatrix}$

Basic Dynamics

Contextual Factors

Tooling and Techniques

Graph Databases

%%cypher

MATCH (newcastle:City {name:"Newcastle"})<-[:STREET|CITY*1..2]-(theatre:Theatre {name: "Theatre Royal"})

<-[:VENUE]-()-[:PERFORMANCE_OF]->()-[:PRODUCTION_OF]->

(play)<-[:WROTE_PLAY]-(bard:Person {lastname: 'Shakespeare'})

RETURN DISTINCT play.title AS play
$ bin/gremlin.sh

         \,,,/
         (o o)
-----oOOo-(3)-oOOo-----
gremlin> g = TinkerFactory.createModern()
==>tinkergraph[vertices:6 edges:6]
gremlin> g.V().has('name','marko').out('knows').values('name')
==>vadas
==>josh

Traversals

Advanced topics

  • Random graph models

  • Structure and Function

  • Strategy and Interaction

  • Diffusion

  • Innovative studies in network analysis

Final Project - The Data Processing Pipeline

Well you got the job. You're chief analyst now and you're company wants to expand its analytics into new frontiers. It's time for you to build your own project from scratch. Here's what you need to do:

1. Find a data set.

2. Model the data.

3. Load it into a graph database.

4. Write a series of queries against the data.

5. Export a subgraph projection to NetworkX and perform analysis.

6. Create a series of visualizations of the subgraph with Gephi.

7. Prepare a detailed write up of your research.

8. Prepare a presentation of your project.