score:2

Ok, it looks like I was being dumb. I changed this code as follows:

queue()
    .defer(d3.json, "/static/js/readme-world.json")
    .defer(d3.json, "/static/js/earthquake.json")
    .await(ready);

function ready(error, world, data) {
    console.log(data)

To this:

queue()
    .defer(d3.json, "/static/js/readme-world.json")

    .await(ready);

function ready(error, world) {
    console.log(data)

And plugged my json_response into my data join code as follows:

var g = svg.append("g");

        g.selectAll("circle")
           .data(json_response)
           .enter()
           .append("circle")

And it works!

What really helped me was inserting a debug; statement after the queue to see what state everything was in. This confirmed that json_response was indeed exactly the same as earthquake.json and encouraged me to check my code for errors again.


Related Query