All examples By author By category About

rgdonohue

Dynamic Classification of CartoDB Choropleth Map

This technique demonstrates calculating class ranges (i.e. breaks) for dynamically coloring a choropleth requested from data hosted on CartoDB.

The solution requires two requests:

  1. first for the raw data so the full range of the data can be classified (here using the ckmeans clustering method from Simple Statistics)
  2. then to request the tiles using the generated cartoCSS rules

Data are percentages of uninsured Americans in 2015. Darker blue indicates higher percentage.

Legend comes next.