misoproject / dataset

JavaScript library that makes managing the data behind client-side visualisations easy
http://misoproject.com
GNU General Public License v2.0
1.18k stars 99 forks source link

Reduce incoming data size for google Importer #121

Closed iros closed 12 years ago

iros commented 12 years ago

Try

https://spreadsheets.google.com/a/guardian.co.uk/tq?key=[key here]&sheet=[sheet name}&tqx=version:0.6;responseHandler:[callbackname];reqId:0;out:json&tq&=[random seq]

iros commented 12 years ago

Because this format is less stable (google does not seem to properly escape all the json output, we have added it as an available secondary format. You can enable it by setting fast:true on a dataset instance like so:

var im = new Miso.Importers.GoogleSpreadsheet({
  key : "0Asnl0xYK7V16dFpFVmZUUy1taXdFbUJGdGtVdFBXbFE",
  sheetName : "States",
  fast : true
});

Note that, this format supports the sheetName property, not just the worksheet: N. This is only available for the fast format.