Built with blockbuilder.org
Created
November 18, 2020 02:51
-
-
Save akulmehta/cf3ffc7a5b68cfa8c3616afa6c9130c7 to your computer and use it in GitHub Desktop.
d3 csv import 64882515
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: mit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
date | production | area | yield | |
---|---|---|---|---|
2015 | 11886.00 | 2030.00 | 58552.00 | |
2016 | 12864.00 | 2034.00 | 63245.00 | |
2017 | 10743.00 | 2021.00 | 53157.00 | |
2018 | 11235.00 | 1985.00 | 56599.00 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
<script src="https://d3js.org/d3.v4.min.js"></script> | |
<style> | |
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; } | |
</style> | |
</head> | |
<body> | |
<script> | |
d3.csv("CA.csv", function(data) { | |
data.forEach(function(d) { | |
d.date = d.date; | |
d.production = +d.production; | |
d.area = +d.area; | |
d.yield = +d.yield; | |
}); | |
console.log(data); | |
}); | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment