Skip to content
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

bug Eswatini / Swaziland #29

Closed
LaurentSmeets opened this issue Sep 25, 2020 · 2 comments
Closed

bug Eswatini / Swaziland #29

LaurentSmeets opened this issue Sep 25, 2020 · 2 comments

Comments

@LaurentSmeets
Copy link

I think the name change of Swaziland to Eswatini has not yet been properly implemented in either comtradr or the underlying API

This code gives an error

ct_search(reporters = "Ghana", 
                   partners = "Eswatini "
                   commod_codes = "all",
                   trade_direction = "exports",
                   start_date = "2018",
                   end_date =  "2018")
  

but this code does work

ct_search(reporters = "Ghana", 
                   partners = "Swaziland "
                   commod_codes = "all",
                   trade_direction = "exports",
                   start_date = "2018",
                   end_date =  "2018")
  

However, in the output Eswatini is mentioned as partner country

first line of output looks like this

   classification year period period_desc aggregate_level is_leaf_code trade_flow_code trade_flow reporter_code reporter reporter_iso partner_code  partner partner_iso second_partner_code second_partner
1              H5 2018   2018        2018               2            0               2     Export           288    Ghana          GHA          748 Eswatini         SWZ                  NA           <NA>
@ChrisMuir
Copy link
Member

Hello, thank you for pointing this out. Yes Comtrade updated their countries database. I will push an update to the package data to the main branch today. In the meantime, you can run comtradr::ct_update_databases() to have the comtradr package pull down the latest countries database for local use.

@ChrisMuir
Copy link
Member

Updated the countries pkg data in commit 3dee878.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants