Dataset Viewer
Auto-converted to Parquet Duplicate
source_node_id
stringlengths
16
33
target_node_id
stringlengths
16
33
relationship_type
stringclasses
26 values
properties_json
stringlengths
2
8.66k
act_9322ea992e2e402e
ep_sea_ser_the_west_wing_s02_e01
PART_OF_EPISODE
{}
act_445ab62d34a36c2c
ep_sea_ser_the_west_wing_s02_e01
PART_OF_EPISODE
{}
act_d1c30d7b05cf9abf
ep_sea_ser_the_west_wing_s02_e01
PART_OF_EPISODE
{}
act_b528061d38366e61
ep_sea_ser_the_west_wing_s02_e01
PART_OF_EPISODE
{}
scene_9692461f92fe8746
act_9322ea992e2e402e
PART_OF_ACT
{}
scene_9692461f92fe8746
ep_sea_ser_the_west_wing_s02_e01
BELONGS_TO_EPISODE
{}
scene_9692461f92fe8746
beat_3d886eb632795233
CONTAINS_BEAT
{}
scene_9692461f92fe8746
beat_8bc0fcf9c1e014ff
CONTAINS_BEAT
{}
scene_bc8d2005d119c413
act_9322ea992e2e402e
PART_OF_ACT
{}
scene_bc8d2005d119c413
ep_sea_ser_the_west_wing_s02_e01
BELONGS_TO_EPISODE
{}
scene_bc8d2005d119c413
beat_eb9af09a58f2361f
CONTAINS_BEAT
{}
scene_bc8d2005d119c413
beat_b5cbe8c65bae930c
CONTAINS_BEAT
{}
scene_bc8d2005d119c413
beat_09553ea38a53e566
CONTAINS_BEAT
{}
scene_bc8d2005d119c413
beat_bbc803c846f37ef9
CONTAINS_BEAT
{}
scene_bc8d2005d119c413
beat_9496efb5d8705ca5
CONTAINS_BEAT
{}
scene_cbc4dc0c89e0a13e
act_9322ea992e2e402e
PART_OF_ACT
{}
scene_cbc4dc0c89e0a13e
ep_sea_ser_the_west_wing_s02_e01
BELONGS_TO_EPISODE
{}
scene_cbc4dc0c89e0a13e
beat_a2ec650fe5b94879
CONTAINS_BEAT
{}
scene_cbc4dc0c89e0a13e
beat_e18eb492590520eb
CONTAINS_BEAT
{}
scene_cbc4dc0c89e0a13e
beat_1463ed8bf594d3f9
CONTAINS_BEAT
{}
scene_cbc4dc0c89e0a13e
beat_d5655adce0bcaa4f
CONTAINS_BEAT
{}
scene_cbc4dc0c89e0a13e
beat_e572a9519e972323
CONTAINS_BEAT
{}
scene_cbc4dc0c89e0a13e
beat_fe02a070c7e1ee44
CONTAINS_BEAT
{}
scene_968d9ff893d92177
act_9322ea992e2e402e
PART_OF_ACT
{}
scene_968d9ff893d92177
ep_sea_ser_the_west_wing_s02_e01
BELONGS_TO_EPISODE
{}
scene_968d9ff893d92177
beat_39879d64e7217a57
CONTAINS_BEAT
{}
scene_968d9ff893d92177
beat_1773efc1441f0bd3
CONTAINS_BEAT
{}
scene_968d9ff893d92177
beat_514cc39cdbf2d669
CONTAINS_BEAT
{}
scene_968d9ff893d92177
beat_398bd567a920ed4d
CONTAINS_BEAT
{}
scene_875c80875ba984cb
act_9322ea992e2e402e
PART_OF_ACT
{}
scene_875c80875ba984cb
ep_sea_ser_the_west_wing_s02_e01
BELONGS_TO_EPISODE
{}
scene_875c80875ba984cb
beat_947c5e79b0db9235
CONTAINS_BEAT
{}
scene_875c80875ba984cb
beat_9f99230cb35429f2
CONTAINS_BEAT
{}
scene_7be3482b648c2848
act_9322ea992e2e402e
PART_OF_ACT
{}
scene_7be3482b648c2848
ep_sea_ser_the_west_wing_s02_e01
BELONGS_TO_EPISODE
{}
scene_7be3482b648c2848
beat_19ea6827df3cdc3e
CONTAINS_BEAT
{}
scene_7be3482b648c2848
beat_e951c525dcda959f
CONTAINS_BEAT
{}
scene_7be3482b648c2848
beat_35c1fe644c409330
CONTAINS_BEAT
{}
scene_7be3482b648c2848
beat_362b7af9c879b541
CONTAINS_BEAT
{}
scene_7be3482b648c2848
beat_32ae3bc33edc7c6e
CONTAINS_BEAT
{}
scene_7be3482b648c2848
beat_b12f5ea0cf363f09
CONTAINS_BEAT
{}
scene_13fea6dc0827c0a2
act_9322ea992e2e402e
PART_OF_ACT
{}
scene_13fea6dc0827c0a2
ep_sea_ser_the_west_wing_s02_e01
BELONGS_TO_EPISODE
{}
scene_13fea6dc0827c0a2
beat_e64dfa61809ca368
CONTAINS_BEAT
{}
scene_13fea6dc0827c0a2
beat_a2a7a94691aecaf8
CONTAINS_BEAT
{}
scene_13fea6dc0827c0a2
beat_4dc24d38507037a0
CONTAINS_BEAT
{}
scene_7baf72e1855737ec
act_9322ea992e2e402e
PART_OF_ACT
{}
scene_7baf72e1855737ec
ep_sea_ser_the_west_wing_s02_e01
BELONGS_TO_EPISODE
{}
scene_7baf72e1855737ec
beat_299fe76f7242d495
CONTAINS_BEAT
{}
scene_7baf72e1855737ec
beat_ddfcc8d8ebbb5493
CONTAINS_BEAT
{}
scene_7baf72e1855737ec
beat_3ba4cca40b7e47a9
CONTAINS_BEAT
{}
scene_2193e89de80ed21c
act_9322ea992e2e402e
PART_OF_ACT
{}
scene_2193e89de80ed21c
ep_sea_ser_the_west_wing_s02_e01
BELONGS_TO_EPISODE
{}
scene_2193e89de80ed21c
beat_c0db24b9cdafa758
CONTAINS_BEAT
{}
scene_2193e89de80ed21c
beat_61a210e09a82c8da
CONTAINS_BEAT
{}
scene_2193e89de80ed21c
beat_6ce2d11f259c1ff9
CONTAINS_BEAT
{}
scene_2193e89de80ed21c
beat_ef88625575eb94a3
CONTAINS_BEAT
{}
scene_206b93f64e94fda7
act_445ab62d34a36c2c
PART_OF_ACT
{}
scene_206b93f64e94fda7
ep_sea_ser_the_west_wing_s02_e01
BELONGS_TO_EPISODE
{}
scene_206b93f64e94fda7
beat_c43cb1c93cc3c85b
CONTAINS_BEAT
{}
scene_206b93f64e94fda7
beat_f04fe47b45b07c77
CONTAINS_BEAT
{}
scene_206b93f64e94fda7
beat_d4e1ae30a2263fbf
CONTAINS_BEAT
{}
scene_206b93f64e94fda7
beat_b0163c2d5f6f0c25
CONTAINS_BEAT
{}
scene_206b93f64e94fda7
beat_a6c5b51c7c4bc444
CONTAINS_BEAT
{}
scene_206b93f64e94fda7
beat_b572ea46a1a78404
CONTAINS_BEAT
{}
scene_dc2897e0fabe7c7a
act_445ab62d34a36c2c
PART_OF_ACT
{}
scene_dc2897e0fabe7c7a
ep_sea_ser_the_west_wing_s02_e01
BELONGS_TO_EPISODE
{}
scene_dc2897e0fabe7c7a
beat_c145ff5ecaba6dd7
CONTAINS_BEAT
{}
scene_dc2897e0fabe7c7a
beat_8f6cdbfc369d0cbd
CONTAINS_BEAT
{}
scene_dc2897e0fabe7c7a
beat_de9ed6a57e675d54
CONTAINS_BEAT
{}
scene_dc2897e0fabe7c7a
beat_ff99c3c47e09bf70
CONTAINS_BEAT
{}
scene_dc2897e0fabe7c7a
beat_c71e0f74645f1065
CONTAINS_BEAT
{}
scene_e9f87fe8e671bc4b
act_445ab62d34a36c2c
PART_OF_ACT
{}
scene_e9f87fe8e671bc4b
ep_sea_ser_the_west_wing_s02_e01
BELONGS_TO_EPISODE
{}
scene_e9f87fe8e671bc4b
beat_ea35a340d51c7e66
CONTAINS_BEAT
{}
scene_e9f87fe8e671bc4b
beat_da11d57cfde7111a
CONTAINS_BEAT
{}
scene_e9f87fe8e671bc4b
beat_91ea5468aa394c12
CONTAINS_BEAT
{}
scene_e9f87fe8e671bc4b
beat_e65e605e004b21ec
CONTAINS_BEAT
{}
scene_f65bb8589f54e2d5
act_445ab62d34a36c2c
PART_OF_ACT
{}
scene_f65bb8589f54e2d5
ep_sea_ser_the_west_wing_s02_e01
BELONGS_TO_EPISODE
{}
scene_f65bb8589f54e2d5
beat_4a447d0aceabfe29
CONTAINS_BEAT
{}
scene_f65bb8589f54e2d5
beat_5611c2b1c128ce61
CONTAINS_BEAT
{}
scene_f65bb8589f54e2d5
beat_6363c81fba59f074
CONTAINS_BEAT
{}
scene_f65bb8589f54e2d5
beat_7c9154c2931f7244
CONTAINS_BEAT
{}
scene_ab71ac59ff480cfb
act_445ab62d34a36c2c
PART_OF_ACT
{}
scene_ab71ac59ff480cfb
ep_sea_ser_the_west_wing_s02_e01
BELONGS_TO_EPISODE
{}
scene_ab71ac59ff480cfb
beat_84cc589b54317fd2
CONTAINS_BEAT
{}
scene_ab71ac59ff480cfb
beat_afcfe51b3865aef3
CONTAINS_BEAT
{}
scene_ab71ac59ff480cfb
beat_39965158bf190b4f
CONTAINS_BEAT
{}
scene_ab71ac59ff480cfb
beat_b37f557004059c23
CONTAINS_BEAT
{}
scene_c43a7e9e6ddf054b
act_445ab62d34a36c2c
PART_OF_ACT
{}
scene_c43a7e9e6ddf054b
ep_sea_ser_the_west_wing_s02_e01
BELONGS_TO_EPISODE
{}
scene_c43a7e9e6ddf054b
beat_ada07c81e94105ea
CONTAINS_BEAT
{}
scene_c43a7e9e6ddf054b
beat_deae8dddd596ec4f
CONTAINS_BEAT
{}
scene_c43a7e9e6ddf054b
beat_27542dc14e660eba
CONTAINS_BEAT
{}
scene_dc1defd4f95a4817
act_445ab62d34a36c2c
PART_OF_ACT
{}
scene_dc1defd4f95a4817
ep_sea_ser_the_west_wing_s02_e01
BELONGS_TO_EPISODE
{}
scene_dc1defd4f95a4817
beat_ea5705a693dc0fe4
CONTAINS_BEAT
{}
scene_dc1defd4f95a4817
beat_24db0240434d2ccb
CONTAINS_BEAT
{}
scene_dc1defd4f95a4817
beat_e889b90cd2eee32b
CONTAINS_BEAT
{}
End of preview. Expand in Data Studio

