{
  "id": "letter-frequency",
  "name": "Letter frequency",
  "family": "text",
  "tier": "free",
  "summary": "Use a letter-frequency chart to show how often each letter appears in a text, usually against a reference text so the differences stand out.",
  "title": "Gadsby's 51,810 words use the letter e four times, all of them printing slips",
  "subtitle": "Share of all letters, a to z, in Gadsby (1939) and Pride and Prejudice (1813)",
  "howToRead": "Each pair of bars is one letter: its share of every letter in each novel; Gadsby was written to avoid e altogether.",
  "useWhen": [
    "comparing the make-up of a text with a reference (ciphers, constrained writing, languages)",
    "there are up to about 30 symbols",
    "the shape of the whole alphabet matters"
  ],
  "avoidWhen": [
    "you care about words, not letters (use word frequency)",
    "there is no reference to compare with and the order means nothing",
    "more than 4 texts (only the first ones and the reference are drawn; the key says how many are left out)",
    "more than about 30 symbols (past 32 the least common fold into one \"…\" bar)",
    "the text is very short (shares are noisy)"
  ],
  "fields": [
    {
      "name": "books[].title",
      "type": "category",
      "description": "the text: 1 to 4 of them, side by side; the last is the reference (or the one titled hints.reference), and with one there is no comparison"
    },
    {
      "name": "books[].counts",
      "series": true,
      "type": "number",
      "description": "times each letter or symbol appears; its keys, in order, are the alphabet (a to z here, accents removed, case ignored)",
      "unit": "letters",
      "format": "count"
    },
    {
      "name": "books[].letters",
      "type": "number",
      "sign": "non-negative",
      "description": "all letters counted",
      "unit": "letters",
      "format": "count"
    },
    {
      "name": "books[].words",
      "type": "number",
      "sign": "non-negative",
      "description": "words counted",
      "unit": "words",
      "format": "count"
    }
  ],
  "interactive": [
    "sort"
  ],
  "interactions": [
    "hover or tap a bar to read the share and count",
    "sort in alphabet order or by how common each letter is in the reference text"
  ],
  "motion": "The bars grow letter by letter; then one letter is called out (hints.letter if set, else the one that differs most from the reference: e in the example).",
  "sound": "A whoosh on re-sort. Quiet while it draws and between steps; mute it from its card.",
  "annotations": [
    {
      "type": "underline",
      "words": "four times",
      "in": "title"
    }
  ],
  "tags": [
    "letters",
    "alphabet",
    "text",
    "frequency",
    "lipogram",
    "constrained writing",
    "literature",
    "cryptography"
  ],
  "mobile": "adapts",
  "mobileNote": "Draws its own phone layout below 520px",
  "mobileChecked": "2026-12-02",
  "ratios": [],
  "bestRatio": "9:16",
  "source": {
    "title": "Gadsby by Ernest Vincent Wright (eBook #47342); Pride and Prejudice by Jane Austen (eBook #1342)",
    "publisher": "Project Gutenberg",
    "url": "https://www.gutenberg.org/ebooks/47342",
    "license": "Public domain",
    "retrieved": "2026-12-01"
  },
  "note": "Gadsby is counted from the first line of its story to \"FINIS\", leaving out the introduction, which uses e freely. The transcriber notes that three \"the\"s and one \"officers\" slipped into the printed book; those are the four e's."
}