D3
OG
Old school D3 from simpler times
All examples
By author
By category
About
asherif844
Full window
Github gist
Syria Stats
<!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>The following is statistical data in reference to Syria!</p> <svg width="400" height="200"> <defs> <filter id="MyFilter" filterUnits="userSpaceOnUse" x="0" y="0" width="200" height="120"> <feGaussianBlur in="SourceAlpha" stdDeviation="4" result="blur"/> </filter> </defs> <rect x="1" y="1" width="198" height="118" fill="#cccccc" /> <g filter="url(#MyFilter)"> <path fill="none" stroke="#D90000" stroke-width="10" d="M50,90 C0,90 0,30 50,30 L150,30 C200,30 200,90 150,90 z" /> <text fill="#FFFFFF" stroke="black" font-size="45" font-family="Verdana" x="52" y="76">SVG</text> </g> Sorry, your browser does not support inline SVG. </svg> <script type="text/javascript"> //Load in contents of CSV file d3.csv("syr_Country_en_csv_v2.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