Skip to content

Instantly share code, notes, and snippets.

@bsullins
Last active August 29, 2015 13:56
Show Gist options
  • Save bsullins/9238769 to your computer and use it in GitHub Desktop.
Save bsullins/9238769 to your computer and use it in GitHub Desktop.
D3js - Working with External Data
<html>
<head>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
</head>
<body>
<h1>Hello World!</h1>
<script>
d3.html("http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D%22https%3A%2F%2Fcoinbase.com%2Fapi%2Fv1%2Fprices%2Fhistorical%22&format=xml&diagnostics=true&callback=cbfunc", function(error, data) {
if(error){
console.log(error);
} else {
console.log(data);
}
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment