Public
Edited
Apr 10, 2024
Paused
3 forks
33 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
dicopal = import("dicopal@0.8.1")
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
providers = dicopal.getPaletteProviders()
Insert cell
Insert cell
a = dicopal.getPaletteTypes()
Insert cell
Insert cell
Insert cell
dicopal.getPaletteNames()
Insert cell
Insert cell
dicopal.getPaletteNames("cmocean")
Insert cell
Insert cell
dicopal.getPalette("Pastel", 4) // Returns the "Pastel" palette in its 4-color variation
Insert cell
Insert cell
Insert cell
dicopal.getColors('Pastel', 4) // Returns the colors of the "Pastel", palette in its 4-color variation
Insert cell
Insert cell
dicopal.getColors("Pastel", 4, true) // The same, reversed
Insert cell
Insert cell
dicopal.getPalettes({ number: 3 }) // Returns the 135 instances of palette with a 3-color variation
Insert cell
Insert cell
dicopal.getPalettes({ type: "qualitative" }) // Returns the 160 instances of qualitative palettes
Insert cell
Insert cell
data = dicopal.getPalettes({ provider: "colorbrewer" }) // Returns the 265 instances of colorbrewer palettes
Insert cell
Insert cell
dicopal.getPalettes({ type: "qualitative", number: 10 })
Insert cell
Insert cell
dicopal.getPalettes() // Returns the 1600 instances of palettes
Insert cell
Insert cell
Insert cell
Insert cell
dicopal.getSequentialColors('Blues', 20);
Insert cell
Insert cell
Insert cell
dicopal.getAsymmetricDivergingColors('RdYlBu', 9, 4, true, true);
Insert cell
Insert cell
Insert cell
dicopal.getAsymmetricDivergingColors('RdYlBu', 9, 4, true, false);
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
dicopal.getRawData("cmocean") // For a given provider
Insert cell
dicopal.getRawData() // For all the providers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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