Main Menu

Data

Repos

var url = "mozilla.json"; d3.json(url, function(err, data){ console.log(url, "error", err); console.log(url, "data", data) })

We can load data from a file.

Commits

var url = "https://api.github.com/repos/mozilla/pdf.js/commits"; d3.json(url, function(err, data){ console.log(url, "error", err); console.log(url, "data", data) })

We can load data from a remote URL if it supports CORS.
In Tributary

Usage Changes

var url = "usage_change.csv"; d3.csv(url, function(err, data){ console.log(url, "error", err); console.log(url, "data", data) })

We can load data from a csv as well.

Reddit

var url = "http://www.reddit.com/r/pics.json"; d3.json(url, function(err, data){ console.log(url, "error", err); console.log(url, "data", data) })

Reddit has one of the coolest APIs.

http://www.reddit.com/r/pics

vs.

http://www.reddit.com/r/pics.json

Top