Public
Edited
Feb 28, 2022
Insert cell
# Growth of global installed PV capacity
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
global_pv_renamed = global_pv.map(d => ({countryNumericCode: codeToNumberMap.get(d.ISO_A3), quantity: d[""+year], wattsPerCapita: 1000000 * d[""+year] / codeToPopulationMap.get(d.ISO_A3)}))
Insert cell
Insert cell
Insert cell
Insert cell
scale = d3.scaleOrdinal(["<1", "1-9", "10-99", "100-199", "200-299", "300-399", "400-499", "500-599", "≥600"], d3.schemeSpectral[9])
Insert cell
Insert cell
chart = Choropleth(global_pv_renamed, {
id: d => d.countryNumericCode, // country code
value: d => d.wattsPerCapita, // how many watts of PV per person
domain: [1, 600],
scale: scale.implicit, // type of color scale
range: d3.interpolateReds,
features: countries,
borders: countrymesh,
projection: d3.geoEqualEarth(),
width
})
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