Visualizing the State of the Union Addresses

The State of the Union is the address presented by the President of the United States to a joint session of the United States Congress, typically delivered annually. The address not only reports on the condition of the American nation but also allows presidents to outline their legislative agenda and their national priorities.

I thought visualizing the occurrence of words from the first address in 1790 to today might be interesting to see. Using regular expressions I search for each comma-separated word that the user typed in the search field. Given that speeches are of variable length I normalized for speech length by calculating the occurrence of a word per 10,000 words of text. Republicans are represented by red, democrats by blue.

Clicking on a particular circle shows more statistics regarding the specific speech and loads the quotes from the text where the search terms appear, allowing for closer inspection.

Try it out yourself!


Interesting results:

american, americans, america




terrorist, terrorists, terrorism, terror


See any patterns?


Technical specs:

The front-end is written in P5.js, a cute little Javascript library based on the Processing paradigm and the back-end was written in Python, with the Flask micro-microframework serving the content. The source of the speeches was the project Gutenberg.

Why don’t you give it a go yourself? Visit