After reading Choropleth Mapping Using Quantile Method in CartoDB I decided that it was time for me to understand CartoDB's quantification methods. As I understand it, quantiles should contain an equal number of rows, equal intervals should place the cutoffs at ... equal intervals, and jenks should do some math and come up with groups that have the smallest standard deviation, more or less. I'm skipping heads/tails for now.
I created a slightly goofball map with 18 points, each with an age value from this list:
[11, 11, 12, 13, 14, 16, 19, 20, 20, 20, 23, 25, 26, 26, 31, 37, 38, 38]
I mapped them and then used the choropleth wizard to look at the implication of the various quantification methods. I expect the Quantile method to break the list into groups of six, which it does:
[11, 11, 12, 13, 14, 16]
[19, 20, 20, 20, 23, 25]
[26, 26, 31, 37, 38, 38]
I do not expect to see the logic in the Jenks method at a glance, but indeed, the Jenks groups each have a smaller standard deviation than the quantile groupings.
[11, 11, 12, 13, 14, 16, 19] SD = 2.928
[20, 20, 20, 23, 25, 26, 26] SD = 2.854
[31, 37, 38, 38] SD = 3.367
The SD for the quantile groups is 1.9, 2.3, 5.8 (At least per Calc's =STDEV function.)
So far so good. When I select Equal Intervals I was expecting cutoffs 8 or 9 years apart (so 19 and 28 or 20 and 30 but the CSS places the cutoffs exactly where the quantile cutoffs were, giving groups that are 5, 8, and 12 years long -- not very equal:
#interval_new [ age <= 38] {
marker-fill: #F03B20;
}
#interval_new [ age <= 25] {
marker-fill: #FEB24C;
}
#interval_new [ age <= 16] {
marker-fill: #FFEDA0;
}
Am I misunderstanding how equal intervals work? Or is this a bug?