Skip to main content

Choropleth Mapping

Choropleth Mapping

Overview

Choropleth mapping is a visual representation of data over a geographic area. A good example would be the 2004 Presidential Election Map Here, the data, blue for democratic or red for republican is overlaid on a map of the United States.

Typically, choropleth maps are created using mapping software like Microsoft MapPoint or ArcGIS. However, these programs have licensing costs and a significant learning curve. For simpler choropleth mapping tasks, particularly for students, a solution based on the Google Maps API is a good alternative. There were several options considered, one was to create a SQL database of shapefiles and overlay them on to Google Maps, a good example of this is Mapeteria. There are some drawbacks to this approach. The first was the size of the overall application: converted shape files are quite large, and the database size will grow depending on detail. Another option was to keep a database of latitude and longitude specifying polygons. While not as accurate as shapefiles, the size of the database is more manageable.

Color-It

One implementation in particular is Color-It, which was created by Zonums Solutions. Color-It allows users to overlay region shapefile polygons over Google Maps. There are a few limitations to point out. Color-It uses a database to retrieve region divisions based on country. While the list is exhaustive, it is far from complete, so you may not find the country of interest. In addition, only one country can be mapped at a time, so you will not be able to compare one country to another.

To begin, you must select what type of coloring you want to perform. Color according to value will automatically select gradients between two colors and color regions based on the data values relative to the maximum and minimum values. Manual color selection will create a map that colors regions based on user input. Then select a country of interest from the list of countries sorted by continent.

Color According to Value

You will be presented with a table with all the colorable regions of a country and a corresponding data value. At this time, the data still needs to be entered manually, but offers the flexibility to easily manipulate data and change the map. If regions are missing data, you may also deselect regions by unchecking them in the table, Color-It will omit these regions. Once data is entered, you can select the colors for maximum and minimum values, the left color being the low value and the right being the high. You can also adjust the % opacity of the polygons as well as the width of the outline. Click on draw map to produce the choropleth map. If changes are required, you may adjust settings and click draw map again.

Manual Color Selection

This time, the data table will be replaced with an ellipsis button. Clicking on this button will bring up a color palette, where colors can be manually selected. The rest of the procedure is the same as Color According to Value.

Generating KML

For more detailed maps, Color-It also has the ability to convert your input into a Google Earth Compatible KML file. To perform the conversion, you can click on the generate KML file after clicking draw map. The file will be in KMZ (KML then ZIP) which you can extract into a KML file and open in Google Earth.

Mapeteria

While manually entering data does have the advantage of flexibility, it can become tedious when dealing with larger data sets. Mapeteria offers the ability to take a specifically formatted .CSV file and shade various geographical regions accordingly. The limitations are that currently Mapeteria only supports the United States, Canada and French Territories. We are currently working on expanding Mapeteria’s range.

Formatting .CSV

There is a strict format that .CSV files must come in. It is a three column table, the first having the ISO prefix for a certain country, i.e. United States is US. Next is the region prefix, California being CA. Finally, comes the value of interest. You don’t have to use a value for every region, just the ones you want shaded. Post this .csv file to a webserver and note the url so that Mapeteria can find it.

Options

There are options to divide your value of interest by the population or geographic area, and are generally useful for density studies. Otherwise, you may omit them. You may also specify what you want the maximum and minimum values to correspond to. This is really a function that adjusts shading contrast. If you find that a map isn’t shaded how you would like, you may change the max and min values to modify the shading.

Output

Finally, the output can be in both Google Maps web output or KML Google Earth. The polygons are generally quite demanding, so Google Maps output may take some time before it appears.

Custom Solutions

Yahoo Pipes

Yahoo Pipes offers an interesting alternative that may enable the integration of Color-It’s diverse KML generator and the flexibility of Mapeteria’s .CSV input. Currently, .CSV files are simple to convert into location linked data through Yahoo Pipes, but the difficulty lies in integrating the KML output in order to achieve the desired polygon shading effects. Possible solutions to this are to use a large KML file with every region of interest defined, and applying appropriate polygon shading styles through Yahoo Pipes. Unfortunately, the size of the overall KML file may be prohibitive to this method, as unnecessary polygons would be loaded every time a map was created. This is certainly a work in progress, and updates will be shown here.