country numbers in pgn's

Sort:
Avatar of BrightBlunderOwl

In the PGNs that chess.com shares, there are fields [whitecountry] and [blackcountry]. Does anyone know where I can find the list of those codes?

Belgium seems to be 5, United States 2, Paraguy 109, Peru 110, Spain 163.

[Event "vs Computer"]
[Site "Chess.com"]
[White "AnoukAdel"]
[Black "Antonio-BOT"]
[Result "0-1"]
[WhiteElo "792"]
[BlackElo "1500"]
[TimeControl "1/0"]
[Termination "Antonio-BOT won by resignation"]
[WhiteUrl "https://images.chesscomfiles.com/uploads/v1/user/193072491.15be293c.50x50o.2a1b40395db5.jpg"]
[WhiteCountry "5"]

[WhiteTitle ""]
[BlackUrl "https://images.chesscomfiles.com/uploads/v1/user/66746046.dd495bd0.50x50o.1841f4b7fbd5.png"]
[BlackCountry "109"]

[BlackTitle ""]

Avatar of Martin_Stahl
AnoukAdel wrote:

In the PGNs that chess.com shares, there are fields [whitecountry] and [blackcountry]. Does anyone know where I can find the list of those codes?

Belgium seems to be 5, United States 2, Paraguy 109, Peru 110, Spain 163.

[Event "vs Computer"]
[Site "Chess.com"]
[White "AnoukAdel"]
[Black "Antonio-BOT"]
[Result "0-1"]
[WhiteElo "792"]
[BlackElo "1500"]
[TimeControl "1/0"]
[Termination "Antonio-BOT won by resignation"]
[WhiteUrl "https://images.chesscomfiles.com/uploads/v1/user/193072491.15be293c.50x50o.2a1b40395db5.jpg"]
[WhiteCountry "5"]

[WhiteTitle ""]
[BlackUrl "https://images.chesscomfiles.com/uploads/v1/user/66746046.dd495bd0.50x50o.1841f4b7fbd5.png"]
[BlackCountry "109"]

[BlackTitle ""]

Where exactly are you getting those PGNs from? Country isn't included in the web export from the archive

Avatar of BrightBlunderOwl
Martin_Stahl wrote:

Where exactly are you getting those PGNs from? Country isn't included in the web export from the archive

It is, if you first click Analysis, and do the export from over there (the share button is now on the right side).

Avatar of Martin_Stahl
AnoukAdel wrote:
Martin_Stahl wrote:

Where exactly are you getting those PGNs from? Country isn't included in the web export from the archive

It is, if you first click Analysis, and do the export from over there (the share button is now on the right side).

Are you on one of the apps? I'm not seeing that on the website.

Avatar of BrightBlunderOwl
Martin_Stahl wrote:
AnoukAdel wrote:
Martin_Stahl wrote:

Where exactly are you getting those PGNs from? Country isn't included in the web export from the archive

It is, if you first click Analysis, and do the export from over there (the share button is now on the right side).

Are you on one of the apps? I'm not seeing that on the website.

No, I'm on the site, on my laptop. First go to Archive, like you said. Click on a game (click on the date). The game opens. Then in your righthand corner below, click Analysis. A new page opens. In that new window, click the share sign, it is now all the way at the bottom right.

Avatar of Martin_Stahl

I don't see a Country field in the PGN that way.

Avatar of BrightBlunderOwl

Avatar of Martin_Stahl

OK, I'm only seeing this out of the Beta. I'll ask about it.

Avatar of TheDudeRobert

Hi - This is NOT beta. I’ve seen this WhiteCountry and BlackCountry tags in the PGN whenever you click on “share” and select PGN (when pulling up a game from the Library, or from Analysis in Game Review) for quite a while now.

The tags contain a number for the country (as the original post indicated): USA = 2, Vatican City = 147, etc.

Can we get a list of the Country Codes? Thx.

Avatar of Martin_Stahl
TheDudeRobert wrote:

Hi - This is NOT beta. I’ve seen this WhiteCountry and BlackCountry tags in the PGN whenever you click on “share” and select PGN (when pulling up a game from the Library, or from Analysis in Game Review) for quite a while now.

