Public
Edited
Mar 18, 2024
2 forks
12 stars
Insert cell
Insert cell
Insert cell
Insert cell
viz.plot({ type: "typo", data: world, var: "region" })
Insert cell
Insert cell
viz.plot({
type: "typo",
data: world,
var: "region",
alphabetical: true,
colors: "Bold"
})
Insert cell
Insert cell
viz.plot({
type: "typo",
data: world,
var: "region",
order: ["Antarctica", "Oceania", "Africa", "America", "Asia", "Europe"],
colors: ["grey", "green", "blue", "orange", "purple", "red"]
})
Insert cell
Insert cell
Insert cell
Insert cell
{
const typo = viz.tool.typo(world.features.map((d) => d.properties.region));
let svg = viz.create({
width: 700,
margin: [20, 0, 0, 0],
zoomable: true,
projection: d3.geoNaturalEarth1()
});
svg.outline();
svg.path({
strokeWidth: 0.2,
data: world,
fill: (d) => typo.colorize(d.properties.region),
tip: (d) => `${d.properties.name} (${d.properties.region})`
});
svg.legend.typo_vertical({
pos: [80, 180],
title: "Continents",
alphabetical: true,
colors: typo.colors,
types: typo.types,
missing: false
});
return svg.render();
}
Insert cell
Insert cell
import {
style,
world,
disclaimer,
aus,
aus_roads,
viz
} from "@neocartocnrs/geoviz-appendix"
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