Skip to content

✨ Add categorical map color palette#6121

Merged
sophiamersmann merged 2 commits intomasterfrom
categorical-map-color
Feb 24, 2026
Merged

✨ Add categorical map color palette#6121
sophiamersmann merged 2 commits intomasterfrom
categorical-map-color

Conversation

@sophiamersmann
Copy link
Member

@sophiamersmann sophiamersmann commented Feb 19, 2026

Resolves #5970

Improves colours for categorical maps

  • Adds a new color palette to Grapher, specifically designed for categorical maps (Figma)
  • Applies a migration that updates suboptimal colors in maps (Figma)
  • Adds map-optimized colors for regions, used for the maps in Region DoDs

Charts affected by the migration: http://staging-site-categorical-map-color/admin/test/embeds?ids=408,865,1290,4692,4801,4802,4854,5298,5318,5422,5932,5933,6001,6009,6013,6014,6015,6016,6017,6018,6019,6020,6021,6489,7146,7537,7539,7540,7739,7784,7889,7932,8038,8046,8151,8435,8436,8437,8438,8439,8440,8441,8462,8606,8725,8727,8820,8847,8903,8932&comparisonUrl=https%3A%2F%2Fourworldindata.org

@github-actions github-actions bot added the staging-viz Let SVG tester fail silently in CI label Feb 19, 2026
@owidbot
Copy link
Contributor

owidbot commented Feb 19, 2026

Quick links (staging server):

Site Dev Site Preview Admin Wizard Docs

Login: ssh owid@staging-site-categorical-map-color

Archive:
SVG tester:

Number of differences (graphers): 1872 (eb91e9) ❌ Report
Number of differences (grapher views): 657 (d8d1af) ❌ Report
Number of differences (mdims): 168 (f173c1) ❌ Report
Number of differences (explorers): 940 (c5a5f8) ❌ Report

Edited: 2026-02-24 12:13:44 UTC
Execution time: 1.36 seconds

@sophiamersmann sophiamersmann changed the base branch from region-dods-extended to graphite-base/6121 February 20, 2026 10:54
@sophiamersmann sophiamersmann changed the base branch from graphite-base/6121 to test-page-iframes February 23, 2026 12:28
@sophiamersmann sophiamersmann force-pushed the categorical-map-color branch 2 times, most recently from 891921a to 9bd4d7e Compare February 23, 2026 14:53
@sophiamersmann sophiamersmann marked this pull request as ready for review February 23, 2026 14:54
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9bd4d7e4ed

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +40 to +42
// We use OwidMapColors instead of the scheme's palette
// because it includes three additional 'special' colors
// to be used sparingly when needed (Taupe, Mustard, Tomato)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These extra three colors are the main reason the preset colors are customised here, because they're not part of the palette, but should be available to authors in case they need them for specific reasons

"Sub Saharan Africa": OwidDistinctColors.DarkMauve,
"South and South East Asia": OwidDistinctColors.OliveGreen,
"Middle East and North Africa": OwidDistinctColors.Camel,
"East Asia (Maddison)": OwidDistinctColors.Copper,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These ones slipped through somehow: some region names are made up and the 'Maddison' suffix is missing (probably Claude added them and I didn't notice at the time) - fixed now

"Oceania (UN SDG)": OwidDistinctColors.Turquoise,
"Sub-Saharan Africa (UN SDG)": OwidDistinctColors.DarkMauve,

// ILO regions
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated

CustomColorSchemes.push(OwidCategoricalMapScheme)

// Map-specific region colors
export const MapContinentColors = {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are only used for the region maps in region dods (doesn't make much sense otherwise because these are map-optimised colors for regions that are never plotted on a map...)

Copy link
Member

@marcelgerber marcelgerber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

Copy link
Member Author

sophiamersmann commented Feb 24, 2026

Merge activity

  • Feb 24, 1:52 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Feb 24, 2:07 PM UTC: Graphite rebased this pull request as part of a merge.
  • Feb 24, 2:07 PM UTC: @sophiamersmann merged this pull request with Graphite.

@sophiamersmann sophiamersmann changed the base branch from test-page-iframes to graphite-base/6121 February 24, 2026 14:04
@sophiamersmann sophiamersmann changed the base branch from graphite-base/6121 to master February 24, 2026 14:05
@sophiamersmann sophiamersmann merged commit ae3b2e4 into master Feb 24, 2026
18 of 20 checks passed
@sophiamersmann sophiamersmann deleted the categorical-map-color branch February 24, 2026 14:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-code-assisted staging-viz Let SVG tester fail silently in CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a color palette for categorical maps

4 participants