Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for feedback - United States IRS Country Codes #726

Open
KennethScott opened this issue Nov 22, 2023 · 0 comments
Open

Request for feedback - United States IRS Country Codes #726

KennethScott opened this issue Nov 22, 2023 · 0 comments

Comments

@KennethScott
Copy link

KennethScott commented Nov 22, 2023

Would there be any interest in incorporating the United States Internal Revenue Service (IRS) Country Codes into this project?

If you've ever worked in Banking, Finance, Accounting, Investments, etc. you know the joy of how the IRS uses their own (outdated) 2-character country codes that are a little different from the ISO2 codes.

Reference

I'm curious if there would be any interest in trying to incorporate that data into this project. Sadly there's not a one-to-one between the codes to allow for easy translation. Probably 80% are the same as the ISO, but the ones that aren't are a pain. Besides some countries simply having a different 2 character code, there are other fun scenarios such as:

  • The IRS code includes many of the Islands and Atolls that are in the states listing in this project.
    Ashmore and Cartier Islands IRS=AT but would map to ISO2=AU
    Midway Islands IRS=MQ but would map to ISO2=US
  • Some of the IRS country names are outdated and therefore their code appears outdated/wrong.
    Burma IRS=BM but would map to Myanmar ISO2=MM
  • Then you have the wonderful catchall:
    Other Country IRS=OC that doesn't really map to anything :(

Just all sorts of fun little edge cases like that... The unfortunate thing is I don't think you could simply add the IRS code as another attribute on the ISO2 entry because it's not one-to-one. You'd have 3 IRS codes for Australia, 9 IRS codes for United States, etc. I am guessing you'd have to have a dedicated IRS country code table that you could map back to the ISO entries.

Here's a gist where I've mapped them if you want to see more details.

I'm curious what others think/if there's any interest.

Thanks-

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant