Show streak data by...
Dynamic text div




Technical notes: This chart performs a re-sorting of the records based on results changed when the user makes a radio button selection. This code does not pass the sorted to the y-scale to effect the sorting; in fact, this D3 chart does not use any scale call for the y-axis; instead, values on the vertical axis are plotted by using the i value from function (d,i), and allowing 30 pixels down from the top margin for each increment of i.
There is also a dynamic <DIV> tag that changes to provide a different explanation each time the user makes a different selection. This is accomplished by changing the value of the innerHTML property.

https://www.cookpolitical.com/2020-national-popular-vote-tracker
Goldmine of data!
Every year since washington
https://www.presidency.ucsb.edu/statistics/elections/2020
https://www.presidency.ucsb.edu/statistics/elections/2024

Charts and text on this page ©2020-24 by Daniel Stober. All rights reserved.



Originally coded 2020-10-30 ...Before the 2020 election.
Last Updated 2025-06-02
Back to my charting page
DanStober.net