Donut Chart

A donut chart showing the estimated population per age group in the U.S. in 2015. Adapted from https://observablehq.com/@d3/donut-chart. Data can be found here.

The (async () => { ... })() bit is a so-called Immediately Invoked Function Expression, which is just a way to define a function and run it immediately without having to give it a name. It is used here to contain all logic that depends on asynchronous operations like fetching datasets.