D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
soren123
Full window
Github gist
Airline Accident Data
<!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>Airline Accident Data</p> <script type="text/javascript"> //Load in contents of CSV file d3.csv("Airline_data.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> <svg width="5000" height="5000"> <circle cx="750" cy="100" r="75" fill="brown" /> <circle cx="700" cy="100" r="75" fill="blue" /> <circle cx="650" cy="100" r="75" fill="purple" /> <circle cx="600" cy="100" r="75" fill="gray" /> <line x1="0" y1="23" x2="800" y2="23" stroke="black" stroke-width="2" /> <line x1="0" y1="175" x2="800" y2="175" stroke="black" stroke-width="2" /> <rect x="0" y="25" width="150" height="150" fill="orange" /> <rect x="25" y="25" width="150" height="150" fill="yellow" /> <rect x="50" y="25" width="150" height="150" fill="orange" /> <rect x="75" y="25" width="150" height="150" fill="yellow" /> <text x="215" y="100" fill="red" font-size="42" font-weight="bold" font-family="Helvetica">WORK OF ART</text> </body> </html>
Modified
http://d3js.org/d3.v3.js
to a secure url
https://d3js.org/d3.v3.js