Public
Edited
May 2, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({ // Initialize the plot
projection: {
type: "mercator",
domain: d3.geoCircle().center([ 12, 62]).radius(8.9)(),
inset: 2
},
marks: [
Plot.geo(countries),
Plot.dot(womenLatLon, {
x: "lon",
y: "lat",
r: 10,
fill: "city",
fillOpacity: 0.2,
stroke: "city",
strokeWidth: 1,
strokeOpacity: 0.4
}),
],
color: { legend: true }, // Include a legend for the fill color
height: 500, // Update canvas height
width: 800, // Update canvas width
margin: 24 // Update margins
})
Insert cell
Plot.plot({ // Initialize the plot
projection: {
type: "mercator",
domain: d3.geoCircle().center([ 12, 62]).radius(8.9)(),
inset: 2
},
marks: [
Plot.geo(countries),
Plot.dot(womenLatLon,
Plot.hexbin(
{ r: 4, fill: "min" },
{ x: "lon", y: "lat", fill: "city", stroke: "city",
}
)
,
],
color: { legend: true }, // Include a legend for the fill color
height: 500, // Update canvas height
width: 800, // Update canvas width
margin: 24 // Update margins
})
Insert cell
streets named after women - women giving their name to streets.csv
select "longitude of the place of birth" as lon, "latitude of the place of birth" as lat, city
from "streets named after women - women giving their name to streets"
where 1=1
and city in ('Stockholm', 'København', 'Helsinki', 'Oslo')
Insert cell
Insert cell
womenLatLon = women.map(r => ({lat: r.lat, lon: r.lon, city: r.city}))
Insert cell
nordic = FileAttachment("nordic.json").json()
Insert cell
countries = topojson.feature(nordic, nordic.objects.ne_10m_admin_0_countries)
Insert cell
topojson = require('topojson')
Insert cell
everthing = topojson.mesh(
nordic,
nordic.objects.ne_10m_admin_0_countries,
)
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more