D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
andresrojas1
Full window
Github gist
Percentage of people using the internet in the Americas 2004 - 2013
<!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="500" height="350"> <text x="10" y="50" fill="charcoal" font-size="42" font-weight="bold" font-family="Helvetica">Amazing graphic</text> <line x1="10" y1="120" x2="150" y2="190" stroke="blue" stroke-width="3"></line> <line x1="150" y1="190" x2="250" y2="100" stroke="blue" stroke-width="3"></line> <line x1="250" y1="100" x2="400" y2="100" stroke="blue" stroke-width="3"></line> <rect x="200" y="150" width="100" height="100" fill="pink"></rect> <circle cx="300" cy="140" r="50" fill="violet"></circle> <polygon fill="purple" points="250,200 250,325 142,262.6 142,137.5"></polygon> </svg> <!-- <p>Not much to see here; try looking in the console!</p> --> <script type="text/javascript"> //Load in contents of CSV file d3.csv("percentage_of _people_using_internet_america.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