the API is called here with d3.json. The URL is built as a relative URL with the value of the input added to the end. 

D3 then returns data in the callback function, which is what is used to draw the objects.