For our first example, we're going to create an election map for the 2016 presidential election. In this map, we'll color the results of each individual county based on whether they voted democrat or republican. The map we create will look like this:
Additionally, we'll also show a list of small cubes below the map that show the results of the individual counties. These counties are ordered per state (as they already appear like that in our source data). Before we can do all this, we first need to collect the data, and prepare it for use in D3.