The tags contain a number for the country (as the original post indicated): USA = 2, Vatican City = 147, etc.

Can we get a list of the Country Codes? Thx.

I followed up with my original report and that data isn't supposed to be exported so I don't believe that staff will release a mapping.

At some point it will likely be removed from exports.

Avatar of TheDudeRobert

Thank you @Martin_Stahl for the clarification and quick response.

Avatar of JorgePittala

[es] Me tomé el trabajo de recopilarlos, puede haber algún error, ya que lo hice de forma manual, saludos a todos.
[en] I took the time to compile them; there may be some errors, as I did it manually. Greetings to all.
// 1.. (Sin uso: 1, 6, 7, 8)
'united states': '2','usa': '2','us': '2','estados unidos': '2','estadosunidos': '2',
'canada': '3','ca': '3','can': '3',
'argentina': '4','ar': '4','arg': '4',
'belgium': '5','belgica': '5','belgique': '5','be': '5',
'afghanistan': '9','afg': '9',

// 10..
'albania': '10','al': '10',
'andorra': '11','ad': '11',
'anguilla': '12','ai': '12',
'antigua and barbuda': '13','antigua': '13','barbuda': '13','ag': '13',
'armenia': '14','am': '14',
'aruba': '15','aw': '15',
'australia': '17','au': '17',
'austria': '18','at': '18',
'bahamas': '19','bs': '19',

// 20..
'bahrain': '20','barein': '20','bh': '20',
'barbados': '21','bb': '21',
'generic_war_flag': '22','bandera generica por la guerra': '22','war_flag': '22',
'belize': '23','belice': '23','bz': '23',
'bermuda': '24','bermudas': '24','bm': '24',
'bolivia': '25','bo': '25',
'bosnia and herzegovina': '26','bosnia': '26','bosniaherzegovina': '26','ba': '26',
'brazil': '27','brasil': '27','br': '27',
'bulgaria': '28','bg': '28',
'canarias': '29','islas canarias': '29','canary islands': '29',

// 30.. (Sin uso: 31)
'cayman islands': '30','islas caiman': '30','islas caimán': '30','ky': '30',

'chile': '32','cl': '32',
'china': '33','cn': '33',
'colombia': '34','co': '34',
'costa rica': '35','cr': '35','costarica': '35',
'croatia': '36','hr': '36','croacia': '36',
'cuba': '37','cu': '37',
'curacao': '38','curaçao': '38','cw': '38',
'cyprus': '39','chipre': '39','cy': '39',

// 40..
'czech republic': '40','czechia': '40','republica checa': '40','cz': '40',
'denmark': '41','dinamarca': '41','dk': '41',
'dominica': '42','dm': '42',
'dominican republic': '43','republica dominicana': '43','dominicana': '43','do': '43',
'ecuador': '44','ec': '44',
'egypt': '45','egipto': '45','eg': '45',
'el salvador': '46','elsalvador': '46','sv': '46',
'estonia': '47','ee': '47',
'falkland islands': '48','islas malvinas': '48','malvinas': '48','fk': '48',
'faroe islands': '49','islas feroe': '49','fo': '49',

// 50..
'fiji': '50','fiyi': '50','fj': '50',
'finland': '51','finlandia': '51','suomi': '51','fi': '51',
'france': '52','francia': '52','fr': '52',
'georgia': '53','georgia_country': '53','georgia republic': '53','georgie': '53','ge': '53',
'germany': '54','alemania': '54','deutschland': '54','de': '54',
'gibraltar': '55','gi': '55',
'greece': '56','grecia': '56','hellas': '56','gr': '56',
'greenland': '57','groenlandia': '57','gl': '57',
'grenada': '58','granada': '58','gd': '58',
'guadeloupe': '59','guadalupe': '59','gp': '59',

// 60..
'guam': '60', 'gu': '60',
'guatemala': '61', 'gt': '61',
'guernsey': '62','gg': '62',
'guyana': '63','gy': '63',
'haiti': '64','haití': '64','ht': '64',
'honduras': '65','hn': '65',
'hong kong': '66','hongkong': '66','hk': '66',
'hungary': '67','hungria': '67','hu': '67',
'iceland': '68','islandia': '68','is': '68',
'india': '69','in': '69',

