D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
afbroman
Full window
Github gist
Portland School 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> <h2>SVG image:</h2> <svg width="200" height="100"> <ellipse cx="150" cy="70" rx="50" ry="25" fill="#d99938" /> <rect height="50" width="100" x="0" y="0" fill="#d93938" /> <circle cx="100" cy="50" r="25" fill="#38b0d9" stroke="black" /> </svg> <script type="text/javascript"> //Load in contents of CSV file d3.csv("portland_school_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> </body> </html>
Modified
http://d3js.org/d3.v3.js
to a secure url
https://d3js.org/d3.v3.js