Trying to create a map of the UK

I have been trying to convert this viz (from Scott Murray’s book) to a UK map.

Has anybody tried to do this before?

I thought it would be as simple as replacing the json raw github link to a UK equivalent. Alas, that does not seem to be so.

Mike Bostock’s map of the UK is here, and I’ve had trouble rendering a map with it - it’s unclear to me what uk.json actually is.

This looks to be a good source of geojson files, but haven’t been able to figure out how to drop them into above code.

Greetings!

That UK JSON file uses TopoJSON, a compact representation of GeoJSON, and is available “in the raw” at this URL: https://gist.githubusercontent.com/henryjameslau/3afaec1d4a69fd873fce377c884e87ec/raw/9ea778f668955c7ef44b504aaf004ca015ba9429/uk.json

You can load in that URL and adapt an existing map in VizHub that uses TopoJSON to make a map of the UK.

Here are some examples: https://vizhub.com/search?query=map

Good luck!

1 Like

Thank you Curran - I’m up and running!

Hooray! Happy to hear it.