Skip to content

jhellingsdata/map-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

map-data

Collection of topojson boundaries to be used for building map visualisations

Available data:

UK

Administrative:

OECD/Eurostat:

  • ITL1 - International Territorial Level 1 (UK): 2025, 2021
  • ITL2 - International Territorial Level 2 (UK): 2025, 2021
  • ITL3 - International Territorial Level 3 (UK): 2025, 2021
  • NUTS1 - Nomenclature of Territorial Units for Statistics 1: (UK 2018), (England & Wales 2015)
  • NUTS2 - Nomenclature of Territorial Units for Statistics 2: (UK 2018), (England & Wales 2015),
  • NUTS3 - Nomenclature of Territorial Units for Statistics 3: (UK 2018), (England & Wales 2015)

Census:

  • Lower layer Super Output Areas (England & Wales): 2021, 2011, 2001
  • Middle layer Super Output Areas (England & Wales): 2021, 2011, 2001

Electoral:

Home Nations:

USA

Cities

  • New York:

World



Mapping with TopoJSON in Vega-Lite / Altair

  1. Get the raw GitHub file link to any of the TopoJSONs:

Note: all TopoJSONs in this repo use the geog feature key.

In Altair (Python)

import altair as alt

topo_url = "https://raw.githubusercontent.com/jhellingsdata/map-data/refs/heads/main/gbr/ITL1_UK_2021.json"
data = alt.Data(url=topo_url, format=alt.DataFormat(feature='geog', type='topojson'))

alt.Chart(data).mark_geoshape().project(
    type='mercator'     # Find other projections here: https://vega.github.io/vega/docs/projections/
)

In Vega-Lite:

{
    "$schema": "https://vega.github.io/schema/vega-lite/v5.20.1.json",
    "data": {
        "url": "https://raw.githubusercontent.com/jhellingsdata/map-data/refs/heads/main/gbr/ITL1_UK_2021.json",
        "format": {"feature": "geog", "type": "topojson"}
    },
    "mark": {"type": "geoshape"},
    "projection": {"type": "mercator"}
}

TopoJSON works a bit different than GeoJSON in Vega-Lite/Altair. We set the 'feature' instead of the property for xyz..

About

Collection of topojson boundaries to be used for building map visualisations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published