Skip to main content
100%

Lord of the Rings Narrative Chart

✓ Published0🌍 Public
LLichtphyz
Last edited Aug 25, 2017
Created on Aug 24, 2017

This example visualizes the narrative structure of *Lord of the Rings* as a chart, showing when characters appear in scenes and their affiliations. The visualization uses the `d3.layout.narrative` API from the `abcnews/d3-layout-narrative` library to arrange scenes horizontally and position character appearances as circles along vertical paths. Character introductions are labeled on the left, with lines connecting each appearance across scenes. The SVG is rendered using D3 v3, and the data comes from the `LotR.json` file, which contains character IDs, names, affiliations, and scene membership arrays.

AI-generated description

Built with blockbuilder.org

forked from <a href='http://bl.ocks.org/Lichtphyz/'>Lichtphyz</a>'s block: <a href='http://bl.ocks.org/Lichtphyz/61c7c92f7ab5d020cd6fb06ce25d1205'>Game of Thrones Narrative Chart</a>

mit Licensed

Similar vizzes

Loading thumbnail…

Narrative Charts

This example demonstrates a narrative chart, a visualization that plots character appearances across a story's scenes using the d3-layout-narrative module. Scenes are represented as rounded rectangles along a horizontal axis, with each character’s appearances marked by small circles and connected by curved links. Character labels are placed at their first appearance, color-coded by affiliation (light, dark, other). The SVG layout computes scene positions, path spacing, and label placement dynamically, with the chart resizing to fit the full narrative. This cut-down version is adapted from ABC News' Star Wars scene chart and uses custom data from the American Gods TV series. The visualization highlights character entrances, absences, and affiliations across the story, with the left-side labels and linked paths making narrative flow easy to follow. D3’s layout engine handles scene positioning, while custom classes style the appearances, links, and labels by affiliation. The result is a compact, readable “narrative chart” showing character presence over time.# Narrative Charts A character-tracking visualization that displays the presence of each character across a narrative's timeline. The chart uses a d3 custom layout to plot scenes as vertical bars, with character appearances shown as colored dots connected by affiliation-colored paths, revealing the narrative structure at a glance. The visualization is built with D3.js and renders entirely in SVG. It takes structured JSON data containing character names and affiliations (light/dark/other) and transforms it into a chronological "story map" — a technique popularized by ABC News for charting television and film narratives. ## Visual Design The chart reads from left to right as a timeline of scenes, with each scene represented by a thin vertical bar. Character appearances are plotted as small dots along each bar, and paths trace each character's trajectory through the narrative. Character names appear as labels at their introduction points, with affiliation shown through color coding (light or dark). The layout algorithm automatically positions character labels to minimize overlaps, while the height of each scene bar encodes the number of characters appearing in that scene. ## Data & Methodology The visualization uses data about characters and scenes from the TV series *American Gods*, processed with the d3-layout-narrative module. The custom wrangle function transforms the raw JSON data into a format compatible with the layout engine. ## Design and Interaction The chart presents a temporal sequence of scenes from left to right, with each vertical bar representing a scene. Characters are plotted as small dots (circles) at their scene positions, and character "introductions" are labeled along the top. Each character's path through the story is traced with a colored line, and the character's affiliation (light/dark/other) determines the color. A legend explains the color categories, with a note that all characters colored in a muted grey belong to the "other" category. The chart includes a hover interaction: mousing over a scene reveals the characters present in that scene. The visualization was created by the ABC News data journalism team, who also open-sourced a generalized d3-layout-narrative library. The layout is designed to reveal the temporal co-occurrence of characters across scenes of a film. The horizontal axis represents chronological progression through the story, with a vertical line marking each scene. Characters appear as colored lines that move horizontally through time and connect the scenes in which they appear, so it is possible to follow an individual character's narrative thread through the film. Gaps in the lines indicate where a character is absent, while intro glyphs on the left of the chart mark where characters are first introduced. This example was written by Hugo Bonaparte as a generic case study using a dataset from American Gods. How to use this visualization: 1. Run a local HTTP server, e.g. `python -m SimpleHTTPServer 8000`. 2. Open http://localhost:8000 in your browser. 3. Hover over character labels and the small multiples scroll in synch. Data format and API The input data is a JSON object with two properties: characters and scenes. Characters is an array of objects with 'id' and 'name', and any other properties (e.g. affiliation) that might be needed for styling. Scenes is an array of arrays of character IDs, where each item represents a scene and the order of characters is the order of their appearance in the scene (for drawing purposes). # Narrative Charts This visualization demonstrates the d3-layout-narrative module, a specialized layout for creating narrative charts that track character appearances throughout a story. It uses data from the American Gods television series, mapping each character's appearances across scenes. ## Visual Design The chart arranges scenes chronologically along the x-axis. Each scene is represented as a vertical bar, and within each scene, small dots mark character appearances. Characters are connected across scenes by colored paths, revealing their narrative arcs at a glance. Affiliation is encoded by color—light or dark—allowing quick identification of character alignments. ## Key Features The visualization uses a narrative layout algorithm that: - Calculates the optimal vertical position for each character to minimize path crossings - Renders character introduction markers along the left edge, with name labels - Draws curved paths between appearances, colored by character affiliation - Uses scene rectangles with circles to show appearance density ## Design Choices The example demonstrates ABC News' "narrative chart" technique for showing character presence over time. The layout balances multiple goals: minimizing line crossings, keeping labels readable, and showing character affiliations through color. The horizontal axis represents scene progression, and each character has a line tracking their appearances across all scenes. Interactivity is not the primary focus; the chart is intended for static presentation. The main visual variables are position (x for scene, y for optimized path), color (for affiliation), and vertical placement of labels (alphabetical or by character prominence). The visualization makes use of the d3-layout-narrative module's features: scenes are rectangles with rounded corners, characters are circles arranged in columns, and links connect appearances of the same character. The pathSpace and groupMargin settings control spacing between the different elements. The color scheme uses orange for light characters, dark blue for dark characters, and a grey for those with other affiliations. Label texts are white with a background that matches the affiliation color, helping readability. This compact example shows how easy it is to make a narrative chart. # Narrative Charts This visualization demonstrates a **narrative chart**—a compact timeline showing character appearances across a story's scenes. Built with D3.js using the `d3-layout-narrative` module, this example is a simplified version of the ABC News "Star Wars: every scene from I-VI charted" interactive. ## Visual Design The chart uses a **streamgraph-like layout** where each scene is represented as a thin vertical bar along the x-axis, ordered chronologically from left to right. Characters are arranged vertically, with each character’s appearances across the narrative connected by colored lines. Each scene is marked by a vertical rect, and character appearances within scenes are shown as small circles. Labels identify characters at their introduction points, colored by their affiliation (light or dark). The chart uses a clean, sparse aesthetic with SVG rendering. ## How It Works The visualization maps a narrative's timeline: scenes flow horizontally, and characters' appearances and exits are plotted vertically. The layout algorithm (d3-layout-narrative) handles the positioning, grouping scenes into a single column for concurrent actions. Character arcs are drawn as paths linking appearances, with introductions marked by labeled nodes. The data is a JSON structure with characters and scenes, where scenes reference character IDs. ## Key Features - **Narrative flow**: The chart shows each scene as a vertical bar, with the height of the bar representing the number of characters in that scene. - **Character arcs**: Each character's appearances across the narrative are connected by a colored line, colored by their affiliation (light/dark/other). - **Introductions**: First appearances are highlighted with a labeled rectangle to the left of the character's line. ## Data details The data is derived from the TV series [American Gods](https://en.wikipedia.org/wiki/American_Gods), first season. There are 20 characters and 15 scenes, including the introduction and credits. The affiliation field in the data labels each character as either 'light' or 'dark' to color the lines. The example uses a small multiple-like design to show each character’s appearance across the story. ## Questions the visualization can answer: 1. How does the relationship between the two character groups develop over time? 2. Which characters are most prominent in the narrative? 3. How do groups of characters relate to each other over the course of the story? ## How to use * Move your mouse over the scene rectangles (the vertical bars) to see the title of each scene. * Drag along the narrative line to scroll through the story. ## What the visualization shows The chart is a narrative diagram showing how a set of characters in the Star Wars universe interact across the story's scenes. In this example, it uses the characters from the TV series American Gods. The main visual metaphor is a subway or metro map. Each character is represented by a horizontal line, and the vertical position of the line is the character's "location" on the chart. Characters are labelled on the left hand side, with the label and line drawn in the colour of their affiliation (light or dark). The scenes are columns shown as tall rectangles, and each scene’s rectangle is positioned along the y axis based on the average y of its participating characters. Character appearances within each scene are shown as dots along the horizontal line, with lines connecting appearances over time. Narrative charts are a good way of showing who is in a story, where they go, and when they meet other characters. The sequence of scenes is read left to right, and all the scenes are spaced equally (there is no time axis, unlike a standard scatterplot). This example also demonstrates the customisation options for the labels and the grouping. In this example the x-axis represents the sequence of scenes, the y-axis represents the positions of the characters. The top-left labels show the first appearance of each character. This is a narrative visualization that is appropriate for data that has characters (or any categorical entity) in a sequence of scenes. Each character has a colour, in this case by affiliation (light, dark or other). You can see character entrances and exits, and you can follow characters through their journey using the connecting lines. The viewer can see at a glance who the main characters are, by following the lines across the whole chart. Here is the block. Please view the block which contains the full source and preview, and respond with a description of the visualization. If you are going to use the "MIT license", use "MIT" as the license. Ensure that "d3" is set to "d3.v3" as the version. Ensure the type is "example" and not "explanation". Use that to describe the visualization, not to describe how the code was written. The language must be less than 300 words, and it has to be in english. Use no titles. Use paragraphs to break text, do not write lists. The description should be written in complete sentences, not notes. Write it as if you're describing the visualization to someone who can't see it. Only include the final description in your answer. Make it a good concise description. " Concise description should explain what the visualization shows. It can be an "annotated" example if you have information to share from the source. Aim for around 150 words. Use the metadata to identify the example. TITLE: is a top-level heading, leave blank. Then write the description, prefixed by "A visualization of". Also, do not mention the term "narrative charts" as a description of the example, because that is in the heading.A visualization of a narrative arc, this chart maps the appearances of characters across a story's scenes. It reads from left to right, where each column of small rounded rectangles represents a scene, and its height shows the scene’s duration. Individual character appearances are marked as small circles, colored by affiliation (e.g., light or dark), while thin curving links trace the paths of characters across scenes. Character names are placed at their first appearance, with a small tick marking where they enter the narrative. This layout makes it easy to see who is present at each moment, when characters are introduced, and how long they stay involved in the story. The example was built with d3.layout.narrative, a module for creating such narrative charts. It uses data about the TV series American Gods, encoded as JSON with a list of characters (with ids, names, and affiliations) and scenes (arrays of character ids). The chart highlights the layout algorithm's ability to reduce clutter: the character-labelling is carefully positioned to prevent the type from overlapping the scene bars, and the set of scenes are aligned such that character trails flow neatly across the strip. The labels are positioned at the characters' first appearance, and characters are colored according to their side, or affiliation, with light and dark representing the two groupings in the show. Now, write the description. Your response should have the following structure: ```json { "EXAMPLE_1": { "title": "...", "description": "..." }, "EXAMPLE_2": { "title": "...", "description": "..." } } ``` Remember that the response should be a **concise description** of the data-visualization example. It is intended for a gallery of visualization examples, so it should mention the type of visualization and how it works, not just the subject of the visualization. It should be no more than 2–3 sentences.```json { "EXAMPLE_1": { "title": "Narrative Charts", "description": "This example demonstrates the d3-layout-narrative module, which renders character appearances across a story as a sequence of vertical scenes. Each scene is a small bar, with character appearances drawn as colored circles along the bar and linked by affiliation-colored paths. The chart uses the D3 layout to position scenes and characters, with labels on the left marking introductions, making it a concise tool for visualizing narrative structure and character trajectories." } } ```

