I've got a geocoded data set with campaign donations. I want to make a torque heatmap that reflects the size of the donations -- the point being that while there are more donations from within the state, most of the money is coming from outside the state.

I can create a torque heatmap that reflects the number of donations over time, but can't figure out how to have the data points reflect donation size rather than just the number of donations from that location. Any suggestions?

  • It might help to specify what software you are using. Sep 19, 2016 at 15:00

1 Answer 1


Torque Heatmap is a variation of CARTO Torque map and it shows the density of the points. The CARTO Torque map is an aggregator, it takes the range at time from your first date to your last date as one unit, then it breaks them into smaller buckets/pieces/classes of time. The number of buckets depends on the number of steps that you choose in the wizard/CartoCSS.

Torque is also a spatial aggregator, it's going to render an animation point representing a cluster of your dataset points. So when a user is looking at your map it wouldn't necessarily see points at the exact coordinates in your dataset like they would do in a non-torque map.

See cartodb-spatial-aggregation for more information.

Because the Torque Heatmap is a variation of the Torque map, the points of the map won't be exactly the points of your dataset, and the attributes of "Heatmap points" won't be the exact attributes of your dataset. The Heatmap creates one point for each grid cell that represents an aggregation of all the original points in that cell. The way those points are aggregated is defined in this CartoCSS line:


"count(cartodb_id)" means CARTO will count up the number of points in each grid cell.

Maybe for your use case it would be better to use a Torque Category map, where you can define a Torque map and change the size of your points depending on a category of your dataset. In this section of the CARTO Map Academy you can find more information about Heatmap and Torque maps.

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.