I'm making a map about terrorist attacks and fatalities in CartoDB. For data clustering I'm using quantiles. The calculated buckets are 16, 32, 50, 97, 700. Is it okay to adjust the quantiles to make them more readable, like 15, 30, 60, 90, 700?

Personally, I think it doesn't matter, since the data clustering is arbitrary and the map would look totally different, if I had used a different clustering method.

  • 2
    If the appearance of the map is so sensitive to the binning method, you are right to be concerned; and clearly some choices you are making in how you bin the data do matter. But shouldn't you first be thinking about which binning methods would be appropriate for these data and your analytical intentions? Once you select a good method, then you can easily check whether rounding the cutpoints makes a material difference.
    – whuber
    Jan 27, 2015 at 18:39

2 Answers 2


since the data clustering is arbitrary

The data clustering is not arbitrary, cartodb uses different clustering techniques:

  • quantiles
  • head and tails
  • jenks
  • equal interval

If you change the data clustering for your needs is ok but take into account you are not doing data visualization.

for reference, these are the source code for the functions to cluster data:

https://github.com/CartoDB/cartodb-postgresql/blob/master/scripts-available/CDB_JenksBins.sql https://github.com/CartoDB/cartodb-postgresql/blob/master/scripts-available/CDB_QuantileBins.sql https://github.com/CartoDB/cartodb-postgresql/blob/master/scripts-available/CDB_HeadsTailsBins.sql https://github.com/CartoDB/cartodb/blob/master/lib/assets/javascripts/cartodb/models/tabledata.js#L415

  • Sorry, I meant arbitrary as in "It doesn't matter which clustering algorithm you choose, because there is no right or wrong."
    – stekhn
    Jan 27, 2015 at 15:11

IMHO its only a theme of "how paint the data" if you think its best for the understanding of the map change the colour of certain data or location there are no problem. But if you are changing the data to a better adaptation to your personal needings...not a good choice.

  • Thanks for your input. I'm not thinking about messing with the data, only with the representation of the data.
    – stekhn
    Jan 27, 2015 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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