There are some examples to get data from external json file in d3.js. But these samples do not show the json, so I really want to see how it works.
I have this json
You can also use Jquery JSON calls if you're more familiar with those. Or you can even just use a script tag that references a variable being assigned to JSON, like so:
where us-pres.json starts like this:
var dataset = {"state":"US",...
As long as you get the JSON into a variable (collection), d3 doesn't really care how you do it. Once it's there, you just assign it using the d3 .data(dataset) call.