I cannot figure out how to use the torque map:
A typical row of my data, which is named torquedata3, looks like :
[nodenumber, lat,long,time,value]
.
I have multiple rows at the same time with each row having a different "value" ranging from 0-7. I simply want to display at each different node a different color depending on the value.
Sorry for how easy my question may seem but I can not get it to work, I have tried all sorts of different torque-aggregation-functions(avg, round(avg()), min, max, count)
.
Below is the code I am using (field 4 has the time and field_5 has my values I want to display).
/** torque visualization */
Map {
-torque-frame-count:30;
-torque-animation-duration:60;
-torque-time-attribute:"field_4";
-torque-aggregation-function:"count(field_5)";
-torque-resolution:1;
-torque-data-aggregation:linear;
}
torquedata3{
marker-width: 4;
[value = 0] { marker-fill: #229A00; }
[value = 1] { marker-fill: #0F3B82; }
[value = 2] { marker-fill: #7B00B4; }
[value = 3] { marker-fill: #000000; }
[value = 4] { marker-fill: #FF2900; }
[value = 5] { marker-fill: #CC4C02; }
[value = 6] { marker-fill: #993404; }
[value = 7] { marker-fill: #662506; }
}
I am now trying to create a heatmap.
I have changed some of the commands to
Map {
-torque-frame-count:30;
-torque-animation-duration:90;
-torque-time-attribute:"field_4";
-torque-aggregation-function:"sum(field_5)";
-torque-resolution:1;
-torque-data-aggregation:linear;
}
#torquedata3{
image-filters: colorize-alpha(red);
marker-file: url(http://s3.amazonaws.com/com.cartodb.assets.static/alphamarker.png);
marker-fill-opacity:0.5*[value];
marker-width: 5;
But I cannot do this multiplication on the value, I get the error message: Invalid value for marker-fill-opacity, the type float is expected. 0.5*[value](of type field) was given. I would like to use the marker file that fades in order to get a heat map type visual as opposed to the dots that do not fade into each other as much.