Globe population
Units arranged in a globe outline.
Open the chart without page chrome ↗
const options = {
chart: {
height: 420,
fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
type: "unit",
toolbar: {
show: false
}
},
series: [47, 18, 14, 10, 6, 5],
labels: ["Asia", "Africa", "Europe", "Americas N", "Americas S", "Oceania"],
plotOptions: {
unit: {
positions: {
name: "globe",
category: "generated",
kind: "generated",
rings: [
[
[1, 0.5],
[0.9980973490458728, 0.5435778713738291],
[0.9924038765061041, 0.5868240888334652],
[0.9829629131445341, 0.6294095225512604],
[0.9698463103929542, 0.6710100716628343],
[0.953153893518325, 0.7113091308703497],
[0.9330127018922194, 0.75],
[0.909576022144496, 0.786788218175523],
[0.883022221559489, 0.8213938048432696],
[0.8535533905932737, 0.8535533905932737],
[0.8213938048432696, 0.883022221559489],
[0.786788218175523, 0.909576022144496],
[0.75, 0.9330127018922193],
[0.7113091308703497, 0.953153893518325],
[0.6710100716628344, 0.9698463103929542],
[0.6294095225512604, 0.9829629131445341],
[0.5868240888334653, 0.9924038765061041],
[0.5435778713738292, 0.9980973490458728],
[0.5, 1],
[0.4564221286261709, 0.9980973490458728],
[0.41317591116653485, 0.9924038765061041],
[0.3705904774487396, 0.9829629131445341],
[0.32898992833716567, 0.9698463103929542],
[0.28869086912965036, 0.953153893518325],
[0.2500000000000001, 0.9330127018922194],
[0.2132117818244771, 0.909576022144496],
[0.17860619515673032, 0.883022221559489],
[0.14644660940672627, 0.8535533905932737],
[0.11697777844051105, 0.8213938048432697],
[0.09042397785550405, 0.786788218175523],
[0.06698729810778065, 0.75],
[0.04684610648167503, 0.7113091308703497],
[0.03015368960704584, 0.6710100716628344],
[0.0170370868554659, 0.6294095225512605],
[0.00759612349389599, 0.5868240888334654],
[0.0019026509541272274, 0.5435778713738291],
[0, 0.5000000000000001],
[0.0019026509541272274, 0.45642212862617104],
[0.00759612349389599, 0.41317591116653474],
[0.01703708685546579, 0.37059047744873985],
[0.030153689607045786, 0.32898992833716567],
[0.046846106481674976, 0.28869086912965036],
[0.0669872981077807, 0.24999999999999994],
[0.09042397785550399, 0.2132117818244771],
[0.116977778440511, 0.17860619515673037],
[0.14644660940672616, 0.14644660940672627],
[0.17860619515673026, 0.11697777844051105],
[0.2132117818244768, 0.09042397785550421],
[0.24999999999999978, 0.06698729810778081],
[0.2886908691296504, 0.046846106481674976],
[0.32898992833716534, 0.030153689607045897],
[0.3705904774487397, 0.017037086855465844],
[0.41317591116653485, 0.00759612349389599],
[0.4564221286261709, 0.0019026509541272274],
[0.4999999999999999, 0],
[0.543577871373829, 0.0019026509541272274],
[0.586824088833465, 0.007596123493895934],
[0.6294095225512601, 0.01703708685546579],
[0.6710100716628344, 0.03015368960704584],
[0.7113091308703494, 0.046846106481674865],
[0.75, 0.0669872981077807],
[0.786788218175523, 0.0904239778555041],
[0.8213938048432696, 0.11697777844051094],
[0.8535533905932737, 0.14644660940672616],
[0.883022221559489, 0.1786061951567302],
[0.9095760221444957, 0.21321178182447675],
[0.9330127018922192, 0.24999999999999978],
[0.953153893518325, 0.28869086912965036],
[0.969846310392954, 0.3289899283371653],
[0.9829629131445341, 0.37059047744873963],
[0.9924038765061041, 0.4131759111665348],
[0.9980973490458728, 0.4564221286261708]
],
[
[0.8200000000000001, 0.5],
[0.8187823033893586, 0.5278898376792506],
[0.8151384809639066, 0.5555674168534177],
[0.8090962644125019, 0.5828220944328066],
[0.8007016386514907, 0.609446445864214],
[0.790018491851728, 0.6352378437570239],
[0.7771281292110204, 0.6599999999999999],
[0.7621286541724774, 0.6835444596323348],
[0.745134221798073, 0.7056920350996926],
[0.7262741699796953, 0.7262741699796952],
[0.7056920350996926, 0.745134221798073],
[0.6835444596323348, 0.7621286541724774],
[0.66, 0.7771281292110204],
[0.6352378437570239, 0.790018491851728],
[0.609446445864214, 0.8007016386514907],
[0.5828220944328066, 0.8090962644125019],
[0.5555674168534177, 0.8151384809639066],
[0.5278898376792507, 0.8187823033893586],
[0.5, 0.8200000000000001],
[0.47211016232074937, 0.8187823033893586],
[0.4444325831465823, 0.8151384809639066],
[0.4171779055671933, 0.8090962644125019],
[0.390553554135786, 0.8007016386514907],
[0.3647621562429762, 0.790018491851728],
[0.3400000000000001, 0.7771281292110204],
[0.3164555403676653, 0.7621286541724774],
[0.2943079649003074, 0.745134221798073],
[0.2737258300203048, 0.7262741699796953],
[0.2548657782019271, 0.7056920350996927],
[0.23787134582752256, 0.6835444596323347],
[0.22287187078897963, 0.6599999999999999],
[0.209981508148272, 0.6352378437570239],
[0.1992983613485093, 0.609446445864214],
[0.19090373558749818, 0.5828220944328067],
[0.18486151903609344, 0.5555674168534178],
[0.1812176966106414, 0.5278898376792506],
[0.18, 0.5],
[0.1812176966106414, 0.4721101623207495],
[0.18486151903609344, 0.44443258314658224],
[0.19090373558749812, 0.4171779055671935],
[0.1992983613485093, 0.390553554135786],
[0.209981508148272, 0.36476215624297625],
[0.22287187078897963, 0.33999999999999997],
[0.23787134582752256, 0.3164555403676653],
[0.254865778201927, 0.2943079649003074],
[0.2737258300203047, 0.2737258300203048],
[0.29430796490030736, 0.2548657782019271],
[0.31645554036766516, 0.23787134582752267],
[0.33999999999999986, 0.2228718707889797],
[0.36476215624297625, 0.209981508148272],
[0.3905535541357858, 0.19929836134850937],
[0.41717790556719336, 0.19090373558749812],
[0.4444325831465823, 0.18486151903609344],
[0.47211016232074937, 0.1812176966106414],
[0.49999999999999994, 0.18],
[0.5278898376792506, 0.1812176966106414],
[0.5555674168534176, 0.18486151903609338],
[0.5828220944328065, 0.19090373558749812],
[0.609446445864214, 0.1992983613485093],
[0.6352378437570236, 0.20998150814827193],
[0.66, 0.22287187078897963],
[0.6835444596323348, 0.23787134582752262],
[0.7056920350996926, 0.254865778201927],
[0.7262741699796952, 0.2737258300203047],
[0.7451342217980729, 0.2943079649003073],
[0.7621286541724773, 0.3164555403676651],
[0.7771281292110204, 0.33999999999999986],
[0.790018491851728, 0.36476215624297625],
[0.8007016386514906, 0.3905535541357858],
[0.8090962644125019, 0.41717790556719336],
[0.8151384809639066, 0.4444325831465823],
[0.8187823033893586, 0.4721101623207493]
]
],
source: "original",
minUnits: 12,
aspect: 1,
order: "rows",
cx: undefined,
cy: undefined,
shape: {
name: "globe",
category: "generated",
kind: "generated",
minUnits: 12,
order: "rows",
source: "original"
},
with: e=>St({...t,...e||{}}),
outlined: function outlined(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.16;const n=t.rings.map(t=>{const n=t.reduce((t,e)=>t+e[0],0)/t.length,a=t.reduce((t,e)=>t+e[1],0)/t.length;return t.map(t=>{let o=b(t,2);return[n+(o[0]-n)*(1-e),a+(o[1]-a)*(1-e)]})});return St({...t,name:t.name+"-outlined",kind:"stroke",rings:t.rings.concat(n)})},
fill: (t,n)=>wt(e,t,n),
isUnitShape: true
},
unitValue: 0.25
}
},
title: {
text: "World population share (1 dot = 0.25%)"
},
theme: {
mode: "light",
preset: "coastal"
}
}
const chart = new WestCoastCharts(document.querySelector('#chart'), options)
chart.render()import WestCoastCharts from 'west-coast-charts'
import types from 'west-coast-charts/types'
WestCoastCharts.use(types)
const options = {
chart: {
height: 420,
fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
type: "unit",
toolbar: {
show: false
}
},
series: [47, 18, 14, 10, 6, 5],
labels: ["Asia", "Africa", "Europe", "Americas N", "Americas S", "Oceania"],
plotOptions: {
unit: {
positions: {
name: "globe",
category: "generated",
kind: "generated",
rings: [
[
[1, 0.5],
[0.9980973490458728, 0.5435778713738291],
[0.9924038765061041, 0.5868240888334652],
[0.9829629131445341, 0.6294095225512604],
[0.9698463103929542, 0.6710100716628343],
[0.953153893518325, 0.7113091308703497],
[0.9330127018922194, 0.75],
[0.909576022144496, 0.786788218175523],
[0.883022221559489, 0.8213938048432696],
[0.8535533905932737, 0.8535533905932737],
[0.8213938048432696, 0.883022221559489],
[0.786788218175523, 0.909576022144496],
[0.75, 0.9330127018922193],
[0.7113091308703497, 0.953153893518325],
[0.6710100716628344, 0.9698463103929542],
[0.6294095225512604, 0.9829629131445341],
[0.5868240888334653, 0.9924038765061041],
[0.5435778713738292, 0.9980973490458728],
[0.5, 1],
[0.4564221286261709, 0.9980973490458728],
[0.41317591116653485, 0.9924038765061041],
[0.3705904774487396, 0.9829629131445341],
[0.32898992833716567, 0.9698463103929542],
[0.28869086912965036, 0.953153893518325],
[0.2500000000000001, 0.9330127018922194],
[0.2132117818244771, 0.909576022144496],
[0.17860619515673032, 0.883022221559489],
[0.14644660940672627, 0.8535533905932737],
[0.11697777844051105, 0.8213938048432697],
[0.09042397785550405, 0.786788218175523],
[0.06698729810778065, 0.75],
[0.04684610648167503, 0.7113091308703497],
[0.03015368960704584, 0.6710100716628344],
[0.0170370868554659, 0.6294095225512605],
[0.00759612349389599, 0.5868240888334654],
[0.0019026509541272274, 0.5435778713738291],
[0, 0.5000000000000001],
[0.0019026509541272274, 0.45642212862617104],
[0.00759612349389599, 0.41317591116653474],
[0.01703708685546579, 0.37059047744873985],
[0.030153689607045786, 0.32898992833716567],
[0.046846106481674976, 0.28869086912965036],
[0.0669872981077807, 0.24999999999999994],
[0.09042397785550399, 0.2132117818244771],
[0.116977778440511, 0.17860619515673037],
[0.14644660940672616, 0.14644660940672627],
[0.17860619515673026, 0.11697777844051105],
[0.2132117818244768, 0.09042397785550421],
[0.24999999999999978, 0.06698729810778081],
[0.2886908691296504, 0.046846106481674976],
[0.32898992833716534, 0.030153689607045897],
[0.3705904774487397, 0.017037086855465844],
[0.41317591116653485, 0.00759612349389599],
[0.4564221286261709, 0.0019026509541272274],
[0.4999999999999999, 0],
[0.543577871373829, 0.0019026509541272274],
[0.586824088833465, 0.007596123493895934],
[0.6294095225512601, 0.01703708685546579],
[0.6710100716628344, 0.03015368960704584],
[0.7113091308703494, 0.046846106481674865],
[0.75, 0.0669872981077807],
[0.786788218175523, 0.0904239778555041],
[0.8213938048432696, 0.11697777844051094],
[0.8535533905932737, 0.14644660940672616],
[0.883022221559489, 0.1786061951567302],
[0.9095760221444957, 0.21321178182447675],
[0.9330127018922192, 0.24999999999999978],
[0.953153893518325, 0.28869086912965036],
[0.969846310392954, 0.3289899283371653],
[0.9829629131445341, 0.37059047744873963],
[0.9924038765061041, 0.4131759111665348],
[0.9980973490458728, 0.4564221286261708]
],
[
[0.8200000000000001, 0.5],
[0.8187823033893586, 0.5278898376792506],
[0.8151384809639066, 0.5555674168534177],
[0.8090962644125019, 0.5828220944328066],
[0.8007016386514907, 0.609446445864214],
[0.790018491851728, 0.6352378437570239],
[0.7771281292110204, 0.6599999999999999],
[0.7621286541724774, 0.6835444596323348],
[0.745134221798073, 0.7056920350996926],
[0.7262741699796953, 0.7262741699796952],
[0.7056920350996926, 0.745134221798073],
[0.6835444596323348, 0.7621286541724774],
[0.66, 0.7771281292110204],
[0.6352378437570239, 0.790018491851728],
[0.609446445864214, 0.8007016386514907],
[0.5828220944328066, 0.8090962644125019],
[0.5555674168534177, 0.8151384809639066],
[0.5278898376792507, 0.8187823033893586],
[0.5, 0.8200000000000001],
[0.47211016232074937, 0.8187823033893586],
[0.4444325831465823, 0.8151384809639066],
[0.4171779055671933, 0.8090962644125019],
[0.390553554135786, 0.8007016386514907],
[0.3647621562429762, 0.790018491851728],
[0.3400000000000001, 0.7771281292110204],
[0.3164555403676653, 0.7621286541724774],
[0.2943079649003074, 0.745134221798073],
[0.2737258300203048, 0.7262741699796953],
[0.2548657782019271, 0.7056920350996927],
[0.23787134582752256, 0.6835444596323347],
[0.22287187078897963, 0.6599999999999999],
[0.209981508148272, 0.6352378437570239],
[0.1992983613485093, 0.609446445864214],
[0.19090373558749818, 0.5828220944328067],
[0.18486151903609344, 0.5555674168534178],
[0.1812176966106414, 0.5278898376792506],
[0.18, 0.5],
[0.1812176966106414, 0.4721101623207495],
[0.18486151903609344, 0.44443258314658224],
[0.19090373558749812, 0.4171779055671935],
[0.1992983613485093, 0.390553554135786],
[0.209981508148272, 0.36476215624297625],
[0.22287187078897963, 0.33999999999999997],
[0.23787134582752256, 0.3164555403676653],
[0.254865778201927, 0.2943079649003074],
[0.2737258300203047, 0.2737258300203048],
[0.29430796490030736, 0.2548657782019271],
[0.31645554036766516, 0.23787134582752267],
[0.33999999999999986, 0.2228718707889797],
[0.36476215624297625, 0.209981508148272],
[0.3905535541357858, 0.19929836134850937],
[0.41717790556719336, 0.19090373558749812],
[0.4444325831465823, 0.18486151903609344],
[0.47211016232074937, 0.1812176966106414],
[0.49999999999999994, 0.18],
[0.5278898376792506, 0.1812176966106414],
[0.5555674168534176, 0.18486151903609338],
[0.5828220944328065, 0.19090373558749812],
[0.609446445864214, 0.1992983613485093],
[0.6352378437570236, 0.20998150814827193],
[0.66, 0.22287187078897963],
[0.6835444596323348, 0.23787134582752262],
[0.7056920350996926, 0.254865778201927],
[0.7262741699796952, 0.2737258300203047],
[0.7451342217980729, 0.2943079649003073],
[0.7621286541724773, 0.3164555403676651],
[0.7771281292110204, 0.33999999999999986],
[0.790018491851728, 0.36476215624297625],
[0.8007016386514906, 0.3905535541357858],
[0.8090962644125019, 0.41717790556719336],
[0.8151384809639066, 0.4444325831465823],
[0.8187823033893586, 0.4721101623207493]
]
],
source: "original",
minUnits: 12,
aspect: 1,
order: "rows",
cx: undefined,
cy: undefined,
shape: {
name: "globe",
category: "generated",
kind: "generated",
minUnits: 12,
order: "rows",
source: "original"
},
with: e=>St({...t,...e||{}}),
outlined: function outlined(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.16;const n=t.rings.map(t=>{const n=t.reduce((t,e)=>t+e[0],0)/t.length,a=t.reduce((t,e)=>t+e[1],0)/t.length;return t.map(t=>{let o=b(t,2);return[n+(o[0]-n)*(1-e),a+(o[1]-a)*(1-e)]})});return St({...t,name:t.name+"-outlined",kind:"stroke",rings:t.rings.concat(n)})},
fill: (t,n)=>wt(e,t,n),
isUnitShape: true
},
unitValue: 0.25
}
},
title: {
text: "World population share (1 dot = 0.25%)"
},
theme: {
mode: "light",
preset: "coastal"
}
}
const chart = new WestCoastCharts(document.querySelector('#chart'), options)
await chart.render() Waiting for the chart.
Open Data & agent view to read this chart through chart.describe().
Read from the running library through its optional agent/describe module. Text, table and JSON share the same snapshot. Demo data only.
$ wcc chart export unit-globe-population.json --out unit-globe-population.svg --with-table Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm. Save a JSON spec first and check the loaded runtime and supported modules before rendering. Command reference
Loading /gallery/unit/globe-population/index.md …