Public
Edited
Mar 18, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Plot.plot({
y: {
grid: true
},
marks: [
Plot.barY(globalPowerPlants_nuclear, Plot.groupX({y: "count"}, {x: "country", sort: {x: "y", reverse: true, limit: 10}})),
Plot.ruleY([0])
]
})
Insert cell
Insert cell
Insert cell
Plot.plot({
y: {
grid: true
},
marks: [
Plot.barY(globalPowerPlants_nuclear, Plot.groupX({y: "sum"}, {x: "country", y: "capacity_mw", sort: {x: "y", reverse: true, limit: 10}})),
Plot.ruleY([0])
]
})
Insert cell
Insert cell
import {Plot} from "@mkfreeman/plot-tooltip"
Insert cell
Plot.plot({
x: {
grid: true
},
marks: [
Plot.barX(globalPowerPlants_nuclear, Plot.groupY({x: "sum", title: "sum"}, {y: "country", x: "capacity_mw", sort: {y: "x", reverse: true, limit: 10}})),
Plot.ruleY([0])
]
})
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.barY(globalPowerPlants_nuclear, {x: "country", y: "capacity_mw", sort: {x: "y", reverse: true, limit: 10}}),
Plot.ruleY([0])
]
})
Insert cell
Insert cell
Insert cell
Plot.plot({
marks: [
Plot.rectY(globalPowerPlants_nuclear, Plot.binX({y: "count", title: "count"}, {x: "capacity_mw", thresholds: numBins})),
Plot.ruleY([0])
]
})
Insert cell
viewof numBins = Inputs.range([1, 100], {label: "Number of bins", step: 1})
Insert cell
Insert cell
Insert cell
Insert cell
import {us} from "@observablehq/plot-mapping"
Insert cell
import {nation} from "@observablehq/plot-mapping"
Insert cell
import {states} from "@observablehq/plot-mapping"
Insert cell
import {statemesh} from "@observablehq/plot-mapping"
Insert cell
Insert cell
Plot.plot({
projection: "albers",
marks: [Plot.geo(nation), Plot.geo(statemesh, { strokeOpacity: 0.2 })]
})
Insert cell
Insert cell
Plot.plot({
projection: "albers",
color: {
legend: true,
label: "Opening year"
},
marks: [
Plot.geo(nation),
Plot.geo(statemesh, {strokeOpacity: 0.2}),
Plot.dot(globalPowerPlants_nuclear, {x: "longitude", y: "latitude", stroke: "date", symbol: "square"})
]
})
Insert cell
Insert cell
Plot.plot({
projection: "albers",
color: {
legend: true,
label: "Opening year"
},
marks: [
Plot.geo(nation),
Plot.geo(statemesh, {strokeOpacity: 0.2}),
Plot.dot(globalPowerPlants_nuclear, {x: "longitude", y: "latitude", symbol: "square"})
]
})
Insert cell
Insert cell
Plot.plot({
width: 1200,
height: 800,
projection: "albers",
marks: [
Plot.geo(nation),
Plot.geo(statemesh, {strokeOpacity: 0.2}),
Plot.dot(globalPowerPlants_nuclear, {x: "longitude", y: "latitude", symbol: "circle", fill: "lightgreen", stroke: "black"
// , r: "capacity_mw"
, r: 6
})
]
})
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