Skip to main content
Unlisted

Share visualization

Loading preview…

Data Analysis

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Choose how to deliver this visualization

Anyone with the link can view this unlisted visualization. Posting it publicly will make the link discoverable.

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportHTML, source ZIP

Data Analysis

0 stars0Unlisted
CCurran Kelleher
Last edited Oct 26, 2026
Created on Oct 26, 2026

Created from react-d3-starter template

Star Wars Edges (Episode Character Interactions)

Dataset Overview

  • Filename: starwars_edges.csv
  • Virtual path: /data/starwars_edges.csv
  • Rows: 1,000 (as reported by the upload profile)
  • Columns: 4
  • File size: ~21 KB

The dataset is an edge list / weighted co-occurrence table. Each row appears to describe a directed relationship between two named characters (source → target) observed within a specific Star Wars episode (episode), along with a numeric strength or frequency (value). Typical of network analysis datasets, the pair of character names defines a graph edge and value weights that edge.

The episode column is documented in the profile as a boolean type, but its observed values (integers 1 through 7) look like ordinal episode numbers rather than true booleans. This is a tentative interpretation — the underlying schema was not verified against an external source.

Column Descriptions

Column Apparent meaning Munzner type Missing Notes
episode Numeric label identifying which Star Wars film the edge was observed in (1–7). Ordinal (ordered categories) — though the profile labels it boolean, the observed values are integers 1–7. 0 Values range 1–7. Interpreted as movie ordering (release order), not a boolean.
source Name of the character the edge originates from. Nominal (unordered categories). 0 83 distinct names. Uppercase, may contain spaces, punctuation, and hyphenation (e.g. QUI-GON, OBI-WAN, NUTE GUNRAY).
target Name of the character the edge points to. Nominal (unordered categories). 0 93 distinct names. Same formatting conventions as source.
value Numeric weight or count associated with the directed edge (e.g. number of interactions or shared scenes). Quantitative (numeric measurement; positive integers). 0 42 distinct values, min 1, max 77, mean ≈ 4.13. Assumed non-negative integers.

Parsing / data assumptions

  • The CSV header is the first record and is parsed with D3's csv() parser (RFC 4180 compliant, handles quoted cells and embedded newlines). Column keys are used verbatim: episode, source, target, value.
  • episode and value are coerced to numbers at load time with +d.episode and +d.value. Any non-numeric value would become NaN and is filtered out in the loading step before visualization.
  • Character names are kept as raw strings; no case-folding or whitespace normalization is applied, since distinct names like R2-D2 vs R2D2 may be meaningful.
  • The profile calls episode a boolean, but no boolean values are present in the sample; treat the "boolean" label as an artifact of the upload profiler's type detection for small integer columns.

Visualization Mappings

Chart type: horizontal bar chart of the top-N characters by total edge weight (sum of value across all rows where the character appears, either as source or target).

Why this design: The dataset is a weighted edge list. The most immediately useful summary question is "which characters dominate the interaction graph?" Summing edge weights per character gives a compact, readable ranking that reveals the hubs of the network without introducing a heavy graph layout.

Encodings

  • Y position (bars): character name — Nominal → ordinal scale.
  • X length: total aggregated weight for that character — Quantitative linear scale.
  • Bar label (end of bar): exact numeric total, formatted with thousands separators.
  • Color: single accent color with no data meaning (avoids encoding a second redundant channel).

Interactions

  • Hover on a bar: highlights the bar and shows a tooltip with the character name, total weight, and the number of distinct episodes in which the character appears.
  • Top-N selector (5 / 10 / 15 / 25): re-truncates the ranked list without re-loading the dataset, letting the user zoom in on the head or the long tail.

Responsiveness: The container uses useContainerDimensions (ResizeObserver) so the SVG re-renders on resize; bar height and axis widths are recomputed from the live pixel dimensions.

Implementation Notes

  • Data is loaded at runtime from /data/starwars_edges.csv via d3.csv.
  • Rows with non-finite episode or value are dropped defensively.
  • Files: index.html, index.jsx, App.jsx, viz.js, useContainerDimensions.js, and styles.css implement the React + D3 shell and the bar chart.

Visualization Ideas

