# clauswilke/dataviz architecture

> Architecture diagram of the GitHub repository clauswilke/dataviz, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/clauswilke/dataviz
- Repository: https://github.com/clauswilke/dataviz

## Overview

This repository is the source for a book teaching principles of accurate, clear, professional data visualization—not a visualization software package. The reader’s main workflow is to open the rendered book, navigate chapters, and use its search and reading controls; the R Markdown chapters are the book’s authored content. The graph also preserves the embedded GitBook reader features and major subject areas. Source excerpts show search and reader-plugin behavior; chapter-level implementation details beyond the README are not sampled.

Main entry points: [`_book_production/libs/gitbook-2.6.7/js/plugin-search.js`](https://github.com/clauswilke/dataviz/blob/master/_book_production/libs/gitbook-2.6.7/js/plugin-search.js) (Book search), [`_book_production/index.html`](https://github.com/clauswilke/dataviz/blob/master/_book_production/index.html) (Rendered book), [`introduction.Rmd`](https://github.com/clauswilke/dataviz/blob/master/introduction.Rmd) (Chapter sources), [`_book_production/libs/gitbook-2.6.7/js/plugin-bookdown.js`](https://github.com/clauswilke/dataviz/blob/master/_book_production/libs/gitbook-2.6.7/js/plugin-bookdown.js) (Book navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_content["Book content"]
  node_chapter_source["Chapter sources<br/>[introduction.Rmd]"]
  node_visual_principles["Visual principles"]
  node_chart_choices["Chart choices"]
  node_chart_forms["Chart forms"]
  node_data_context["Data context"]
  node_storytelling["Storytelling"]
end

subgraph group_reader["Reader experience"]
  node_rendered_book["Rendered book<br/>[index.html]"]
  node_bookdown_plugin["Book navigation<br/>[plugin-bookdown.js]"]
  node_search_plugin["Book search<br/>[plugin-search.js]"]
  node_font_plugin["Font settings"]
  node_sharing_plugin["Sharing controls<br/>[plugin-sharing.js]"]
end

subgraph group_support["Reading support"]
  node_lunr["Search engine<br/>[lunr.js]"]
  node_highlight["Text highlighting"]
  node_search_index["Search index<br/>[search_index.json]"]
  node_reader["Reader framework"]
end

node_reader_actor(("Reader"))

node_reader_actor -->|"opens"| node_rendered_book
node_chapter_source -->|"source for"| node_rendered_book
node_reader_actor -.->|"searches"| node_search_plugin
node_search_plugin -->|"fetches"| node_search_index
node_search_plugin -->|"builds index"| node_lunr
node_search_plugin -->|"highlights matches"| node_highlight
node_search_plugin -->|"uses framework"| node_reader
node_bookdown_plugin -->|"registers controls"| node_reader
node_font_plugin -->|"registers controls"| node_reader
node_sharing_plugin -->|"registers controls"| node_reader

click node_chapter_source "https://github.com/clauswilke/dataviz/blob/master/introduction.Rmd"
click node_visual_principles "https://github.com/clauswilke/dataviz/blob/master/aesthetic_mapping.Rmd"
click node_chart_choices "https://github.com/clauswilke/dataviz/blob/master/visualizing_amounts.Rmd"
click node_chart_forms "https://github.com/clauswilke/dataviz/blob/master/visualizing_distributions_I.Rmd"
click node_data_context "https://github.com/clauswilke/dataviz/blob/master/balance_data_context.Rmd"
click node_storytelling "https://github.com/clauswilke/dataviz/blob/master/telling_a_story.Rmd"
click node_rendered_book "https://github.com/clauswilke/dataviz/blob/master/_book_production/index.html"
click node_bookdown_plugin "https://github.com/clauswilke/dataviz/blob/master/_book_production/libs/gitbook-2.6.7/js/plugin-bookdown.js"
click node_search_plugin "https://github.com/clauswilke/dataviz/blob/master/_book_production/libs/gitbook-2.6.7/js/plugin-search.js"
click node_font_plugin "https://github.com/clauswilke/dataviz/blob/master/_book_production/libs/gitbook-2.6.7/js/plugin-fontsettings.js"
click node_sharing_plugin "https://github.com/clauswilke/dataviz/blob/master/_book_production/libs/gitbook-2.6.7/js/plugin-sharing.js"
click node_lunr "https://github.com/clauswilke/dataviz/blob/master/_book_production/libs/gitbook-2.6.7/js/lunr.js"
click node_highlight "https://github.com/clauswilke/dataviz/blob/master/_book_production/libs/gitbook-2.6.7/js/jquery.highlight.js"
click node_search_index "https://github.com/clauswilke/dataviz/blob/master/_book_production/search_index.json"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_chapter_source,node_visual_principles,node_chart_choices,node_chart_forms,node_data_context,node_storytelling toneBlue
class node_rendered_book,node_bookdown_plugin,node_search_plugin,node_font_plugin,node_sharing_plugin toneAmber
class node_lunr,node_highlight,node_search_index,node_reader toneMint
class node_reader_actor toneIndigo
```

## Components

### Book content

- [Chapter sources](https://github.com/clauswilke/dataviz/blob/master/introduction.Rmd): `introduction.Rmd`
- [Visual principles](https://github.com/clauswilke/dataviz/blob/master/aesthetic_mapping.Rmd): `aesthetic_mapping.Rmd`
- [Chart choices](https://github.com/clauswilke/dataviz/blob/master/visualizing_amounts.Rmd): `visualizing_amounts.Rmd`
- [Chart forms](https://github.com/clauswilke/dataviz/blob/master/visualizing_distributions_I.Rmd): `visualizing_distributions_I.Rmd`
- [Data context](https://github.com/clauswilke/dataviz/blob/master/balance_data_context.Rmd): `balance_data_context.Rmd`
- [Storytelling](https://github.com/clauswilke/dataviz/blob/master/telling_a_story.Rmd): `telling_a_story.Rmd`

### Reader experience

- [Rendered book](https://github.com/clauswilke/dataviz/blob/master/_book_production/index.html): `_book_production/index.html`
- [Book navigation](https://github.com/clauswilke/dataviz/blob/master/_book_production/libs/gitbook-2.6.7/js/plugin-bookdown.js): `_book_production/libs/gitbook-2.6.7/js/plugin-bookdown.js`
- [Book search](https://github.com/clauswilke/dataviz/blob/master/_book_production/libs/gitbook-2.6.7/js/plugin-search.js): `_book_production/libs/gitbook-2.6.7/js/plugin-search.js`
- [Font settings](https://github.com/clauswilke/dataviz/blob/master/_book_production/libs/gitbook-2.6.7/js/plugin-fontsettings.js): `_book_production/libs/gitbook-2.6.7/js/plugin-fontsettings.js`
- [Sharing controls](https://github.com/clauswilke/dataviz/blob/master/_book_production/libs/gitbook-2.6.7/js/plugin-sharing.js): `_book_production/libs/gitbook-2.6.7/js/plugin-sharing.js`

### Reading support

- [Search engine](https://github.com/clauswilke/dataviz/blob/master/_book_production/libs/gitbook-2.6.7/js/lunr.js): `_book_production/libs/gitbook-2.6.7/js/lunr.js`
- [Text highlighting](https://github.com/clauswilke/dataviz/blob/master/_book_production/libs/gitbook-2.6.7/js/jquery.highlight.js): `_book_production/libs/gitbook-2.6.7/js/jquery.highlight.js`
- [Search index](https://github.com/clauswilke/dataviz/blob/master/_book_production/search_index.json): `_book_production/search_index.json`
- **Reader framework**

### Other components

- **Reader**

## Connections

- Reader → Rendered book: opens (evidence: `README.md`)
- Chapter sources → Rendered book: source for (evidence: `README.md`)
- Reader → Book search: searches
- Book search → Search index: fetches (evidence: `_book_production/libs/gitbook-2.6.7/js/plugin-search.js`)
- Book search → Search engine: builds index (evidence: `_book_production/libs/gitbook-2.6.7/js/plugin-search.js`)
- Book search → Text highlighting: highlights matches (evidence: `_book_production/libs/gitbook-2.6.7/js/plugin-search.js`)
- Book search → Reader framework: uses framework (evidence: `_book_production/libs/gitbook-2.6.7/js/plugin-search.js`)
- Book navigation → Reader framework: registers controls (evidence: `_book_production/libs/gitbook-2.6.7/js/plugin-bookdown.js`)
- Font settings → Reader framework: registers controls (evidence: `_book_production/libs/gitbook-2.6.7/js/plugin-fontsettings.js`)
- Sharing controls → Reader framework: registers controls (evidence: `_book_production/libs/gitbook-2.6.7/js/plugin-sharing.js`)
