Freecodecamp: Map data across globe codepen example not working, error 404

Created on 3 Nov 2016  路  8Comments  路  Source: freeCodeCamp/freeCodeCamp

Until about a week ago it was working, then maybe Mike Bostok moved something.
Basically the GET request for world-50m.json returns 404 cause the file is not here...

req URL: https://raw.githubusercontent.com/mbostock/topojson/master/examples/world-50m.json

Map data across globe: https://www.freecodecamp.com/challenges/map-data-across-the-globe

projects-frontend

Most helpful comment

You linked to master, but you could link to a specific release to make sure that the contents do not change:

https://raw.githubusercontent.com/mbostock/topojson/v1.6.27/examples/world-50m.json

But even better would be to use the source of this file, which is the world-atlas repository:

https://github.com/topojson/world-atlas

I am now hosting the file on https://d3js.org/world-50m.v1.json. You can also use unpkg.com/world-atlas@1/world/50m.json. Both of these links are versionsed and backed by a CDN, which should be much faster and more stable than linking to master.

All 8 comments

Looks like the new repo is: https://github.com/topojson/topojson but I can't find a similar example .json document that previously existed.

Let me know if i can help...(maybe you need that file?)

Hi @mbostock,

Could you please help us out here, I hope you will find some time to share the json
https://raw.githubusercontent.com/mbostock/topojson/master/examples/world-50m.json

We are using the JSON as dependency on the sample codepen. We could host it statically if you permit.

Any alternate suggestions are most welcome.

Thanks again for your time.

You can download it here ( tested on my D3 project :white_check_mark:)
or use this npm package.

Both use data from Natural Earth formatted in topojson as the original file that is "missing" :shipit:

You linked to master, but you could link to a specific release to make sure that the contents do not change:

https://raw.githubusercontent.com/mbostock/topojson/v1.6.27/examples/world-50m.json

But even better would be to use the source of this file, which is the world-atlas repository:

https://github.com/topojson/world-atlas

I am now hosting the file on https://d3js.org/world-50m.v1.json. You can also use unpkg.com/world-atlas@1/world/50m.json. Both of these links are versionsed and backed by a CDN, which should be much faster and more stable than linking to master.

@DavOnGit and @mbostock thanks a lot for the links and the effort!

@QuincyLarson when you have a moment lets hop on skype. I seem to have lost access to the FCC codepen account.

@DavOnGit @mbostock awesome! Thank you for your help. We will do as you advised. @raisedadead I will message you in Skype.

Fixed.
Updated the API with https://d3js.org/world-50m.v1.json

Thanks everyone for the help!

Was this page helpful?
0 / 5 - 0 ratings