My understanding of choropleth maps that use the quantile method is that they will assign an equal number of items to each bucket (see http://www.ncgia.ucsb.edu/cctp/units/unit47/html/comp_class.html).

A recent map I made with CartoDB generated a map that did not do this. Instead, most items were assigned to one bucket. Choropleth Map Example

Is CartoDB using a different type of quantile method than what I described?


Choropleth is using equal interval I believe. You can calculate the numbers for a couple different algorithms on your own by using some SQL helper functions we made (https://github.com/CartoDB/cartodb/wiki/CartoDB-PLpgSQL#wiki-statistical-functions). Then just use those results in your CartoCSS defined bins.

Doing it on the fly might take a bit of work in cartodb.js, but that should get you started.

  • We tried API query described in GitHub. It returned an error when we tried it with decimal values, but worked with integer values. Is this a possible explanation for why quantile would generate strange looking maps? Also - the default in CartoDB for choropleth is equal interval, but there is an option for quantile. When we choose quantile CartoDB generates a map like the one image, which could be due to the possible decimal issue? – Nathan Storey Jan 27 '14 at 22:13
  • But ... the choropleth wizard has a "quantification" pulldown that lets you select from Jenks, Quantile, Equal Interval and Heads/Tails. So one ought to be able to adjust the quantification and see that reflected on the map. – Amanda Jan 28 '14 at 18:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.