Published
Edited
Mar 9, 2021
13 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
data = (await FileAttachment("pie-chart-names@2.csv").csv())
.sort((a, b) => (a.Name + a.Language).localeCompare((b.Name + b.Language), 'en'))
Insert cell
colorScale = d3.scaleOrdinal(d3.schemeCategory10).domain(new Set(data.map(d => d.Name)))
Insert cell
DIMENSIONS = ({ width: 1100, height: 1100 })
Insert cell
INNER_CIRCLE_R = 300
Insert cell
CIRCLE_RADIUS = 400
Insert cell
Insert cell
Insert cell
slugify = require('slugify')
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more