# Sentiment strip

> Use a sentiment strip to show how the mood of a text moves from start to end: every sentence as a thin bar, coloured by its sentiment score.

- Data type: Words and text (`text`)
- Pro · not released yet: its code is not available; try it on its page, or use a free chart of the same data type (`text`)
- Example: **A Christmas Carol is gloomiest in its first stave and brightest in its last** (Every sentence of Dickens's A Christmas Carol (1843), scored with the AFINN word list)
- How to read it: Each stave is a strip read left to right; each bar is one sentence, as wide as its words and coloured by whether its words lean warm or dark; the line is the running mood.
- Phone: Adapts to mobile (Draws its own phone layout below 520px) · Video formats: 16:9, 9:16 (best 9:16)

## Use it when
- you want the arc of a long text: a novel, a speech, a transcript
- where the mood shifts matters more than any one sentence
- the text has parts (chapters, acts) to compare

## Avoid it when
- precise sentiment matters (word lists miss irony and negation)
- the text is a few sentences (show the text itself)
- the language is not covered by the word list

## Fields (data.json)
- `staves` (category): the parts of the text, in order (staves, chapters, acts); headed with hints.part, else "Part", and a Roman numeral
- `columns` (text): the order of values in each sentence row
- `sentences[][0] stave` (id): which part the sentence is in (0 is the first)
- `sentences[][1] score` (number, unit "AFINN score", format decimal): sum of AFINN scores of its words (negative is darker)
- `sentences[][2] words` (number, unit "words", format count): number of words; sets the bar's width
- `sentences[][3] text` (text): the sentence's opening words

Units are the example's: with your own data, set each number field's `unit` and `format` (percent, count, decimal, currency, compact) in the meta you pass to mount, or `chartreuse render --unit field=text --format field=count`. Scales and labels follow your data.

## Interactions, motion, sound
- hover or tap a bar to read the sentence and its score
- Motion: The sentences fill in left to right, stave by stave, as if the book were being read; then the mood line draws on.
- Sound: A pop on hover, higher for warmer sentences; a sheet of paper unrolling as Play reaches the last stave. Quiet while the book fills in and between staves; mute it from its card. (sound is off until the viewer turns it on)

## Example spec
```json
{
  "chart": "sentiment-strip",
  "title": "A Christmas Carol is gloomiest in its first stave and brightest in its last",
  "subtitle": "Every sentence of Dickens's A Christmas Carol (1843), scored with the AFINN word list",
  "data": "/charts/sentiment-strip.data.json"
}
```

## Source
A Christmas Carol by Charles Dickens (eBook #46); AFINN-165 sentiment lexicon, Project Gutenberg; Finn Årup Nielsen (Public domain (text); Apache 2.0 (AFINN lexicon)), retrieved 2026-12-01: https://www.gutenberg.org/ebooks/46

Note: Scores count words, not meaning: "not happy" scores as happy. Sentences under three words are left out. The lexicon is at https://github.com/fnielsen/afinn.

Live: /charts/sentiment-strip · Manifest: /charts/sentiment-strip.json · Tags: sentiment, text, mood, novel, Dickens, literature, story arc, reading