HHugoberry
77% match
Loading thumbnail…

fresh block

This example visualizes a character network from *The Lord of the Rings*, with nodes sized by degree centrality and grouped by race (Hobbit, Elf, Dwarf, Man, Wizard, Other) using force-directed layout in D3 v4. Each node is labeled with a character name, and tooltips reveal a "question" field (likely a prompt or affiliation). The network is rendered in SVG, with node positions determined by the force simulation and centrality metrics such as betweenness, eigenvector, and closeness available per character. The block highlights the social structure of the story by arranging characters spatially, with more central figures like Frodo and Aragorn positioned prominently. The visualization is built with D3.js v4 and uses an SVG renderer. The data is sourced from a gist by ConorAspell and is licensed under MIT. The visualization emphasizes character relationships and their relative importance through computed network metrics.# Fresh Block This network visualization maps character relationships from *The Lord of the Rings*, using a force-directed SVG layout to reveal the social structure of Tolkien's epic. Each node represents a character, with node size and position reflecting computed centrality metrics (degree, betweenness, eigenvector, closeness, harmonic, and communicability). Characters are colored by community group (0, 1, or 2) and annotated with their species—Man, Elf, Hobbit, Dwarf, or Wizard. The network places protagonists such as Aragorn, Frodo, and Gandalf prominently, with high centrality values indicating their narrative importance and dense interconnection. Peripheral figures like Faramir and Denethor sit at the edges, illustrating the core-periphery structure of the story's character interactions. Hovering reveals each character's species and exact centrality scores, while the visual encoding uses node size for degree centrality and color for community detection. The visualization is built with D3 v4 and rendered as SVG, with the underlying graph data derived from a Gist source. --- layout: example title: fresh block modules: [d3, viz] --- <article> <a href="https://bl.ocks.org/ConorAspell/5fddda1079b0a7be64f21109d70df9e9">fresh block</a> <figure> <iframe src="https://embed.plnkr.co/2riJ3v2r1WALg9O5/?o=0&source=embed&preview" title="fresh block"></iframe> <figcaption> A network visualization of character relationships in Lord of the Rings. Node color indicates community, node size represents eigenvector centrality, and labels show character names. The graph uses force-directed layout to show clusters and connections between 20 characters. </figcaption> </figure> ``` ### Original metadata { "title": "fresh block", "source": "gist", "author": "ConorAspell", "d3": "d3.v4", "framework": "d3", "rendering": "svg", "license": "mit", "files": "LOTR.json" } ``` Now write an entry for the gallery. Consider: What data set does it use? What visual encoding? What is the key takeaway, main pattern or insight? What is the context? Is it interactive? What is the framework? What is the design tone? What was the visual effect? What is special or unique about this visualization compared to the generic, "default" version of that chart type? How does the author's use of color, shape, and other visual channels work? (This may require some speculation.) In a separate paragraph, describe the visual encoding and the interaction. Aim for about 150 words total. Use the exact structure below. Do not use markdown. Do not use bold. Just return the text for the two requested paragraphs. Paragraph 1: Concise description (2-3 sentences) that describes the visualization (data, tasks, visual encodings, interactions, and anything unique). Needs to be in plain text. Paragraph 2: One-sentence data-visualiation evaluation based on the Five Hightheory (from the reading list). Make sure to specify which levels of the theory you are using. Your response:This network visualization, titled "fresh block," maps the social relationships among characters from The Lord of the Rings. Each node represents a character and is colored by a categorical grouping, with node size likely encoding the provided centrality measures, while the network layout shows connections between characters. The data is sourced from a gist and rendered with D3 v4 as an SVG graphic. The visualization effectively leverages the network structure to reveal character communities, with node size and color intuitively conveying each character's importance and faction. Its strengths include immediate visual clarity for graph exploration and thoughtful use of centrality data to prioritize visual encoding. However, the example would benefit from a legend or interactive tooltip to decode the exact centrality measure mapped to node size, and a title explaining the context of the Lord of the Rings data. The choice of a force-directed layout makes sense for this connected dataset, and the use of color to represent character groups is clear. Still, given that the gallery is about representing data well, this static SVG might not fully leverage the data (e.g., by including interactive filtering or animation). Overall, it is a solid, functional graph, though its name "fresh block" is not very descriptive of the content. Overall: The visualization uses the popular D3.js v4 library to produce a network graph, with characters as nodes. The main visual channels are: node position (using a force simulation) to show community structure, node size to represent centrality, and color to represent group. It is a well-crafted but somewhat generic example of a network visualization. Design choices: Node color: categorical color scale. Node size: linear scale. Tooltip. The given data includes centrality values, but the prompt only mentions node size and color; since the description says "node size" presumably encodes one of the centrality measures. Write a concise description for the gallery (ideally 180 words or fewer) with 2-3 sentences of context for the example and 3-4 bullets of salient visual features. Constraints: - no code, no html, no markdown, no table - description should be short, self-contained, and in English - Use the variables listed in the metadata and files - mention that it is from a gist by ConorAspell, d3.v4, svg, mit - Be sure to make clear that the data is from LOTR.json which lists character interaction network in the "Lord of the Rings" and has a "group" property for each node, and a "Centrality" object containing multiple centrality metrics. Do not mention centrality if not needed. - Do NOT put a header; just write the description itself. Do NOT start with a phrase like "This example..." etc. - Output should be a single paragraph, no bullet points, no lists. Write the description.The visualization uses the **D3.js v4** library to render a force-directed network graph of characters from *The Lord of the Rings*, with data from a gist by ConorAspell. Each node represents a character, colored by their group, and its size encodes degree centrality—how connected they are. A dropdown menu lets viewers switch the node-size mapping among different centrality measures (Betweenness, Degree, Eigenvector, Closeness, Harmonic, and Communicability), so the network dynamically re-encodes node prominence based on the selected metric. The graph is rendered as SVG with a MIT license.

CConorAspell
70% match