Chronicling America App

Live demo.

This application was my submission to Challenge.gov's Chronicling America competition. It uses the Library of Congress's Chronicling America API along with historical and geographical data to create a map of state newspaper coverage of presidential candidates vs. the winner in that state. It also generates a timeline slideshow (accessible from the map) of the coverage of each candidate. The intent was to show how media coverage can affect election outcomes.

The app generates a map of the US (based on census data) for every election year that had associated Chronicling America newspaper data. The map includes a pie chart on every state. These pies are partitioned based on the number of hits each candidate's Chronicling America search returned (vs. the total in that state), while the winner of the election in that state is represented via the border color of the entire pie. Each pie is also scaled relative to total newspaper coverage in the nation (so, for example, the pie associated with Washington D.C. is usually much larger than Wyoming's).

I implemented this app using the Chronicling America API, Flask, D3 JS, and Timeline JS. The Chronicling America API is searched on key terms (including the candidates' names) and the resulting data is sorted by state and represented using the pie charts. D3 is a phenomenal library; creating maps and basic pie charts was surprisingly easy. Using the national results to scale each pie (and then color that pie based on more granular data) was the most difficult part of the process.

This tool has multiple limitations currently. For one, the overall trend of coverage vs. winner is not especially clear in the current format. There may be a better way to represent the data to indicate this (e.g. color the states by the winner), or the percentage of states that followed the more covered candidate could be printed next to the map. Another issue is that the availability of newspaper data from Chronicling America is based on which regions received grants to digitize their collections, so not all states have data to analyze.