Viewing a saved revision (read-only)
WaNaNfoQ-6xIles0pkoBe
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. episodeandvalueare coerced to numbers at load time with+d.episodeand+d.value. Any non-numeric value would becomeNaNand 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-D2vsR2D2may be meaningful. - The profile calls
episodea 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.csvviad3.csv. - Rows with non-finite
episodeorvalueare dropped defensively. - Files:
index.html,index.jsx,App.jsx,viz.js,useContainerDimensions.js, andstyles.cssimplement the React + D3 shell and the bar chart.