This is a D3.js visualization of the number of mentions 2016 Republican candidates received on television in 2015.
It's part of larger effort to build a tool to search and visualize closed captioning television scripts, Snapstream Reader.
The variable definitions are
- Total Matches: The total number of times the candidate's name appeared on a given day.
- Programs: The number of television programs in which the candidate's name appeared on a given day.
- Contexts: The number of television programs excluding commercials and reruns in which the candidate's name appeared on a given day.
Moving average takes the average of a moving window of 7 days to smooth out the lines.
Percentage normalizes each day so all the data points sum up to 100. This allows for comparisons of relative popularity.
Some neat interactive features:
- I used the D3 brush and SVG clipping to allow for select and zoom.
- If you hold the control key and hover over a data point, a tooltip will appear.
- Hovering over a name in the legend will highlight the candidate's line
See a more detailed exposition on my blog, PhillyPham.