node package manager
It’s your turn. Help us improve JavaScript. Take the 2017 JavaScript Ecosystem Survey »


d3.cartodb is an experiment to render cartodb visualizations using d3.

see an example or go to the viz.json viewer (just change the viz.json url in the url)

How to use it

Just create a leaflet map

var map = new L.Map("map", { center: [0, 0], zoom: 3 })
d3.cartodb.viz(viz_json_url, function(err, layers) {
    // work with layer 


You can find the library reference in the doc directory.


This project uses npm and browserify. To install the dependencies use npm install and to build the dists just make.

We use Karma with Jasmine as our testing stack. To run the tests once, run npm test. To run them in a debug environment, with the Chrome developer tools available, run make debugTest.

Notes on CartoCSS support

  • Not all CartoCSS rules are supported. Comp-op, for instance, is not yet available.
  • No more than one symbolizer is allowed per layer.
  • There is some pretty basic text support.