Reputation: 945
When running the examaple found over here: http://bl.ocks.org/micahstubbs/8e15870eb432a21f0bc4d3d527b2d14f
I get the error that world_countries.json can't be found:
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8000/world_countries.json
world_countries.json is used in this piece of code:
queue()
.defer(d3.json, "world_countries.json")
.defer(d3.tsv, "world_population.tsv")
.await(ready);
I figured that world_countries.json might come from topojson, this is the way I load in the existing libraries
<script src="http://d3js.org/queue.v1.min.js"></script>
<script src="http://d3js.org/topojson.v1.min.js"></script>
<script src="js/graphs/d3-tip.js"></script>
<script src="js/graphs/map.js"></script>
I was really hoping someone could help me out here!
Upvotes: 1
Views: 1332
Reputation: 1927
from the terminal:
curl -O https://raw.githubusercontent.com/jdamiani27/Data-Visualization-and-D3/master/lesson4/world_countries.json
this will download https://raw.githubusercontent.com/jdamiani27/Data-Visualization-and-D3/master/lesson4/world_countries.json
to your current working directory.
or just visit https://raw.githubusercontent.com/jdamiani27/Data-Visualization-and-D3/master/lesson4/world_countries.json in the browser, select-all, copy, paste into your favorite text editor and save as world_countries.json
, in the same directory as the other files from the d3 example that you are working with.
good luck!
Upvotes: 2