D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
peripherie
Full window
Github gist
G7 GDP (module2)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Loading CSV Data with D3</title> <script type="text/javascript" src="https://d3js.org/d3.v3.js"></script> </head> <body> <p>Hello, D3!</p> <svg width="500" height="200"> <line x1="10" y1="10" x2="110" y2="10" stroke="blue" stroke-width="3" /> <rect x="100" y="100" width="400" height="30" fill="red" /> <circle cx="60" cy="60" r="50" fill="blue" /> <text x="100" y="100" fill="charcoal" font-size="56" font-weight="bold" font-family="Helvetica">Carpe Diem!!!</text> </svg> <script type="text/javascript"> //Load in contents of CSV file d3.csv("d3G7GDP.csv", function(data) { //Now CSV contents have been transformed into //an array of JSON objects. //Log 'data' to the console, for verification. console.log(data); }); </script> </body> </html>
Modified
http://d3js.org/d3.v3.js
to a secure url
https://d3js.org/d3.v3.js