I am using D3 to create some county data with their choropleth example. I am using the d3.json option vs. the jquery .ajax. I have a URL that when I use it just does not load. After some research I found that the web service requires an additional parameter:
{'county': {'year': 2002,'stat': 'crime'}}
So the connection to this url keeps failing on me.
I tried to add the additional required parameters for the web service as follows:
d3.json("http://url/states", function (json) {
data = "{'county': {'year': 2002,'stat': 'crime'}}"
//basic d3 stuff from here below
counties.selectAll("path")
.attr("class", quantize);
dataType = json,
contentType = "application/json; charset=utf-8";
});
I just cannot connect without those params in the call and I am not sure how to incorporate them.