Skip to content

Instantly share code, notes, and snippets.

@felipeluna
Forked from makoto/index.html
Created March 28, 2016 15:56
Show Gist options
  • Save felipeluna/5c9297c77d2cd4d8eabf to your computer and use it in GitHub Desktop.
Save felipeluna/5c9297c77d2cd4d8eabf to your computer and use it in GitHub Desktop.
Google Fusion json api using jQuery
<html>
<head>
<script type="text/javascript" src="http://d3js.org/d3.v2.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<style type="text/css" media="screen">
.chart rect {
stroke: white;
fill: steelblue;
}
</style>
</head>
<body>
<script type="text/javascript">
target_url = "https://www.google.com/fusiontables/api/query?sql=SELECT%20*%20from%201g5DrXcdotCiO_yffkdW0zhuJk0a1i80SPvERHI8"
$.getJSON(target_url + '&jsonCallback=?', function(data) {
document.write(JSON.stringify(data));
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment