Public
Edited
Jun 14, 2023
Insert cell
Insert cell
donnees_regions@1.csv
Type Table, then Shift-Enter. Ctrl-space for more options.

Insert cell
donnees_regions1
X
PMUN
Y
CODREG
Color
#ff8c38
Size
Facet X
Facet Y
Mark
bar
Type Chart, then Shift-Enter. Ctrl-space for more options.

Insert cell
Plot.plot({
marginLeft: 150,
marginRight: 100,
x: { label: "Population", grid: true, tickFormat: (d) => d.toLocaleString("fr-FR") },
y: { label: "Région de France", tickFormat: (d) => donnees_regions1.find( r => r.CODREG === d ).REG },
marks: [
Plot.barX(donnees_regions1, {
x: "PMUN",
y: "CODREG",
fill: "#ff8c38",
opacity: 0.5,
sort: { y: "-x" },
tip: true
}),
Plot.tickX(donnees_regions1, {x: "PMUN", y: "CODREG"}),
Plot.text(donnees_regions1, {x: "PMUN", y: "CODREG", text: (d) => d.PMUN.toLocaleString("fr-FR"), textAnchor: "start", dx: 3}),
Plot.ruleX([0])
]
})
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