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
Collection of ISO codes for countries #46
Comments
EU = ["se", "fi", "dk", "ie", "ee", "lv", "lt", "nl", "be", "lu", "de", "pl", "cz", "sk", "at", "hu", "ro", "bg", "si", "hr", "it", "fr", "es", "pt", "mt", "gr", "cy"] (Total count should be 27 these days). |
europe = eu + ["gb", "is", "no", "ch", "mc", "ad", "sm", "va", "ba", "rs", "me", "mk", "al", "by", "ua", "ru", "md"] The following may be included depending on definition: "tr", "ge", "az", "am" "gb" or "uk" are both reserved, but GB is the official one. Edit: Forgot Moldova |
Europe also has a bunch of dependent territories with their own 2 letter code (e.g. AX is the Åland Islands in Finland), I assume these can be ignored? Maybe they should be listed for completeness sake: "fo", "ax", "gl", "im", "gg", "je", "gi", and "sj". Where GL is debatable whether it is in Europe. Edit added "fo" |
There are 44 countries in Europe right? How about we add the 17 (out of the EU) + the EU and call it EUROPE aggregation? Is that what you're saying? If so then this list of ISO codes is not up to 17
Am I making any sense? Adding Åland Islands in Finland to European Aggregation will make sense I think. |
Oooo I missed your preview post on this one
But that's 18 + 27 (EU) making 45 countries. There's an extra country. Will that be the Åland Islands? Sorry I don't know the codes and haven't checked them. |
I accidentally listed the Faroe Islands as an independent state. Think the tally should be right now. |
Perfect! Thanks. I'll get this implemented tomorrow :) |
south_america = ["AR" "BO", "BV", "BR", "CL", "CO", "EC", "FK", "GF", "GY", "PY", "PE", "GS", "SR", "UY", "VE"] |
middle_america = ["BZ", "CR", "SV", "GT", "HN", "NI", "PA"] |
Oh great! Thanks. Will get these done by Monday :) |
carribian_islands = [ "BS", "TC", "KY", "CU", "HT", "DO", "JM", "PR", "VI", "VG", "AI", "AG", "MF", "SX", "BQ", "BL", "KN", "MS", "GP", "DM", "MQ", "LC", "VC", "GD", "BB", "TT", "AW", "CW"] |
middle_east_excluding_cyprus = ["BH", "EG", "IR", "IQ", "IL", "JO", "KW", "LB", "OM", "PS", "QA", "SA", "SY", "TR", "AE", "YE"] |
africa = ["DZ", "AO", "BJ", "BW", "BF", "BI", "CM", "CV", "CF", "TD", "KM", "CD", "CG", "CI", "DJ", "EG", "GQ", "ER", "SZ", "ET", "GA", "GM", "GH", "GN", "GW", "KE", "LS", "LR", "LY", "MG", "MW", "ML", "MR", "MU", "MA", "MZ", "NA", "NE", "NG", "RW", "ST", "SN", "SC", "SL", "SO", "ZA", "SS", "SD", "TZ", "TG", "TN", "UG", "ZM", "ZW", "EH"] |
central_asia = ["KZ", "KG", "TJ", "TM", "UZ"] |
east_asia = ["CN", "HK", "MO", "MN", "KP", "KR", "JP", "TW"] |
south_asia = ["BT", "BD", "AF", "IN", "LK", "NP", "PK"] |
south_east_asia = ["KH", "LA", "MM", "MY", "TH", "VN", "PH", "ID", "SG", "BN", "CX", "TL", "CC"] |
✅ Africa done. |
Can you please edit my original post and add the new groupings? To make it easier for me to follow what's implemented and what's not? @lorrden |
✅ Europe done. |
✅ South America cone. |
I'd like to combine all Asian countries, there are 49 countries in Asia, the Asian arrays above give 33 countries... is there a chance you can help me get the rest? @lorrden |
Last part of Asia, excluding Egypt (sinai), and Cyprus (cy); also including and the caucasus states (am, az, ge). Russia was listed above as belonging to Europe, most of the population would be there anyway, same with Cyprus, which inherited Europe from being in the EU. There are probably some Indian Ocean territories that have been missed in the lists. I broke it down in smaller regions West Asia, etc since those are more well defined that Asia as a whole. I think we have a tally larger than 49, I haven't looked at why, but there are some ISO codes assigned to non-generally recognised states which could explain some over count. In any case: |
oceania = ["AU", "FM", "PG", "GU", "MH", "MP", "KI", "NR", "PW", "FJ", "SB", "VU", "UM", "NC", "AS", "CK", "PF", "NZ", "NU", "NF", "PN", "WS", "TK", "TO", "TV", "WF"] |
I don't have permissions to do that. |
OK no worries. I have gone ahead to implement a command to aggregate information on Asia. There might be 2 ISO codes that we'll need to remove. Can you please check and see which two we can removed to get 49 countries for Asia? The ISOs for Asia are here https://github.com/siaw23/kovid/blob/master/lib/kovid/request.rb#L16 |
I'm considering this done. Thanks a lot for the help! :) |
In response to #40, we need help collecting ISO 3166-1 alpha-2 country codes for the following groupings:
EU (European Union)AfricaAsiaSouth AmericaEuropeThe codes should be an array of strings. With this, we can aggregate information on a continental level.
The text was updated successfully, but these errors were encountered: