{
  "id": "sentiment-strip",
  "name": "Sentiment strip",
  "family": "text",
  "tier": "pro",
  "summary": "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.",
  "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",
  "howToRead": "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.",
  "useWhen": [
    "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"
  ],
  "avoidWhen": [
    "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": [
    {
      "name": "staves",
      "type": "category",
      "description": "the parts of the text, in order (staves, chapters, acts); headed with hints.part, else \"Part\", and a Roman numeral"
    },
    {
      "name": "columns",
      "type": "text",
      "description": "the order of values in each sentence row"
    },
    {
      "name": "sentences[][0] stave",
      "type": "id",
      "description": "which part the sentence is in (0 is the first)"
    },
    {
      "name": "sentences[][1] score",
      "type": "number",
      "description": "sum of AFINN scores of its words (negative is darker)",
      "unit": "AFINN score",
      "format": "decimal"
    },
    {
      "name": "sentences[][2] words",
      "type": "number",
      "description": "number of words; sets the bar's width",
      "unit": "words",
      "format": "count"
    },
    {
      "name": "sentences[][3] text",
      "type": "text",
      "description": "the sentence's opening words"
    }
  ],
  "hints": {
    "part": "Stave"
  },
  "interactions": [
    "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.",
  "soundPicks": {
    "done": "paper-roll"
  },
  "annotations": [
    {
      "type": "underline",
      "words": "gloomiest",
      "in": "title"
    }
  ],
  "tags": [
    "sentiment",
    "text",
    "mood",
    "novel",
    "Dickens",
    "literature",
    "story arc",
    "reading"
  ],
  "mobile": "adapts",
  "mobileNote": "Draws its own phone layout below 520px",
  "mobileChecked": "2026-12-02",
  "ratios": [
    "16:9",
    "9:16"
  ],
  "bestRatio": "9:16",
  "source": {
    "title": "A Christmas Carol by Charles Dickens (eBook #46); AFINN-165 sentiment lexicon",
    "publisher": "Project Gutenberg; Finn Årup Nielsen",
    "url": "https://www.gutenberg.org/ebooks/46",
    "license": "Public domain (text); Apache 2.0 (AFINN lexicon)",
    "retrieved": "2026-12-01"
  },
  "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."
}