So I have a regular CartoDB map that has a torque layer with a timeSlider. I know how to access the date for the slider object, but is there a way to access the datapoints for each step as it goes along?

What I want to try and do is access the set of datapoints for each 'step' of the timeSlider, which would be each day in this case. So as the slider moves or steps, I'd have access to the set of data points for that particular day/step.

window.onload = function () {
      cartodb.createVis('map', 'https://wkaravites.cartodb.com/api/v2/viz/e04e6a5e-8e2e-11e5-9b84-0e787de82d45/viz.json', {
          zoom: 11
        .done(function(vis, layers) {
          var slider = vis.timeSlider;
        .error(function(err) {

enter image description here

1 Answer 1


So it looks like that CartoDB/Torque doesn't yet have a built in way to access the datapoints directly using Torque.

As stated to me in an email:

Just to clarify, torque is both a spatial & temporal aggregator. So it doesn't plot all of your lat/lon points exactly. Rather it lays an invisible grid over your map, and draws one marker for each grid cell that contains points, representing an aggregation of all of the points in the grid cell (you control the size of this grid via the "Resolution" setting). You're also able to control the type of aggregation. We have some more details about how torque aggregates data here.

So it's more of a plotter of points than data. What I ended up having to do is to grab the date of the current step and then run a CartoSQL query to get all of the points for that date.

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.