You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Go to file
Stuart Lynn 2b61a508b2
adding in the histogram widget and supporting libraries
9 years ago
dist adds dists for 2.12 9 years ago
doc documentation for getValues 9 years ago
examples adding in the histogram widget and supporting libraries 9 years ago
img added example pause/play button 12 years ago
lib Code to aggregate histograms together 9 years ago
template recenter 12 years ago
test histograms tiles 9 years ago
.gitignore Fix suite, use `make prepare-test-suite` and open test/suite.html or 10 years ago
.travis.yml second att 9 years ago
LICENSE.txt replaces Vizzuality with Cartodb 9 years ago
Makefile added getValues to fetch values for step. Also adds some signals needed to be able to use it and some fixes to the makefile 9 years ago
NEWS updates news for 2.12 9 years ago
README.md CLA thing 9 years ago
index.html adds loop option to gui 10 years ago
package.json Merge branch 'master' of github.com:CartoDB/torque 9 years ago

README.md

Torque

Build Status

Render big, timeseries data in the client. Uses CartoDB to generate a datacube format. For a brief introduction to the format and methods, see our presentation slides

CartoDB users can use this code right away. Specify your username/tablename and datecolumn to get mapping time immediatley.

Have fun!

Torque library reference

Torque lets you render big, timeseries or categorical data in the client. This is useful for many modern applications that need more than just a static map. Early versions of Torque have been used to visualize human movement, Twitter activity, biodiversity data, and many more large-scale datasets.

The library uses CartoDB to generate a layercube format. For a brief introduction to the format and methods, see our presentation slides. If you are not using CartoDB to host your data, you can modify the input parameters to point toward any layercube service.

Getting started

The simplest way to use a visualization with Torque is...

Create a simple Torque visualization
``` javascript ...
... // define the torque layer style using cartocss var CARTOCSS = [ 'Map {', '-torque-time-attribute: "date";', '-torque-aggregation-function: "count(cartodb_id)";', '-torque-frame-count: 760;', '-torque-animation-duration: 15;', '-torque-resolution: 2', '}', '#layer {', ' marker-width: 3;', ' marker-fill-opacity: 0.8;', ' marker-fill: #FEE391; ', ' comp-op: "lighten";', ' [value > 2] { marker-fill: #FEC44F; }', ' [value > 3] { marker-fill: #FE9929; }', ' [value > 4] { marker-fill: #EC7014; }', ' [value > 5] { marker-fill: #CC4C02; }', ' [value > 6] { marker-fill: #993404; }', ' [value > 7] { marker-fill: #662506; }', ' [frame-offset = 1] { marker-width: 10; marker-fill-opacity: 0.05;}', ' [frame-offset = 2] { marker-width: 15; marker-fill-opacity: 0.02;}', '}' ].join('\n');
  var map = new L.Map('map', {
    zoomControl: true,
    center: [40, 0],
    zoom: 3
  });

  L.tileLayer('http://{s}.api.cartocdn.com/base-dark/{z}/{x}/{y}.png', {
    attribution: 'CartoDB'
  }).addTo(map);

  var torqueLayer = new L.TorqueLayer({
    user       : 'viz2',
    table      : 'ow',
    cartocss: CARTOCSS
  });
  torqueLayer.addTo(map);
  torqueLayer.play()

<script>
[Grab the complete example source code](https://github.com/CartoDB/torque/blob/master/examples/navy_leaflet.html)
<div class="margin20"></div>

### API
[see reference](https://github.com/CartoDB/torque/blob/master/doc/API.md)

## Submitting Contributions

* You will need to sign a Contributor License Agreement (CLA) before making a submission. [Learn more here.](https://cartodb.com/contributing)