Skip to content

Instantly share code, notes, and snippets.

@ramiroaznar
Last active December 15, 2016 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ramiroaznar/b38b8f172f2f33852ba20c4c06b98b2a to your computer and use it in GitHub Desktop.
Save ramiroaznar/b38b8f172f2f33852ba20c4c06b98b2a to your computer and use it in GitHub Desktop.
Torque + choropleth clusters
  • ne_10m_populated_places_simple dataset from CARTO Data Library
  • Inspired by Andrew Hill's More on the Torque unknown blog post
  • Map
Map {
-torque-frame-count: 1;
-torque-animation-duration: 0;
-torque-time-attribute: "cartodb_id";
-torque-aggregation-function: "count(1)";
-torque-resolution: 12;
-torque-data-aggregation: cumulative;
}
#layer {
marker-width: 5;
marker-fill: #FFB927;
marker-fill-opacity: 0.9;
marker-line-width: 1;
marker-line-color: #000;
marker-line-opacity: 1;
}
#layer[value < 12]{
marker-fill:brown;
}
#layer[value < 10]{
marker-fill:red;
}
#layer[value < 8]{
marker-fill:orange;
}
#layer[value < 6]{
marker-fill:yellow;
}
#layer[value < 4]{
marker-fill:blue;
}
#layer[value < 2]{
marker-fill:green;
}
@ramiroaznar
Copy link
Author

torque

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