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

Add comm_code option AG6 as available for HS classification. #30

Merged
merged 3 commits into from
Jul 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ Authors@R: c(person("Chris", "Muir",
role = "rev",
comment = c(ORCID = "0000-0002-3092-3493",
"Rafael reviewed the package for rOpenSci,
see https://github.com/ropensci/onboarding/issues/141")))
see https://github.com/ropensci/onboarding/issues/141")),
person("Juergen", "Amann", role=c("ctb")))
Description: Interface with and extract data from the United Nations Comtrade
API <https://comtrade.un.org/data/>. Comtrade provides country level shipping
data for a variety of commodities, these functions allow for easy API query
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
comtradr 0.2.2.09000
====================

## NEW FEATURES

* Modifications to `ct_search()` to add support for commodity code `ag6` ([#30](https://github.com/ropensci/comtradr/pull/30))

## BUG FIXES

* Passing an API token string to `ct_register_token()` now properly bumps the hourly rate limit up to 10,000
Expand Down
2 changes: 1 addition & 1 deletion R/ct_search.R
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ is_year_month <- function(x) {
#'
#' @noRd
codes_as_ints <- function(char_vect) {
if (any(tolower(char_vect) %in% c("all", "total", "ag1", "ag2", "ag3", "ag4", "ag5"))) {
if (any(tolower(char_vect) %in% c("all", "total", "ag1", "ag2", "ag3", "ag4", "ag5", "ag6"))) {
return(TRUE)
}
as_ints <- suppressWarnings(as.integer(char_vect))
Expand Down