No project brief was provided, so the framing is taken from the current visualization, a "Character Interaction Ranking" bar chart. The implied audience is general viewers and fans exploring the data. The implied question is "who dominates the interaction network, and how does that change across episodes?" Every idea uses only episode, source, target, and value. Load data at runtime with d3.csv('data/starwars_edges.csv') and coerce episode and value to numbers.

  1. Episode-Faceted Top Characters (small multiples)

    • Question: Do the top-ranked characters change from episode to episode?
    • Fields: episode, source, target, value.
    • Encoding: Seven small horizontal bar charts, one per episode, using the same x scale and the same highlight color as the current chart.
    • Interaction: Hovering a character highlights that character's bar in every facet.
    • Implementation: Use d3.rollup by episode then character, summing value for both source and target. Reuse renderBars per facet.
  2. Stacked Bar by Episode Contribution

    • Question: Which episodes produce each top character's total weight?
    • Fields: episode, source, target, value.
    • Encoding: Horizontal stacked bars; each segment is an episode, colored by a sequential or ordinal palette.
    • Interaction: The tooltip shows the per-episode breakdown. Clicking a legend swatch isolates one episode.
    • Implementation: Pivot into {name, e1..e7} and use d3.stack. This extends the existing ranking.
  3. Character × Episode Heatmap

    • Question: In which episodes is each character most active?
    • Fields: episode, source, target, value.
    • Encoding: Rows are characters ordered by total weight; columns are episodes 1–7. Cell color is a sequential scale of summed value.
    • Interaction: Hover shows the exact value. Clicking a row label re-sorts by that character's activity.
    • Implementation: Use scaleBand for both axes and scaleSequential(interpolateYlOrBr).
  4. Chord Diagram of Top Characters

    • Question: Which pairs of major characters interact most strongly?
    • Fields: source, target, value.
    • Encoding: Arcs for the top 15 characters; ribbon width is the summed pair weight.
    • Interaction: Hovering an arc fades the unrelated ribbons.
    • Implementation: Build a square matrix and use d3.chordDirected. Group the remaining characters as "Other".
  5. Force-Directed Network

    • Question: What is the overall structure of the interaction graph, including its hubs and clusters?
    • Fields: source, target, value.
    • Encoding: Node size is weighted degree; link thickness and opacity are value.
    • Interaction: Drag nodes, click to pin one, and use an episode filter to rebuild the graph.
    • Implementation: Use d3.forceSimulation with forceLink and forceManyBody. Aggregate duplicate edges first.
  6. Episode Slider with Animated Bar Race

    • Question: How does the ranking evolve from Episode 1 to 7?
    • Fields: episode, source, target, value.
    • Encoding: The existing bar chart animates re-sorting as the episode changes; the bar color is constant.
    • Interaction: Play/pause button and a scrubber over episodes; optionally switch to cumulative totals.
    • Implementation: Precompute rankings per episode and use transitions keyed by name.
  7. Directed Adjacency Matrix

    • Question: Who initiates versus receives interactions with whom?
    • Fields: source, target, value.
    • Encoding: Rows are sources and columns are targets. Cell color encodes value. Rows and columns are ordered by a clustering heuristic.
    • Interaction: Crosshair highlighting and a tooltip showing both directions of a pair.
    • Implementation: Pivot the data into a Map keyed by source|target and render rects.
  8. Source vs. Target Diverging Bars

    • Question: Is a character mostly a source or mostly a target of interactions?
    • Fields: source, target, value.
    • Encoding: Bars extend left for out-weight (as source) and right for in-weight (as target), around a central axis.
    • Interaction: Toggle the sort between total, out-heavy, and in-heavy.
    • Implementation: Two rollups by source and by target; use a symmetric x domain.
  9. Out- vs. In-Weight Scatterplot

    • Question: Which characters are hubs, which are broadcasters, and which are receivers?
    • Fields: source, target, value.
    • Encoding: x is out-weight and y is in-weight. Point size is the number of distinct partners. A diagonal reference line marks balance.
    • Interaction: Hover for details, label the outliers, and brush to select a group.
    • Implementation: Compute the metrics with d3.rollup and use d3.brush.
  10. Edge Weight Distribution Histogram

    • Question: Are interaction weights heavy-tailed or evenly spread?
    • Fields: value (and episode for an optional filter).
    • Encoding: A histogram of value bins, optionally on a log y-axis.
    • Interaction: A brush selects a range of weights and lists the matching edges. Toggle linear/log.
    • Implementation: d3.bin on value. The file has about 42 distinct values, so use integer thresholds.
  11. Ridgeline of Weight Distribution per Episode

    • Question: Does the typical edge weight differ across episodes?
    • Fields: episode, value.
    • Encoding: One density curve per episode, stacked vertically with a shared x axis.
    • Interaction: Hover shows the episode median and count.
    • Implementation: Use kernel density estimation (a custom function) per episode and d3.area with overlapping bands.
  12. Episode Activity Overview (line or area)

    • Question: How much total interaction weight and how many edges does each episode contain?
    • Fields: episode, value.
    • Encoding: An area or line chart across ordinal episodes 1–7. The primary series is total weight; a second panel or dashed line shows the edge count.
    • Interaction: Clicking an episode filters the main ranking chart.
    • Implementation: d3.rollup by episode, then link it to App state as selectedEpisode.
  13. Slope Chart of Rank Change

    • Question: Which characters rise or fall in rank between two chosen episodes?
    • Fields: episode, source, target, value.
    • Encoding: Two vertical axes of ranked names joined by lines. Color shows rank up, down, or unchanged.
    • Interaction: Dropdowns choose the two episodes. Hovering a line highlights that character.
    • Implementation: Compute the per-episode ranking and join by name. Characters absent from an episode get a dashed stub.
  14. Treemap of Interaction Weight

    • Question: What share of total weight does each character hold?
    • Fields: source, target, value.
    • Encoding: Rectangle area is total weight. A hierarchy of episode → character gives nested rectangles, colored by episode.
    • Interaction: Click to zoom into an episode; breadcrumb navigation returns to the top.
    • Implementation: d3.hierarchy and d3.treemap with an aggregated tree.
  15. Ego Network Focus View

    • Question: Who does a chosen character interact with, and how strongly?
    • Fields: source, target, value, episode.
    • Encoding: A radial layout with the chosen character at the center and neighbors on a ring. Distance or link width encodes value, and the arrow direction shows source → target.
    • Interaction: Clicking a bar in the main ranking sets the ego character, and an episode filter narrows it.
    • Implementation: Filter edges where the character is source or target and compute a polar position per neighbor.
  16. Arc Diagram of Top Pairs

    • Question: Which individual character pairs carry the most weight?
    • Fields: source, target, value.
    • Encoding: Nodes sit on a line ordered by total weight. Arc height or thickness encodes the pair weight.
    • Interaction: Hovering a node reveals its arcs, and a slider sets the minimum edge weight.
    • Implementation: Aggregate pairs, take the top N edges, and draw path arcs with an SVG A command.
  17. Top Edges Lollipop Chart

    • Question: Which single directed relationships are strongest?
    • Fields: source, target, value, episode.
    • Encoding: Each row is a "SOURCE → TARGET" label with a lollipop whose length is value. Dot color encodes episode (ordinal palette).
    • Interaction: Filter by episode, and hover for the details.
    • Implementation: Sort the rows by value descending and slice the top 20 with no aggregation.
  18. Parallel Coordinates of Character Profiles

    • Question: How do characters compare across several derived measures?
    • Fields: source, target, value, episode.
    • Encoding: One line per character across axes for total weight, out-weight, in-weight, distinct partners, and episodes appeared.
    • Interaction: Brushing each axis filters the lines, and hovering names a line.
    • Implementation: Compute the per-character metrics and use a scalePoint for the axes with d3.brushY per axis.
  19. Episode Cohort Overlap (UpSet-style matrix)

    • Question: Which characters appear in all episodes, and which in only one or two?
    • Fields: episode, source, target.
    • Encoding: A dot matrix of episodes (columns) by character-set combinations, with bars above showing the number of characters per combination.
    • Interaction: Hovering a combination lists its characters, and a filter limits it to characters above a weight threshold.
    • Implementation: Build a Set of episodes per character, key it by the sorted episode list, and count the groups.
  20. Sankey of Source → Target Flow

    • Question: How does interaction weight flow from the main sources to the main targets?
    • Fields: source, target, value, episode.
    • Encoding: Left nodes are sources and right nodes are targets. Link width is summed value, and link color is the source group.
    • Interaction: Hovering a link shows the pair and weight. An episode toggle recomputes the flow, and the less common names are grouped as "Other".
    • Implementation: Use d3-sankey, which needs an extra import. Suffix the node ids ("_s", "_t") to keep the two sides distinct.

Comments

Sign in to join the discussion.