// 70..
'indonesia': '70','id': '70',
'iran': '71','ir': '71',
'iraq': '72','iq': '72',
'ireland': '73','irlanda': '73','ie': '73',
'isle of man': '74','isla de man': '74','im': '74',
'israel': '75','il': '75',
'italy': '76','italia': '76','it': '76',
'jamaica': '77','jm': '77',
'japan': '78','japon': '78','jp': '78',
'jersey': '79','je': '79',

// 80..(Sin uso: 83)
'jordan': '80','jordania': '80','jo': '80',
'kazakhstan': '81','kazajistan': '81','kz': '81',
'kiribati': '82','ki': '82',
'kuwait': '84','kw': '84',
'latvia': '85','letonia': '85','lv': '85',
'lebanon': '86','libano': '86','lb': '86',
'liechtenstein': '87','li': '87',
'lithuania': '88','lituania': '88','lt': '88',
'luxembourg': '89','luxemburgo': '89','lu': '89',

// 90..
'macao': '90','macau': '90','mo': '90',
'north macedonia': '91','macedonia del norte': '91','mk': '91',
'malaysia': '92','malasia': '92','my': '92',
'malta': '93','mt': '93',
'martinique': '94','martinica': '94','mq': '94',
'moldova': '95','moldavia': '95','md': '95',
'mexico': '96','méxico': '96','mx': '96','mex': '96',
'monaco': '97','mónaco': '97','mc': '97',
'montserrat': '98','ms': '98',
'nauru': '99','nr': '99',

// 100..
'nepal': '100','np': '100',
'netherlands': '101','paises bajos': '101','países bajos': '101','nl': '101',
'new zealand': '102','nueva zelanda': '102','nz': '102',
'nicaragua': '103','ni': '103',
'norway': '104','noruega': '104','no': '104','norge': '104',
'oman': '105','omán': '105','om': '105',
'pakistan': '106','pakistán': '106','pk': '106',
'panama': '107','panamá': '107','pa': '107',
'papua new guinea': '108','papua nueva guinea': '108','pg': '108',
'paraguay': '109','py': '109',

// 110..
'peru': '110','perú': '110','pe': '110',
'philippines': '111','filipinas': '111','ph': '111',
'poland': '112','polonia': '112','pl': '112',
'portugal': '113','pt': '113',
'puerto rico': '114','pr': '114',
'romania': '115','rumania': '115','ro': '115',
'russia': '116','rusia': '116','ru': '116',
'saint kitts and nevis': '118','san cristobal': '118','saint kitts': '118','kn': '118',
'saint lucia': '119','santa lucia': '119','lc': '119',

// 120..
'saint pierre and miquelon': '120','san pedro y miquelon': '120','saint pierre': '120','pm': '120',
'san marino': '122','sanmarino': '122','sm': '122',
'saudi arabia': '123','arabia saudi': '123','sa': '123',
'singapore': '125','singapur': '125','sg': '125',
'slovakia': '126','eslovaquia': '126','sk': '126',
'slovenia': '127','eslovenia': '127','si': '127',
'solomon islands': '128','islas salomon': '128','sb': '128',
'south africa': '129','sudafrica': '129','za': '129',

// 130..
'south georgia': '130','georgia del sur': '130','gs': '130',
'suriname': '131','surinam': '131','sr': '131',
'sweden': '132','suecia': '132','se': '132',
'switzerland': '133','suiza': '133','ch': '133',
'taiwan': '134','tw': '134',
'thailand': '135','tailandia': '135','th': '135',
'tonga': '136','to': '136',
'trinidad and tobago': '137','trinidad y tobago': '137','tt': '137',
'turkey': '138','turquia': '138','tr': '138',
'turkmenistan': '139','tm': '139',

// 140..
'tuvalu': '140','tv': '140',
'ukraine': '141','ucrania': '141','ua': '141',
'united arab emirates': '142','emiratos arabes unidos': '142','uae': '142','ae': '142',
'uruguay': '143','uy': '143',
'uzbekistan': '145','uzbekistan': '145','uz': '145',
'vanuatu': '146','vu': '146',
'vatican city': '147','ciudad del vaticano': '147','va': '147',
'venezuela': '148','ve': '148',
'vietnam': '149','vietnan': '149','vn': '149',

