Skip to content

Commit

Permalink
finalize bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
konstantinstadler committed Nov 10, 2023
1 parent 012ac47 commit c958211
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,20 @@
### Development

- removed htmlcov
- fixed numerical position warning

### Classifications

- Added CC41 common classification (by @hazimhussein)
- Correct spelling "Faeroe Islands" to "Faroe Islands" #145 (by @jpatokal)
- Added country code for Kosovo (by @jimmy927)
- Added Carribian Netherlands/Bonaire (by @jimmy927)
- Switched short name of Czech Republic to Czechia
- Added EL to the ISO2 codes for Greece
- Allow Guiana/Guiyana in most cases when given British/Dutch/French prefix
- Allow Gabun/Gabon
- Allow Botsuana/Botswana
- Allow England for UK


## 1.0.0
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ python as well as in matlab. For further information see
Currently the following classification schemes are available (see also
Data sources below for further information):

1. ISO2 (ISO 3166-1 alpha-2)
1. ISO2 (ISO 3166-1 alpha-2) - including UK/EL for Britain/Greece (but always convert to GB/GR)
2. ISO3 (ISO 3166-1 alpha-3)
3. ISO - numeric (ISO 3166-1 numeric)
4. UN numeric code (M.49 - follows to a large extend ISO-numeric)
Expand Down Expand Up @@ -448,9 +448,12 @@ Note that the underlying dataframe is available at the attribute .data

## Data sources and further reading

Most of the underlying data can be found in Wikipedia, the page
describing [ISO 3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) is a
good starting point. UN regions/codes are given on the United Nation
Most of the underlying data can be found in Wikipedia, the page describing [ISO
3166-1](https://en.wikipedia.org/wiki/ISO_3166-1) is a good starting point. The
page on the [ISO2 codes](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)
includes a section "Imperfect Implementations" explaining the GB/UK and EL/GR
issue.
UN regions/codes are given on the United Nation
Statistical Division
([unstats](http://unstats.un.org/unsd/methods/m49/m49regin.htm))
webpage. The differences between the ISO numeric and UN (M.49) codes are
Expand Down
2 changes: 1 addition & 1 deletion country_converter/country_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ def cli_output(conv_names, sep):
conv_names = conv_names.iloc[:, 0].tolist()
elif len(conv_names.columns) == 2:
for row in conv_names.iterrows():
print(str(row[1][0]) + sep + str(row[1][1]))
print(str(row[1].iloc[0]) + sep + str(row[1].iloc[1]))
return
print(
sep.join(
Expand Down
2 changes: 1 addition & 1 deletion country_converter/country_data.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Bhutan Kingdom of Bhutan bhutan BT BTN 64 64 18 162 Asia Southern Asia WW WA WA
Bolivia Plurinational State of Bolivia bolivia BO BOL 68 68 19 121 America South America WW WL WL WWW WWL WWL RoW BOL LAC Rest of South America LAM 1945 1945 RoW Plurinational State of Bolivia 428 bo 145 Rest of World
Bonaire, Saint Eustatius and Saba Bonaire, Saint Eustatius and Saba ^bonaire|(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\bbes.?islands BQ BES 535 535 278 America Caribbean WW WL WL WWW WWL WWL RoW LAC LAM RoW Other non-OECD Americas bq Rest of World
Bosnia and Herzegovina Bosnia and Herzegovina herzegovina|bosnia BA BIH 70 70 80 44 Europe Southern Europe WW WE WE WWW WWE WWE RoW BIH EEU Central Europe NEU 1992 1992 RoW Bosnia and Herzegovina 64 ba 346 Rest of World
Botswana Republic of Botswana botswana|bechuana BW BWA 72 72 20 193 Africa Southern Africa WW WF WF WWW WWF WWF RoW BWA AFR Rest of Southern Africa SSA 1966 1966 RoW Botswana 227 bw 571 Rest of World
Botswana Republic of Botswana botswana|bechuana|botsuana BW BWA 72 72 20 193 Africa Southern Africa WW WF WF WWW WWF WWF RoW BWA AFR Rest of Southern Africa SSA 1966 1966 RoW Botswana 227 bw 571 Rest of World
Bouvet Island Bouvet Island bouvet BV BVT 74 74 31 Antarctica South America WW WA WA WWW WWA WWA RoW LAM RoW Other non-OECD Asia Rest of World
Brazil Federative Republic of Brazil brazil BR BRA 76 76 21 135 America South America BR BR BR BRA BRA BRA BRA BRA LAC Brazil LAM 1945 1945 BX BRIC BASIC G20 Brazil 431 br 140 Brazil
British Antarctic Territories British Antarctic Territories br.*antarctic.?territ.* B1 BA1 Antarctica WW WA WA WWW WWA WWA RoW 1979 RoW Rest of World
Expand Down
1 change: 1 addition & 0 deletions tests/test_regex_misc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Bonaire, Saint Eustatius and Saba bonaire, saint eustatius and saba
Bonaire, Saint Eustatius and Saba bonaire
Bonaire, Saint Eustatius and Saba Bonaire and Saint Eustatius
Bonaire, Saint Eustatius and Saba Caribian Netherlands
Botswana Botsuana
Cabo Verde Cape Verde
Cayman Islands Cayman Isds
Central African Republic Central African Rep.
Expand Down

0 comments on commit c958211

Please sign in to comment.