D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
justingrbaker
Full window
Github gist
Meteorite Test
<!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> <svg width="1500" height="2000"> <text x="200" y="200" style="font-family: Arial; font-size : 34; stroke : #000000; fill : #00ff00; " >Meteorites!</text> <ellipse cx="50" cy="50" rx="40" ry="30" style="stroke: #ff0000; stroke-width: 5; fill: none; "/> <path d="M240,220 A230,230 0 0,0 70,70" style="stroke: #cccc00; stroke-width:2; fill:none;"/> <path d="M240,220 A230,230 0 1,0 70,70" style="stroke: #ff0000; stroke-width:2; fill:none;"/> <path d="M240,220 A230,230 0 1,1 70,70" style="stroke: #00ff00; stroke-width:2; fill:none;"/> <path d="M240,220 A230,230 0 0,1 70,70" style="stroke: #0000ff; stroke-width:2; fill:none;"/> </svg> <p>Meteorites are very interesting!</p> <script type="text/javascript"> //Load in contents of CSV file //d3.csv("betterlifeindex.csv", function(data) { d3.csv("meteorites.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