The West Wing - Narrative Knowledge Graph

A rich narrative knowledge graph extracted from The West Wing screenplays using the Fabula pipeline. Contains characters, locations, objects, organizations, events, themes, and conflict arcs with full participation semantics and Graph Gravity importance tiers.

Dataset Overview

Metric Value
Source database westwing.s02
Type Season database
Episodes 22
Total nodes 5,737
Total edges 15,418
Schema version 1.1.0
Exported 2026-02-24

Entity Breakdown

Type Count
Act 98
Agent 462
ConflictArc 96
Episode 22
Event 828
Location 285
Object 512
Organization 316
PlotBeat 2,436
SceneBoundary 586
Theme 85
Writer 11

Graph Gravity Tiers

Tier Count Description
anchor 25 Main characters / key locations
planet 46 Recurring entities
asteroid 1,504 Minor / one-off entities

Relationship Types

AFFILIATED_WITH, BELONGS_TO_EPISODE, CALLBACK, CAUSAL, CHARACTER_CONTINUITY, CONTAINS_BEAT, CREDITED_ON, EMOTIONAL_ECHO, ESCALATION, EXEMPLIFIES_THEME, FORESHADOWING, INVOLVED_IN_ARC, INVOLVED_WITH, IN_EVENT, NARRATIVELY_FOLLOWS, OCCURS_IN, OWNS, PARTICIPATED_AS, PART_OF, PART_OF_ACT ... and 6 more

