docs: function downloadSublayerData(visJson, layerIndex, sublayerIndex, dest, callback) {
      var layer = visJson.layers[layerIndex],
          sublayer = layer.options.layer_definition.layers[sublayerIndex];
  
      (0, _mkdirp2['default'])(_path2['default'].dirname(dest), function () {
          var dataFile = _fs2['default'].createWriteStream(dest).on('close', function () {
              if (callback) {
                  callback();
              }
          });
  
          var req = (0, _request2['default'])({
              url: getLayerSqlUrl(layer),
              qs: {
                  format: 'GeoJSON',
                  q: getSublayerSql(sublayer)
              }
          });
  
          req.pipe(dataFile);
  
          // Show progress as file downloads
          req.on('response', function (res) {
              var len = parseInt(res.headers['content-length'], 10);
              var bar = new _progress2['default']('  downloading [:bar] :percent :etas', {
                  complete: '=',
                  incomplete: ' ',
                  width: 20,
                  total: len
              });
  
              res.on('data', function (chunk) {
                  bar.tick(chunk.length);
              });
  
              res.on('end', function (chunk) {
                  console.log('\n');
              });
          });
      });
  }