GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: Add US location name lookup choropleth, scattergeo traces by camdecoster · Pull Request #7731 · plotly/plotly.js

Conversation

@camdecoster

@camdecoster camdecoster commented Mar 23, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
camdecoster added 5 commits March 23, 2026 09:03
@camdecoster
Linting/formatting
1c4af9b
@camdecoster
Allow US states to be looked up by name
f12bff2
@camdecoster
Update mock to test state name lookup
24dfe9a
@camdecoster
Update schema
ed13174
@camdecoster
Add draftlog
971b018
@camdecoster
camdecoster marked this pull request as ready for review March 23, 2026 18:00
camdecoster added 2 commits March 23, 2026 12:28
@camdecoster
Switch to CommonJS syntax
ad2513e
@camdecoster
Update Maplibre mock baseline image
2c5955f
@camdecoster camdecoster assigned emilykl Mar 25, 2026
@archmoj

archmoj commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

Thanks @camdecoster for the PR.
Would you please add a test e.g. displaying all the states in an image test?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@emilykl

emilykl commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

@camdecoster Maybe you could modify the existing geo_choropleth-usa mock to include two subplots, one which uses state names and one of which uses abbreviations?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

emilykl
emilykl reviewed Mar 26, 2026
View reviewed changes
Comment thread draftlogs/7731_add.md Resolved

Uh oh!

There was an error while loading. Please reload this page.

emilykl
emilykl approved these changes Mar 26, 2026
View reviewed changes

@emilykl emilykl left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

See my two minor comments but overall looks good 👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
camdecoster and others added 3 commits March 26, 2026 10:10
@camdecoster
Update mock to only use full location names in subplot
390a070
@camdecoster @emilykl
Apply suggestion from @emilykl
81fdc51
Co-authored-by: Emily KL <[email protected]>
@camdecoster
Update baseline
4f29b0a
@camdecoster
camdecoster merged commit 7aac171 into master Mar 26, 2026
5 of 6 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@camdecoster
camdecoster deleted the cam/7437/add-us-location-name-lookup branch March 26, 2026 16:45
@archmoj

archmoj commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

Thank you @camdecoster and @emilykl.
You could simply label this PR (as well #7707 and #7730) as features.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

Reviewers

1 more reviewer
@emilykl emilykl emilykl approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@emilykl emilykl

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

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@camdecoster @archmoj @emilykl
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.