Skip to content

Instantly share code, notes, and snippets.

@GerardoFurtado
Last active April 3, 2018 23:46
Show Gist options
  • Save GerardoFurtado/a1e47454526468ca3b2f62aa7212e2df to your computer and use it in GitHub Desktop.
Save GerardoFurtado/a1e47454526468ca3b2f62aa7212e2df to your computer and use it in GitHub Desktop.
fresh block
license: mit
foo bar baz
12 23 43
21 43 52
foo bar baz
92 76 48
87 17 17
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v5.min.js"></script>
<style>
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; }
</style>
</head>
<body>
<h1>Please check the console</h1>
<script>
var csv1 = d3.csv("file1.csv");
var csv2 = d3.csv("file2.csv");
Promise.all([csv1, csv2]).then(function(data){
console.log("Files loaded!")
console.log("File 1: " + JSON.stringify(data[0]))
console.log("File 2: " + JSON.stringify(data[1]))
});
</script>
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment