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

Country code errors #91

Open
WWakker opened this issue Nov 13, 2020 · 0 comments
Open

Country code errors #91

WWakker opened this issue Nov 13, 2020 · 0 comments

Comments

@WWakker
Copy link

WWakker commented Nov 13, 2020

For a project I have been cleaning up wrong country codes by comparing them to the USPTO database.

These wrong country codes include:

  • country code "un"
  • US state codes instead of US (IL, NY, WI etc.)
  • Different country codes for the same country, for example: Japan (JP, JA), Germany (DE, DT, DL) and many others.

I made two csv files with corrected assignee/inventor country codes. After merging these csv files with the data to get the correct country codes, I used this dictionary to replace country codes:

cc_replace = {'BU': 'BG',
                  'CE': 'CL',
                  'DL': 'DE',
                  'DT': 'DE',
                  'EI': 'IE',
                  'EL': 'IE',
                  'EN': 'GB',
                  'FL': 'LI',
                  'JA': 'JP',
                  'KS': 'KR',
                  'MI': 'US',
                  'NJ': 'US',
                  'NM': 'US',
                  'NY': 'US',
                  'OE': 'AT',
                  'OH': 'US',
                  'OK': 'US',
                  'PO': 'PL',
                  'RH': 'ZW',
                  'RP': 'PH',
                  'SF': 'FI',
                  'SP': 'ES',
                  'SW': 'SE',
                  'TA': 'TZ',
                  'TS': 'TD',
                  'TX': 'US',
                  'VS': 'VN',
                  'WA': 'GB',
                  'WI': 'US',
                  'WN': 'NG',
                  'ZR': 'CD'}

I will attach the a zip file with the two csv files in case you want to look into this.
Corrections to merge.zip

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