Comments (5)
Hello Krisselack, are you referring to using different HS codes for commodities? If so, check out function ct_update_databases, it allows you to download and use any of the available commodity code data sets from the Comtrade website.
If you're referring to something different, please let me know.
from comtradr.
Hi, I guess I have a similar issue here. I notice that in v0.0.2 there is an argument codetype in the function ct_search which allows you to specify which classification you want (HS, SITC and BEC etc). But in v0.2.2 this is no longer available. So is it still possible to specify classification other than HS in ct_search function to get data?
Thanks in advance.
from comtradr.
Hi @Zoefish0510 , yes there is a built-in way to specify and utilize any of the commodity classifications that Comtrade uses. Check out the Package Data
section of the package vignette, specifically this paragraph:
<vignette>
Additionally, the Comtrade API features a number of different commodity reference tables, based on different trade data classification schemes (for more details, see this page from the API docs). comtradr
ships with the commodity table for the “Harmonized System”, or “HS”, scheme. The user may download any of the available commodity tables by specifying arg commodity_type
within function ct_update_databases
(e.g., ct_update_databases(commodity_type = "SITC")
will download the commodity table that follows the “Standard International Trade Classification” scheme). Doing this will replace the commodity table on file with the one specified.
</vignette>
The function ct_search()
will always use the commodity classification that currently exists on file.....HS
is the default, but if you were to run ct_update_databases(commodity_type = "SITC")
to download the SITC classification, then ct_search()
would be using SITC.
from comtradr.
Hello,
I need to download the data with SITC commodity type, after producing the following:
q <- ct_search(reporters = "USA", partners = c("Germany", "France", "Japan", "Mexico"), trade_direction = "imports")
So I used the command below for that:
ct_update_databases(commodity_type = "SITCrev2")
but I get the following error and my data is not really updated:
Updates found. The following datasets have been downloaded: commodities DB, countries DB
Warning message:
JSON string contains (illegal) UTF8 byte-order-mark!
Do you have any suggestions? I search this error but did not find something useful for my problem. Also is the a way to download the data in SITC format from the beginning? I could not find a way to change the HS default.
I would appreciate any help.
Best,
Shadi
from comtradr.
Hi @Zoefish0510 , yes there is a built-in way to specify and utilize any of the commodity classifications that Comtrade uses. Check out the
Package Data
section of the package vignette, specifically this paragraph:
<vignette>
Additionally, the Comtrade API features a number of different commodity reference tables, based on different trade data classification schemes (for more details, see this page from the API docs).comtradr
ships with the commodity table for the “Harmonized System”, or “HS”, scheme. The user may download any of the available commodity tables by specifying argcommodity_type
within functionct_update_databases
(e.g.,ct_update_databases(commodity_type = "SITC")
will download the commodity table that follows the “Standard International Trade Classification” scheme). Doing this will replace the commodity table on file with the one specified.
</vignette>
The function
ct_search()
will always use the commodity classification that currently exists on file.....HS
is the default, but if you were to runct_update_databases(commodity_type = "SITC")
to download the SITC classification, thenct_search()
would be using SITC.
Hello,
I need to download the data with SITC commodity type, after producing the following:
q <- ct_search(reporters = "USA", partners = c("Germany", "France", "Japan", "Mexico"), trade_direction = "imports")
So I used the command below for that:
ct_update_databases(commodity_type = "SITCrev2")
but I get the following error and my data is not really updated:
Updates found. The following datasets have been downloaded: commodities DB, countries DB
Warning message:
JSON string contains (illegal) UTF8 byte-order-mark!
Do you have any suggestions? I search this error but did not find something useful for my problem. Also is the a way to download the data in SITC format from the beginning? I could not find a way to change the HS default.
I would appreciate your help.
Best,
Shadi
from comtradr.
Related Issues (20)
- Provide an argument that allows users to pull all countries and country groupings HOT 1
- updating reference tables HOT 4
- reduce dependencies / magrittr pipe? HOT 1
- add validation for new arguments partner2, mode_of_transportation and customs_code HOT 1
- goodpractice HOT 1
- rebuild the vignettes
- document functions
- write test suite HOT 2
- reactivate pretty_cols HOT 2
- Data= NULL HOT 4
- Release comtradr 0.4.0 HOT 1
- check dates HOT 3
- pkgcheck results - api-update HOT 2
- pkgcheck results - main HOT 13
- Future Development Goals HOT 1
- Review - planned changes HOT 1
- pkgcheck results - dev HOT 20
- pkgcheck results - cache HOT 1
- SITC codes are not working properly HOT 1
- Release comtradr 1.0.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from comtradr.