Skip to content

Instantly share code, notes, and snippets.

@ramiroaznar
Created March 1, 2017 14:07
Show Gist options
  • Save ramiroaznar/ded952d6fad5076d282bbf1ee30daf7c to your computer and use it in GitHub Desktop.
Save ramiroaznar/ded952d6fad5076d282bbf1ee30daf7c to your computer and use it in GitHub Desktop.
CartoCSS conditionals + TurboCARTO
#layer{
polygon-gamma: 0.5;
polygon-opacity: 0.8;
[participac <= 70]{
polygon-fill: ramp([participac], (#813753, #a65461, #541f3f, #c1766f, #d39c83, #e0c2a2, #ede5cf), jenks)
/* the color palette is switched, in fact it is only using two colors/classes */
}
[participac > 70]{
polygon-fill: ramp([participac], (#d1eeea,#a8dbd9,#85c4c9,#68abb8,#4f90a6,#3b738f,#2a5674), jenks)
}
}
@ramiroaznar
Copy link
Author

seleccion_053

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment