Back to Mapbox elections

Albers USA projection style

Albers USA projection style containing all 50 US states + Puerto Rico, and their counties.

When covering the US elections, not all map projections are created equal. Representation of all states matters. Albers USA is typically the go-to projection for US Elections because it shows a non-distorted Alaska and Hawaii in close proximity to the rest of the states. However, Mapbox basemaps are rendered in a web mercator projection by default.

For election visualizations and analysis, we created a map style that includes polygons and points for states and counties in an Albers USA projection. We've also included Puerto Rico for visualizations that go beyond election results, like campaign finance maps.

choropleth in Albers USA projection including Puerto Rico

What’s in the style?

The Albers USA map style features two tilesets, one for polygons and one for points -- “albersusa” and “albersusa-point” respectively. Each tileset has geometries for both states and counties. 

Properties

Both tilesets contain two sets of geometry, distinguishable by the `type` property.  Polygons and points that are of type "state" feature the following properties:

Property Description Type
state_fips State unique identifier string
name State name string
state_abbrev State postal code string
type Admin type: "state"/"county" string

Polygons and points that are of type `county` contain the following properties:

Property Description Type
state_fips State unique identifier string
county_fips County unique identifier string
county_name County name string
state_name State name string
state_abbrev State postal code string
type Admin type: "state"/"county" string

About the data

The data comes from the US Census 2018 cartographic boundary shapefiles. Territories like Guam and Puerto Rico were removed. To reproject and modify the data, we used the Mapshaper and Dirty Reprojectors npm packages. 

To use the style

To use the style and the tileset, you will need a Mapbox account. You can: 

  • Add the style to your account using this link
  • Add the tilesets via Mapbox GL JS

You can also join data to geometries using feature-state and the `promote-id` method. 

Limitation

The style is a representation of Albers USA in a web mercator projection. This means that to add any additional geometries, like points or polygons, you will need to reproject that data using Dirty Reprojectors in order to display “correctly” over the United States.

Read more

Read the tutorial: Guide to Albers USA projection in Studio.