0

I am trying to visualize a data set of geo-points that have a change over time on an attribute. My goal is to have an animation that each point changes its scale over time.

I read the documentation but I couldn't find a solution.

The code that I tried was:

Map {
-torque-frame-count:10;
-torque-animation-duration:10;
-torque-time-attribute:"time";
-torque-aggregation-function:"count(were_here)";
-torque-resolution:1;
-torque-data-aggregation:linear;
}

#vivlio{
  comp-op: lighter;
  marker-fill-opacity: 0.9;
  marker-line-color: #FFF;
  marker-line-width: 1.5;
  marker-line-opacity: 1;
  marker-type: ellipse;
  marker-width: 6;
  marker-fill: #FF9900;
}
#vivlio[value>150] {
  marker-width:50;

}
#vivlio[value > 500] {
  marker-width:100;

}
#vivlio[value > 600] {
  marker-width:200;  
}

An example of my data set is like this:

For a geopoint a

(Obj_id,Time,were_here)
(a,1,160)(a,2,600)(a,3,150)

In my animation I can't see scale difference over time. Can anyone help me please?

2

You need to use the [value] value directly in the marker-width instead of using it in the constraints. Try this one:

/** torque visualization */

Map {
-torque-frame-count:16;
-torque-animation-duration:10;
-torque-time-attribute:"time";
-torque-aggregation-function:"avg(were_here)";
-torque-resolution:2;
-torque-data-aggregation:linear;
}

#torque_sizes_ex{
comp-op: lighter;
marker-fill-opacity: 0.9;
marker-line-color: #FFF;
marker-line-width: 1.5;
marker-line-opacity: 1;
marker-type: ellipse;
marker-width:[value]/10 ;
marker-fill: #FF9900;
}

My result: http://team.cartodb.com/u/iriberri/viz/7a9ac1a4-c998-11e4-b631-0e853d047bba/embed_map

  • Thank you very much. Is it possible to change the marker width for different classes? For example for values >100 to have different marker width, than the other cases? – John Toumpalidis Mar 14 '15 at 14:27
  • Nice to see CartoDB members active here. Saludos desde Barcelona. +1 – John Powell Mar 16 '15 at 8:49

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.