Skip to content

Instantly share code, notes, and snippets.

@norcal82
Last active November 12, 2024 21:04
Show Gist options
  • Save norcal82/c219ecf9b932d7db4ee6 to your computer and use it in GitHub Desktop.
Save norcal82/c219ecf9b932d7db4ee6 to your computer and use it in GitHub Desktop.
plain text of US state names
// https://gist.github.com/dblandin/2991970
Alaska
Alabama
Arkansas
American Samoa
Arizona
California
Colorado
Connecticut
District of Columbia
Delaware
Florida
Georgia
Guam
Hawaii
Iowa
Idaho
Illinois
Indiana
Kansas
Kentucky
Louisiana
Massachusetts
Maryland
Maine
Michigan
Minnesota
Missouri
Mississippi
Montana
North Carolina
North Dakota
Nebraska
New Hampshire
New Jersey
New Mexico
Nevada
New York
Ohio
Oklahoma
Oregon
Pennsylvania
Puerto Rico
Rhode Island
South Carolina
South Dakota
Tennessee
Texas
Northern Mariana Islands
Utah
Virginia
Virgin Islands
Vermont
Washington
Wisconsin
West Virginia
Wyoming
@nicorellius
Copy link

Awesome, thanks

@mikeymop
Copy link

🙏

@raufkhantanoli
Copy link

Good u sloved my problem

@LanaG
Copy link

LanaG commented Nov 13, 2022

Thank you very much for your service to the worldwide community of developers!

@coolj92
Copy link

coolj92 commented Feb 9, 2023

@norcal82 Thanks so much!! One error I noticed is: "District of Columbia" is on separate lines, instead of concatenated.

@bertday
Copy link

bertday commented Oct 5, 2023

Thank you for posting these 👍

Heads up that there are not in alphabetical order in case anyone is expecting that!

@ezgranet
Copy link

ezgranet commented Nov 9, 2024

The Northern Mariana Islands should be listed given all other inhabited US territories are

@norcal82
Copy link
Author

@coolj92 tad late but just saw this and updated. thanks :) @ezgranet will update that now. thanks for letting me know

@bertday
Copy link

bertday commented Nov 12, 2024

Tiny suggestion - I think it should be "Northern Mariana Islands" without the "The". That seems to be the canonical name:

https://en.wikipedia.org/wiki/Northern_Mariana_Islands

@norcal82
Copy link
Author

@bertday updated. thank you for the correction

@ezgranet
Copy link

@bertday correct—the U.S. Code uses ‘the Northern Mariana Islands’ (lowercase ‘t’) as the short name (the full name being Commonwealth of the Northern Mariana Islands). See, e.g., 48 U.S.C. § 1479. The usual convention is that, unless the ‘The’ (capital T) is an integral part of the name, like The Bahamas or The Gambia, it’s omitted in lists.

On alphabetizing, should we have 1–50 be the U.S. states alphabetically, then 51 is the District of Columbia, then the inhabited U.S. territories alphabetically followed by the uninhabited ones that get ISO codes (e.g., Wake Island or Palmyra Atoll)? I anticipate most use cases will involve 50 states, followed by ones needing DC, followed by ones needing the inhabited territories, followed way way back by ones needing all the ISO designated ones for the uninhabited territories? This makes it more complicated, but equally, my use case (admittedly something very silly involving a geography guessing game) required deleting the territories and D.C. so I had just lines 1–50 as the states. Of course, it costs nothing to make other gists with variations but this gist seems to be the standard one with the largest use (given that, amazingly, there wasn’t anything else that showed up with a quick and easy plain text list)

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