One way to understand a country is to go beyond individual election results to explore trends and changes throughout the years. To support this type of electoral analysis, we’ve created these tilesets which span the last four presidential elections and use geometries from Mapbox Boundaries to visualize returns and population data at both the county and state levels. These tilesets are available to all users via the "Add tileset by ID" option in Mapbox Studio.
We’ve created two pairs of tilesets showcasing results by states and by counties respectively. Each pair includes the shapes’ polygons and points for each level.
Note: The tilesets contain a field for FIPS code that you can use as the unique identifier for a county or state. The `FIPS` field is a string. If you need an integer field for FIPS code (for example, if you need to join it with an integer field in another dataset), the tilesets also contain an `id` field that is an integer version of the corresponding state or county FIPS code. For example, the FIPS code for Alameda county in California is 06001 so the `id` value for Alameda county in the tileset is 6001. Read more about how to work with the feature ids in Mapbox GL JS.
The county tileset contains the following properties for the years 2004, 2008, 2012, 2016:
The state tileset contains the following properties for the years 2004, 2008, 2012, 2016:
The shapes for counties and states are powered by Mapbox Boundaries. The county presidential returns for 2004, 2008, 2012, and 2016 are sourced from the MIT Election Data and Science Lab's "County Presidential Elections Returns 2000-2016."
The population data was pulled from the US Census Population Estimates Program. The source file for 2004 and 2008 can be found here and the source file for 2012 and 2016 can be found here.
The state voter turnout data for 2004, 2008, 2012, and 2016 is from The United States Elections Project by Michael P. McDonald, available under a CC-BY with exception license, and was accessed on January, 23rd 2020. Land area for each county and state are from the US Census 2019 TIGER counties shapefile.
To use the tileset, you will need a Mapbox account. Create a style in Mapbox Studio and add a new layer to your style. When selecting the data source for the new layer, use the "Add tileset by ID" option and enter one of the four tileset IDs:
In this example map we showcase the data available in the tileset using our Storytelling Template.
Explore tips for analyzing data from the past four presidential elections. Read the Deep dive into our new election tilesets.