Skip to content

Commit

Permalink
Bug fixes (#150)
Browse files Browse the repository at this point in the history
* added iso number codes test, including Kosovo

* Change short name of chzech republic to czechia, fix #147

* added EL to greece code, fix #143

* allow for gu(y|i)ana - fix #140

* allow for gabun/gabon

* Allow England for UK

* Test for netherland antilles and moldvia - fix #105

* Test for Macao Macau - fix #90

* finalize bug fix

* with black formating
  • Loading branch information
konstantinstadler authored Nov 10, 2023
1 parent 991ce12 commit aee2ee2
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 23 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +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
Loading

0 comments on commit aee2ee2

Please sign in to comment.