Public
Edited
Feb 2, 2024
Insert cell
Insert cell
Insert cell
STYLE = (() => {
C2.sources.pop = {
type: "vector",
minzoom: 10,
maxzoom: 14,
url: "pmtiles://https://smb.optgeo.org/ipfs/QmbAq2vBTYwiBde2pidMg8ud2EyKhenVYm6Uumq5n3UUMy",
attribution: "「国土数値情報(500mメッシュ別将来推計人口データ)」(国土交通省)を加工して作成"
}

C2.layers.splice(
C2.layers.findIndex(layer => {return layer.id == 'wa'}),
0,
{
id: "pop",
maxzoom: 22,
type: "fill",
source: "pop",
"source-layer": "500",
paint: {
"fill-color": [
"interpolate-hcl",
["linear"],
[
"/",
["get", "PTN_2050"],
["get", "PTN_2015"]
],
0,
["rgb", 64, 64, 64],
0.001,
["rgb", 34, 58, 112],
1,
["rgb", 0, 255, 0],
3,
["rgb", 255, 255, 0]
],
"fill-opacity": [
"interpolate",
["linear"],
["get", "PTN_2015"],
0,
0.0,
100,
1.0
]
}
}
)
C2.sources.et10b.tiles[0] = "https://smb.optgeo.org/et10b/et512/{z}/{x}/{y}.webp"
return C2
})()
Insert cell
C2 = fetch("https://optgeo.github.io/c2/style.json").then((resp) => resp.json())
Insert cell
Insert cell
Insert cell
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