block by pbogden 62244b94a1da2db963db

d3 gsheet plugin (JSONP)

Full Screen

Google spreadsheet as a data source (JSONP).

#d3.gsheet(key [, sheet], callback)

Retrieves data from the Google Spreadsheet associated with the spreadsheet key. The optional sheet is a string that corresponds to the name of the desired sheet in the spreadsheet. The default is to read the first sheet. The callback is invoked with an array of objects as the argument, consistent with d3.csv().

To adapt this demo to another spreadsheet, you must:

The plugin uses Google’s Chart Tools Datasource Protocol.

Note: The plugin uses JSONP. In general, it’s a good idea to avoid JSONP because of security issues. The simpler approach uses Google’s CORS-enabled servers. But as of Dec 2014, URLs beginning with https://docs.google.com/spreadsheets are not CORS enabled.

The D3 plugin is experimental and has no error checking.

index.html

table.css