D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
mendozaline
Full window
Github gist
Module 2 exercise
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Module 2 exercise</title> <script type="text/javascript" src="https://d3js.org/d3.v3.js"></script> </head> <body> <svg height="500" width="500"> <circle cx="100" cy="125" r="60" fill="black" /> <circle cx="300" cy="125" r="60" fill="black" /> <circle cx="200" cy="230" r="100" fill="black" /> <text x="0" y="400" fill="crimson" font-size="25"> <tspan x="0" y="400">This is an SVG version of a popular,</tspan> <tspan x="0" y="430">copyright-protected mouse.</tspan> </text> </svg> <p>Check the console to see my data.</p> <script type="text/javascript"> //Load in contents of CSV file d3.csv("cancer_death_rates.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