// 150..
'yemen': '151','ye': '151',
'american samoa': '153','samoa americana': '153','as': '153',
'saint vincent and the grenadines': '154','san vicente y las granadinas': '154','vc': '154',
'azerbaijan': '156','azerbaiyan': '156','az': '156',
'mongolia': '157','mn': '157',
'syria': '158','siria': '158','sy': '158',
'england': '159','inglaterra': '159','gb-eng': '159',

// 160..
'marshall islands': '160','islas marshall': '160','mh': '160',
'scotland': '162','escocia': '162','gb-sct': '162',
'spain': '163','españa': '163','es': '163',
'united kingdom': '164','reino unido': '164','uk': '164','gb': '164',
'united states virgin islands': '165','islas virgenes de ee uu': '165','vi': '165',
'wales': '166','gales': '166','gb-wls': '166',

// 175..
'south korea': '175','corea del sur': '175','kr': '175',
'kyrgyzstan': '176','kirguistan': '176','kg': '176',
'bangladesh': '177','banglades': '177','bd': '177',
'sudan': '178','sd': '178',
'benin': '179','bj': '179',

// 180..
'bhutan': '180','butan': '180','bt': '180',
'botswana': '181','botsuana': '181','bw': '181',
'brunei': '182','bn': '182',
'burundi': '183','bi': '183',
'cambodia': '184','camboya': '184','kh': '184',
'cameroon': '185','camerun': '185','cm': '185',
'cape verde': '186','cabo verde': '186','cv': '186',
'central african republic': '187','republica centroafricana': '187','cf': '187',
'chad': '188','td': '188',
'congo': '189','cg': '189',

// 190..
'cote d\'ivoire': '190','côte d’ivoire': '190','costa de marfil': '190','ci': '190',
'djibouti': '191','yibuti': '191','dj': '191',
'equatorial guinea': '192','guinea ecuatorial': '192','gq': '192',
'gabon': '193','gabón': '193','ga': '193',
'ghana': '194','gh': '194',
'kenya': '195','kenia': '195','ke': '195',
'laos': '196','la': '196',
'liberia': '197','lr': '197',
'madagascar': '198','mg': '198',
'morocco': '199','marruecos': '199','ma': '199',

// 200..
'mozambique': '200','mz': '200',
'myanmar': '201','birmania': '201','mm': '201',
'namibia': '202','na': '202',
'niger': '203','ne': '203',
'nigeria': '204','ng': '204',
'qatar': '206','catar': '206','qa': '206',
'rwanda': '207','ruanda': '207','rw': '207',
'samoa': '208','ws': '208',
'sao tome and principe': '209','santo tome y principe': '209','st': '209',

// 210..
'senegal': '210','sn': '210',
'sierra leone': '211','sierra leona': '211','sl': '211',
'somalia': '212','so': '212',
'sri lanka': '213','lk': '213',
'eswatini': '214','esuatini': '214','swaziland': '214','sz': '214',
'tajikistan': '215','tayikistan': '215','tj': '215',
'tanzania': '216','tz': '216',
'timor-leste': '217','timor leste': '217','tl': '217',
'togo': '218','tongo': '218','tg': '218',
'tunisia': '219','tunez': '219','túnez': '219','tn': '219',

// 220..
'uganda': '220','ug': '220',
'zambia': '221','zm': '221',
'zimbabwe': '222','zimbabue': '222','zw': '222',
'algeria': '223','argelia': '223','dz': '223',
'mauritania': '224','mr': '224',
'international': '225','internacional': '225','world': '225',

};

Avatar of ElijahLogozarStudent

it looks like at least one person is interested in this already and continued on it

Avatar of JorgePittala
ElijahLogozarStudent escribió:

it looks like at least one person is interested in this already and continued on it

I developed an extension that extracts PGNs from chessclub and passes them to chesscom, and I came across the topic of countries and this debate in the forum, and I wanted to make my contribution to the community since I couldn't find any previous information.