Skip to content

Commit

Permalink
Merge branch 'bug_fixes'
Browse files Browse the repository at this point in the history
  • Loading branch information
konstantinstadler committed Nov 15, 2022
2 parents ca29cae + 98559c1 commit 556f57b
Show file tree
Hide file tree
Showing 8 changed files with 289 additions and 8,199 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,18 @@
### Classifications

- added Costa Rica as new OECD member (2021), fix #118
- added GWCodes, https://www.tandfonline.com/doi/abs/10.1080/03050629908434958
- updated EEA (remove UK, Switzerland)
- rename Turkey to Türkiye

### Bug fixes

- fix UN M.49 names


### Development

- added pandas-convert (via @jim-rivera) for faster conversion of pandas series


## 0.7.7 - 20220805
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,9 @@ Data sources below for further information):
31. [IEA](https://www.iea.org/countries) (World Energy Balances 2021)
32. [DACcode](https://www.oecd.org/dac/financing-sustainable-development/development-finance-standards/dacandcrscodelists.htm)
(numeric - OECD Development Assistance Committee)
33. [ccTLD](https://en.wikipedia.org/wiki/Country_code_top-level_domain) - country code top-level domains
34. [GWcode](https://www.tandfonline.com/doi/abs/10.1080/03050629908434958) - Gledisch & Ward numerical codes as published in https://www.andybeger.com/states/articles/statelists.html


Coco contains official recognised codes as well as non-standard codes
for disputed or dissolved countries. To restrict the set to only the
Expand Down Expand Up @@ -481,10 +484,8 @@ thus EU27 refers to the EU without UK, whereas EU27_2007 refers to the
EU without Croatia (the status after the 2007 enlargement). The shortcut
EU always links to the most recent classification. The
[EEA](https://ec.europa.eu/eurostat/statistics-explained/index.php/Glossary:European_Economic_Area_(EEA))
agreements are still valid for the UK (status September 2020, Brexit
transition period - as [described
here](https://en.wikipedia.org/wiki/European_Economic_Area)), thus UK is
currently included in the EEA.
agreements for the UK ended by 2021-01-01 (which also affects Guernsey, Isle of Man, Jersey and Gibraltar).
Switzerland is not part of the EEA but member of the single market.

The Global Burden of Disease country codes were extracted form the [GBD
code book available
Expand Down
514 changes: 257 additions & 257 deletions country_converter/country_data.tsv

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion country_converter/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.7.7"
__version__ = "0.7.8dev"
4 changes: 3 additions & 1 deletion tests/test_functionality.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ def test_get_correspondence_dict_numeric_replace():
corr_str = cc.get_correspondence_dict(
classA=classA, classB=classB, replace_numeric=True
)

assert type(corr_str) == dict
assert len(corr_str) == 44
assert corr_str["JP"] == ["OECD"]
Expand All @@ -255,13 +256,14 @@ def test_get_correspondence_dict_numeric_replace():
corr_num = cc.get_correspondence_dict(
classA=classA, classB=classB, replace_numeric=False
)

assert type(corr_num) == dict
assert len(corr_num) == 44
assert corr_num["JP"] == [1964]
assert pd.isna(corr_num["ZA"])
assert 2010 in corr_num["WW"]
assert 1961 in corr_num["WW"]
assert len(corr_num["WW"]) == 5
assert len(corr_num["WW"]) == 6


def test_build_agg_conc_custom():
Expand Down
4 changes: 4 additions & 0 deletions tests/test_regex_korea.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ South Korea Rep. of Korea
South Korea Republic of Korea
South Korea Korea (Republic of)
South Korea "Korea, Rep."
South Korea "Korea, Rep."
South Korea Korea, Republic


1 change: 1 addition & 0 deletions tests/test_regex_misc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ Tanzania United Republic of Tanzania
Tanzania Tanzania (United Republic of)
Türkiye Turkey
Türkiye Republic of Turkey
Türkiye Republic of Türkiye
Timor-Leste Democratic Republic of Timor-Leste
Timor-Leste East Timor
Turks and Caicos Islands Turks and caicos islands
Expand Down
Loading

0 comments on commit 556f57b

Please sign in to comment.