Mapping the US presidential election 2016 results

In this example we are going to explain how to create a beautiful map showing the results of the US presidential election in 2016 by state. For this map we will use the election results data from Wikipedia.

The map we are going to create has this url:

https://urlmaps.com/143?c=f07763&a=AL|AK|AZ|AR|FL|GA|ID|IN|IA|KS|KY|LA|MI|MS|MO|MT|NE|NC|ND|OH|OK|PA|SC|SD|TN|TX|UT|WV|WI|WY&nz=1&fc=698ec6&bc=fff

You can easily test every step yourself by copying the url and pasting it in the url bar of another browser tab or window.

us states map - all areas

Creating this map (in 4 simple steps)

In 4 simple steps we get to our final result:

1. Select a base map

us states map - all areas

We start with the base map. From the urlmaps list of available maps we select the US States map (map id 143).

https://urlmaps.com/143

2. Color the areas

us states map - all areas

We add the a-param with the area codes of the states that Trump won and define a color to fill those states using the c-param.

https://urlmaps.com/143?c=f07763&a=AL|AK|AZ|AR|FL|GA|ID|IN|IA|KS|KY|LA|MI|MS|MO|MT|NE|NC|ND|OH|OK|PA|SC|SD|TN|TX|UT|WV|WI|WY

3. Center the map

us states map - all areas

By default the map is centered according to the areas that are colored. In this case we want to show the whole map. By using the nz-param (no zoom) we can show the full map.

https://urlmaps.com/143?c=f07763&a=AL|AK|AZ|AR|FL|GA|ID|IN|IA|KS|KY|LA|MI|MS|MO|MT|NE|NC|ND|OH|OK|PA|SC|SD|TN|TX|UT|WV|WI|WY&nz=1

4. Finalize the styling

us states map - all areas

By coloring the remaining states (those won by Clinton), using the fc-param and using white borders (bc-param) we get our final result.

https://urlmaps.com/143?c=f07763&a=AL|AK|AZ|AR|FL|GA|ID|IN|IA|KS|KY|LA|MI|MS|MO|MT|NE|NC|ND|OH|OK|PA|SC|SD|TN|TX|UT|WV|WI|WY&nz=1&fc=698ec6&bc=fff