Files

File Description
nodes.parquet All graph nodes with properties
edges.parquet All relationships with properties
positions.parquet 3D layout coordinates for visualization
meta.json Dataset metadata and entity counts

Schema

Nodes (nodes.parquet)

Column Type Description
node_id string Unique node identifier (UUID)
primary_label string Node type (Agent, Location, Event, etc.)
name string Display name
description string Foundational description
tier string (nullable) Graph Gravity tier: anchor / planet / asteroid
episode_count int (nullable) Number of distinct episodes entity appears in
first_episode_seq int (nullable) First appearance episode
last_episode_seq int (nullable) Last appearance episode
properties_json string Full node properties as JSON

Edges (edges.parquet)

Column Type Description
source_node_id string Source node UUID
target_node_id string Target node UUID
relationship_type string Relationship type (e.g., PARTICIPATED_AS)
properties_json string Edge properties as JSON

Positions (positions.parquet)

Column Type Description
node_id string Node UUID
x, y, z float 3D coordinates
size float Node size (Graph Gravity weighted)
r, g, b int RGB color by entity type
community int Louvain community index
tier string (nullable) Graph Gravity tier

Usage

from datasets import load_dataset
import pandas as pd

# Load from HuggingFace
ds = load_dataset("brandburner/westwing-s02-narrative-kg")

# Or load parquet directly
nodes = pd.read_parquet("nodes.parquet")
edges = pd.read_parquet("edges.parquet")

# Filter to anchor characters
anchors = nodes[(nodes['primary_label'] == 'Agent') & (nodes['tier'] == 'anchor')]

# Build a NetworkX graph
import networkx as nx
G = nx.DiGraph()
for _, n in nodes.iterrows():
    G.add_node(n['node_id'], label=n['primary_label'], name=n['name'])
for _, e in edges.iterrows():
    G.add_edge(e['source_node_id'], e['target_node_id'], type=e['relationship_type'])

Citation

@misc{fabula_westwing_s02,
  title = {The West Wing Narrative Knowledge Graph},
  author = {Fabula Pipeline},
  year = {2026},
  publisher = {HuggingFace},
  howpublished = {\url{https://huggingface.co/datasets/brandburner/westwing-s02-narrative-kg}}
}

License

CC BY-SA 4.0

Downloads last month
12