D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
leeannoneal
Full window
Github gist
Rural schools in Texas | Load data
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Top-heavy school districts</title> <script type="text/javascript" src="https://d3js.org/d3.v3.min.js"></script> </head> <body> <svg width="400" height="400"> <circle cx="100" cy="60" r="40" stroke="#A18F5A" stroke-width="4" fill="#E6CC80" /> <circle cx="150" cy="70" r="38" stroke="#A18F5A" stroke-width="4" fill="#E6CC80" /> <circle cx="175" cy="90" r="30" stroke="#A18F5A" stroke-width="4" fill="#E6CC80" /> <circle cx="145" cy="20" r="6" stroke="#A18F5A" stroke-width="4" fill="#A18F5A" /> <circle cx="180" cy="16" r="6" stroke="#A18F5A" stroke-width="4" fill="#A18F5A" /> <path d="M145 20 Q 160 24, 169 71" fill="none" stroke="#A18F5A" stroke-width="4"/> <path d="M180 16 Q 165 24, 175 70" fill="none" stroke="#A18F5A" stroke-width="4"/> Sorry, your browser does not support inline SVG. </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("rural_schools_admin_teaching.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.min.js
to a secure url
https://d3js.org/d3.v3.min.js