◐ Shell
clean mode source ↗

fix: Fix USA subunits, clean up land, coastlines topojson layers by camdecoster · Pull Request #7555 · plotly/plotly.js

@camdecoster

Description

Omit Canadian provinces from USA subunits and snap polygons for land, coastlines topojson layers.

Closes #7528.

Changes

  • Update topojson processing script
  • Update topojson maps
  • Update Biome config
  • Update test baseline images

Screenshots

Description Before After
USA Subunits image image
Coastlines image image

Testing

  • Run the build script and see if it completes successfully: cd topojson && npm run build
  • Load the new maps in Mapshaper and see if they look alright
    • Drag a map file into the Mapshaper web app
  • Make sure CI passes the mock image diff checks

TODO

  • Add draftlog
  • Update test baseline images (if needed)

@gvwilson gvwilson added P1

needed for current cycle

fix

fixes something broken

labels

Sep 10, 2025

emilykl

"noConsole": { "level": "off", "options": { "allow": ["log"] } }
}
},
"includes": [

Choose a reason for hiding this comment

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

@camdecoster What is the effect of this config change?

Choose a reason for hiding this comment

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

You can override the global includes using this one. It included all the same stuff as the global one, so I removed it as redundant.

emilykl


async function createSubunitsLayer({ name, resolution, source }) {
const filter = ['AUS', 'BRA', 'CAN', 'USA'].map((id) => `adm0_a3 === "${id}"`).join(' || ');
// Only include USA for 'usa' scope since the UN and NE borders don't match exactly and slivers of Canada creep in

Choose a reason for hiding this comment

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

slivers of Canada creep in

😄

emilykl

Choose a reason for hiding this comment

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

🚀

@camdecoster camdecoster deleted the cam/7528/fix-subunits-coastlines-topojson branch

September 11, 2025 17:37