make Carto torque points change over time start from begin date and disappear at end date

First time use the torque function... I have variables: IDnumber,start_date, end_date, size, longitude, latitude.

Anyone know how to make carto torque points change depends on different dates? I want to show the point on start dates, and make it disappear on its end date.

also I want to make each point size different depends on its size value.

Replay

Torque aggregates data points according to a timestamp variable. So first, you need to collect all your date columns into one (for instance, new_date). As I understand from your question (and correct me if I am wrong), you only have two. If you want to generate more, you can use some of the SQL queries suggested here.

But if you are just interested in showing the starting and ending point, choose the new_date as the Time Column within the Wizard in the CARTO Editor and voilá! One point will appear and disappear and then another point will appear and disappear (I recommend you to low the Duration to few seconds).

Finally, in relation to setting the marker-width according to column value, you can find here how to do it. But basically, you will need to set torque-aggregation-function to sum(size) and add these lines at the end of the autogenerated CartoCSS code:

#layer[value=20]{
  marker-width: 20;
}
#layer[value=40]{
  marker-width: 40;
}

And you will end up with a map like this:

make Carto torque points change over time start from begin date and disappear at end date

Category: carto Time: 2016-07-28 Views: 5

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 5.160 (s). 13 q(s)