feat: Add US location name lookup choropleth, scattergeo traces by camdecoster · Pull Request #7731 · plotly/plotly.js

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@camdecoster

Copy link

Contributor

@camdecoster camdecoster commented

Mar 23, 2026

edited

Loading

Description

Add USA location name lookup for locationmode: "USA-states" in choropleth, scattergeo traces.

Closes #7437.

Changes

  • Add list of USA location names
  • Add USA location name lookup to geo location utilities
  • Update attribute description
  • Update test to use new lookup

Testing

  • Be on main
  • Open test/image/mocks/geo_choropleth-usa.json
  • Replace the 'TX' location with 'Texas'
  • Run plotly.js devtools with npm start
  • Open the geo_choropleth-usa mock
  • Note that Texas isn't showing in the choropleth
  • Discard changes
  • Switch to this branch
  • Reload the mock (which has been updated in this PR with the above change)
  • Note that Texas is showing in the choropleth

Notes

  • This is a simple string comparison with no regex. Regex could be used in the future.
  • Washington DC has a few entries to cover potential versions of the location name

@camdecoster camdecoster marked this pull request as ready for review

March 23, 2026 18:00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Support full state names for US states choropleth

1 participant

@camdecoster