D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
wwwebb42
Full window
Github gist
Create SVG and load csv with D3
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>SVG and csv data in D3</title> <script type="text/javascript" src="https://d3js.org/d3.v3.min.js"></script> </head> <body> <svg width="500" height="250"> <circle cx="300" cy="140" r="90" fill="blue" /> </svg> <script type="text/javascript"> d3.select("svg").append("text") .text("Hello World!") .attr({"x" : 300, "y" : 150, "fill" : "blue", "font-size" : 0}) .transition() .duration(3000) .ease("bounce") .attr({"x" : 240, "fill" : "white", "font-size" : 24}) // Load the greenhouse gas data d3.csv("AIR_GHG_v2.csv", function(data) {console.log(data); }) </script> </body> </html>
Modified
http://d3js.org/d3.v3.min.js
to a secure url
https://d3js.org/d3.v3.min.js