Storywrangler
Navigation

Rank Turbulence Divergence

get /storywrangler/rtd

Lightweight rank-turbulence divergence between two dates for a single entity.

Returns per-term signed divergence contributions (wordshift) without the full allotaxonometer overhead (no diamond plot, no balance). Designed for fast on-the-fly comparisons (~80ms).

Positive divergence = term is more prominent on the target date.

Both dates and dates2 must be provided. The frontend should compute valid dates from manifest.availability metadata.

Filter dimensions are passed as extra query params (not listed above). Look up available filters via GET /registry/{domain}/{dataset_id} (transform.filter_dimensions). Use the dim / dim2 suffix convention: ?sex=M filters both systems, ?sex=M&sex2=F compares across filter values.

Query Parameters

domain string

Domain owning the dataset

dataset string

Dataset ID within the domain

entity

Global entity ID, e.g. 'wikidata:Q30' (United States)

dates

Target date, e.g. '2026-02-17'

dates2

Reference date, e.g. '2026-02-10'

alpha string

RTD alpha parameter (number or 'inf')

alphas

Comma-separated alphas for multi-alpha mode, e.g. '0.25,1.0,inf'

ngram_limit integer

Max types to load per system (0 = no limit)

wordshift_limit integer

Max wordshift entries to return (0 = no limit)

Available Datasets

Pass these as additional query parameters using the actual column names from each dataset.

babynames/ngrams

Baby names by popularity, year, and location with entity mappings

No filter dimensions.

reddit/ngrams

Reddit ngrams

n default: 1 · 1, 2
lang default: af · af, als, am, an, ar …and 162 more
vt-zoning-atlas/ngrams

Vermont zoning bylaw word frequencies by town.

No filter dimensions.

wikimedia/ngrams

Wikipedia n-grams by frequency, date, and location with entity mappings and ranks

ngram_size default: 1 · 1, 2
granularity default: daily · daily, monthly, weekly
curl -X GET http://localhost:8000/storywrangler/rtd \