A campaign year is usually described as one rising line. Attention built through the spring, the account goes, peaked in November, and fell away. That sentence treats a country’s attention as a single quantity. It is not one quantity. It is many stories competing for the same finite days, and the mix changes constantly. So turn the sentence into a question you can check: over a year, what was the public’s attention actually made of, and when did the mix change?
Answering that means drawing twelve series at once, and the twelve do not share a scale. The largest is 308 times the smallest, and the busiest day is 53.6 times the median day. Put all twelve on one ordinary axis and you will see two of them, with a flat line where the other ten are.
Two chart forms exist for exactly this problem: the streamgraph, which stacks every series into one flowing ribbon of coloured bands, each band’s thickness being that series’ count, and the horizon chart, which gives every series a thin row of its own and folds the tall parts back down into it. This brief draws the same 4,392 numbers in both. Neither is a compromise, because they fail in opposite directions, and knowing which failure you are buying is the whole skill.
The measure is daily readership of twelve English Wikipedia articles, every day of 2024. The counts are the daily pageviews the Wikimedia Foundation publishes for every article, free and in the public domain (https://wikimedia.org/api/rest_v1/#/Pageviews%20data), a pageview being one request for one article by a human reader, as counted by the Foundation’s servers.1 They are the same counts this book’s media-attention brief reads, and that brief says in full where they come from and asks what a pageview is worth.
Why a pageview log, of all sources? Nobody at Wikimedia set out to measure American politics. These counts are the by-product of running a very large website, tallied because a server tallies what it serves. That makes them an administrative record rather than a survey, which is the kind of file this section of the book is about. Nobody was asked anything and nobody had to remember anything.
The record is also daily and unbroken across a whole year, which gives a spike something to be a spike against. And it is exactly the kind of series that breaks an ordinary chart, which is why this brief spends it on a question about form.
series.csv holds one row per article per day. Three rows
look like this:
| Date | Article | Views |
|---|---|---|
| 2024-08-06 | Kamala Harris | 323,183 |
| 2024-08-06 | Opinion poll | 367 |
| 2024-08-06 | Tim Walz | 3,811,244 |
| Column | What it holds | Measurement |
|---|---|---|
| date | the day, in 2024 | discrete |
| article | one of twelve English Wikipedia articles | categorical |
| views | how many human readers opened it that day | count |
The table is the media-attention brief’s counts laid out as a complete grid. Twelve articles by 366 days is 4,392 cells, and every one of them is present. Nothing was filled in. To impute is to fill in a value nobody recorded, by guessing it from other things, and 0 cells here are imputed.
That zero was once a one, and the reason is worth a sentence. A stacked layout cannot leave a hole, because every day needs a total. The one missing cell turned out to be a symptom: the counts had been requested under the title the JD Vance article has now, so every day before the article was renamed came back with only the trickle of readers who arrived by the new spelling. Both titles are now counted and added together, and the hole is filled by a real number rather than a guess.
Four tables sit under this brief. series.csv is the grid
itself. stream.csv adds y0 and y1
for every article-day — the lower and upper edge of that article’s band
on that day — which is the stacking decision written down: the layout is
computed once, so the printed figure and the browser’s figure draw the
same polygons. articles.csv carries one row per article,
with total, peak, peak_date,
median_day and stack_order.
events.csv holds the 9 dated campaign events, compiled by
hand and kept separate from the pageviews.
| Article | Total views | Busiest day | Views that day |
|---|---|---|---|
| 2024 United States presidential election | 30,764,959 | 2024-11-06 | 4,260,085 |
| Kamala Harris | 29,333,462 | 2024-07-22 | 2,532,334 |
| Donald Trump | 27,138,039 | 2024-11-06 | 2,782,082 |
| JD Vance | 23,784,303 | 2024-07-15 | 5,120,129 |
| Project 2025 | 20,195,431 | 2024-11-06 | 722,256 |
| Joe Biden | 15,272,748 | 2024-11-06 | 513,809 |
| Tim Walz | 11,710,082 | 2024-08-06 | 3,811,244 |
| Swing state | 1,415,874 | 2024-11-06 | 252,647 |
| Springfield, Ohio | 555,153 | 2024-09-11 | 57,339 |
| Opinion poll | 130,618 | 2024-06-01 | 1,594 |
| Electoral College | 102,084 | 2024-11-06 | 7,969 |
| Haitian Americans | 99,727 | 2024-09-13 | 3,984 |
The busiest days are not a surprise once you read them. Tim Walz peaked at 3,811,244 on 6 August, the day he was named to the ticket. Most of the rest peaked on the day after the election.
Before you look at either figure, commit to a number. The smallest of these twelve series is Haitian Americans, and the largest is 308 times its size. In a picture that stacks all twelve together, what percentage of the ink will the smallest one get? Write your answer down.
Figure 1. Twelve articles’ daily readership, stacked as a streamgraph. Bands are stacked around a centred baseline rather than on zero: on each day the ribbon is placed so that half of its thickness lies above the midline and half below, which is why its bottom edge wanders. That edge is not the value of anything; it traces one half of each day’s total, downward. The thickness of the whole ribbon on any day is that day’s total and each band is one article’s share of it. This is the form to reach for when the question is about composition, because it puts every series in one frame and lets you watch the shares change. The faint vertical lines are the 9 campaign events; move the pointer and the legend fills in with that day’s numbers.
The shape answers the opening question. The ribbon is thin until late June, swells through the summer, and goes vertical in the first week of November: 11,277,899 views on 2024-11-06 against a median day of 210,372. You can see the campaign happen.
The exceptions are the most useful part. Tim Walz’s band has no visible thickness at all until 6 August, the day Harris named him her running mate,2 when it arrives at 3,811,244 views in a single day: 82.8% of everything read that day about all twelve subjects together. A composition chart can show a component appearing from nothing, which a chart of one running total cannot.
You can also watch the range problem come back inside the form meant to solve it. The vertical axis has to reach 11,277,899, so the ten months before September are drawn a few pixels tall. The whole spring is a hairline. A July that was 10.2 times as busy as February looks much like it. A streamgraph rescales nothing: it stacks, and a stack inherits every extreme in the data.
Now try to use it. Pick a date in September and read how many people were reading about Kamala Harris. You cannot, and the reason is structural. Take 10 September, the day of the Harris–Trump debate. The ribbon that day is 313,914 views thick. Her band’s lower edge sits 110,079 below the midline and its upper edge 10,238 below it, so the band is 99,841 thick, and that thickness is her number. But neither edge is on an axis. The lower one is the running total of the 5 bands stacked beneath hers, and that total moves from day to day; the upper one is the lower one plus her own count. The eye is bad at judging the gap between two wandering curves, and it reads the slope of the top edge as though it were the value. The band for Haitian Americans that day is 1,534 views thick inside a ribbon of 313,914, which is why you cannot find it at all.
That is the streamgraph’s trade. One quantity has a baseline, the day’s total, and it is the only quantity the figure states plainly. Everything else is a thickness. The legend fills in with numbers on hover because the figure cannot answer the question on its own.
Figure 2. The same twelve series as a horizon chart. Each article gets one row, 34 pixels tall, so the series is cut into bands: the tall part is folded back down over the short part and drawn darker each time. The darkest ink means the value went off the top of the row more than once. The number at the right of each row is the height one band represents.
Every row now has a baseline, and it is at the bottom where a baseline belongs. You can read Springfield, Ohio was quiet until September and then spiked twice straight off the row. Figure 1 could not show you that at all.
Now grade your prediction. Haitian Americans accounts for 0.06% of the year’s 160.5m views. In Figure 1 its band is a hairline you cannot find. In Figure 2 it fills a row like every other series, and you can read its shape.
The cost is that a horizon chart is not beautiful and does not want to be. It is a dense, banded, slightly ugly object built to be scanned rather than admired. The folding has to be explained before anybody can read it, which is a real cost in a brief, a newspaper or a slide.
Both figures hide the same decision, and Figure 2 puts a button on it. By default each row is measured against its own maximum, so every series fills its row and every row is readable. Press the button and all twelve are measured against the largest, and the bottom rows go flat.
Neither setting is wrong, and they answer different questions. Against its own maximum, a row says when was this article busy, relative to its own busiest day. Against the largest, it says how much of the country’s reading was this. Haitian Americans is 308 times smaller than 2024 United States presidential election, so on a shared scale it is invisible. That invisibility is the honest answer to the second question and a useless answer to the first.
This book’s sparklines brief meets the same choice for fifty-one states and resolves it the other way, on one shared scale, because there the question was how far each state moved against the others. The form does not decide it. The question does, and the only real error is not saying which you chose.
Pageviews are not attention, and they are certainly not opinion. A view is somebody opening a page. It does not say whether they read it, agreed with it, or arrived from a search for something else. The media-attention brief takes that argument up properly.
Twelve articles is a choice, and it is the whole universe of these figures. Both forms show composition, the streamgraph literally so, and composition is computed over whatever was captured. Add a thirteenth article and every band in Figure 1 changes thickness without a single pageview changing.
Neither figure can be read for a value. A streamgraph gives one baseline to twelve series; a horizon chart gives twelve baselines but folds the tall values out of sight. If a reader needs the number, it belongs in a column of type beside the picture.
A centred baseline is a choice too. This brief’s streamgraph puts the midpoint of each day’s total on a straight line. Other implementations minimise wiggle instead, or sit the stack on zero. All three are called streamgraphs, they place the same series in visibly different places, and none of them makes an individual band easier to measure.
None of these is answered above, and every one can be answered by sorting or grouping the tables the Sources section hands over.
articles.csv has total, peak
and peak_date for every series. Sort by total.
Which series are large enough to see at all in a stacked chart, and
where does the rest of the list fall away?stream.csv has y0 and y1 for
each article and day, which is the stacking decision made explicit.
Subtract one from the other for a series in the middle of the stack,
then try to read that same value off Figure 1.articles.csv gives every series a
stack_order. Reorder the twelve yourself and work out what
the picture would emphasise instead. Should a chart’s conclusion depend
on that?events.csv to series.csv on
date. Do the peaks in views land on the event
days, or do they arrive before and after?Two stretch ideas go past the spreadsheet. Add a thirteenth article’s counts for the same year: every band in Figure 1 changes thickness, and no pageview has changed. And take a set of series from somewhere else entirely, such as fifty-one states’ turnout, and decide which of these two forms that set wants.
Data
y0 and y1 for every band on
every day, computed once so that print and screen draw the same shapes),
one row per article, and the events. Every number above is computed from
them when this page is rendered.Method
The data itself
Every figure above is drawn from these tables. They are plain CSV, they open in a spreadsheet, and they are yours to take further.
articles.csv, events.csv, series.csv, stream.csv
One more file is not data about the subject – it is how this chapter
checked its own numbers: facts.csv, the individual
numbers the text above quotes.
The definition, and what is filtered out as automated traffic: https://meta.wikimedia.org/wiki/Research:Page_view.↩︎
https://www.npr.org/2024/08/06/nx-s1-5057604/tim-walz-harris-vice-president.↩︎