How many people in your city have a stop nearby?
This measures the percentage of people in a city with a minor stop (bus) within 500 m or a major stop (train, metro or ferry) within 1 km of their home. It doesn’t take into account the quality or frequency of that transport.
viewof zoomOptions = Inputs.checkbox(["Zoom"], {
disabled: selectedCities.length == 0
})
viewof selectedCities = Inputs.search(cities, {
required: false,
columns: ["country_name"],
datalist: Array.from(new Set(cities.map(x => x.country_name).sort())),
placeholder: "Search for a country",
format: n => n + " cit" + (n == 1 ? "y" : "ies")
})
activeData = zoomToSelection ?
cities.filter(
d => selectedCities
.map(d => d.city.toLowerCase())
.includes(d.city.toLowerCase())) :
cities
textSize = 18
maxWidth = 500
excessWidth = Math.max(0, width - 800)
// until we hit 800px, keep the max bubble radius at 12 (unless zooming)
baseMaxRadius = 25
zoomMaxRadius = 30
// after that, add radius scale according to excess with
extraMaxRadius = d3.scaleLinear([0, 900], [0, 7]).clamp(true)
Plot.plot({
marks: [
Plot.dot(activeData, Plot.dodgeX("middle", {
y: "pct_pt_access",
fill: "pct_pt_access",
r: "population",
opacity: d =>
selectedCities.length > 0 &&
(!selectedCities
.map(d => d.city.toLowerCase())
.includes(d.city.toLowerCase())) ?
0.1 :
1,
})),
Plot.tip(activeData, Plot.pointer(Plot.dodgeX("middle", {
y: "pct_pt_access",
r: "population",
channels: {
"City": "city",
"Country": "country_name",
"Access": "pct_pt_access"
},
format: {
// "x": d => d.toFixed(1) + "%",
"y": false,
"City": true,
"Country": true,
"r": true,
"Access": d => d.toFixed(1) + "% of people"
}
})))
],
y: {
label: "Access to public transport",
grid: true,
tickFormat: d => d.toFixed(0) + "%",
// axis: "top",
domain: [0, 100],
fill: "grey"
},
color: {
reverse: true,
domain: [0, 100]
},
r: {
label: "Population",
range: zoomToSelection ?
[0.25, zoomMaxRadius] :
[0.15, baseMaxRadius + extraMaxRadius(excessWidth)]
},
height: zoomToSelection ? 500 : 600,
width: maxWidth + excessWidth,
marginLeft: 50,
marginTop: 80,
style: {
fontFamily: "Roboto Condensed",
fontSize: width < maxWidth * 0.6 ?
textSize * 1.5 :
textSize
}
})
micro = require("[email protected]")
micro.init({
awaitOpenAnimation: true,
awaitCloseAnimation: true
});
This map, as well as the analysis that underpins it, is available under a Creative Commons Attribution 4.0 licence.
Please acknowledge 360info and our data sources when you use them.
Copy and paste the following code:
<div style="aspect-ratio: 27 / 40; width: 100%; min-height: 650px; max-height: 840px">
<iframe
allow="fullscreen; clipboard-write self https://transport.360visuals.org"
allowfullscreen="true"
src="https://transport.360visuals.org/public-transport-ap/"
title="Interactive: access to public transport"
style="width:100%; height:100%; position: relative; top: 0; left: 0; border:none; background-color: white;" scrolling="no"></iframe>
</div>
This content is subject to 360info’s Terms of Use.
Visit the GitHub repository to:
Data underpinning this graphic comes from three sources:
1. The UN’s SDG Data Portal
2. OpenDataSoft’s dataset of cities over 1000 people
3. the the UN’s hierarchy of country regions
These data sources are available under a Creative Commons Attribution 4.0.