ropensci / comtradr
Showing 1 of 1 files from the diff.

@@ -335,8 +335,8 @@
Loading
335 335
    "&p=", partners,
336 336
    "&rg=", trade_direction,
337 337
    "&cc=", commod_codes,
338 -
    "&fmt=", "json",
339 -
    "&head=", "H"
338 +
    "&head=", "H",
339 +
    "&fmt=", "json"
340 340
  )
341 341
342 342
  ## If token within global options is not NULL, append the token str to the
@@ -391,8 +391,9 @@
Loading
391 391
  if (httr::http_type(res) != "application/json") {
392 392
    stop(
393 393
      sprintf(
394 -
        "API did not return json. Instead, %s data was returned",
395 -
        httr::http_type(res)
394 +
        "API did not return json. Instead, %s data was returned. Return data:\n%s",
395 +
        httr::http_type(res),
396 +
        httr::content(res, "text", encoding = "UTF-8")
396 397
      ), call. = FALSE
397 398
    )
398 399
  }
@@ -547,7 +548,7 @@
Loading
547 548
#'
548 549
#' @noRd
549 550
codes_as_ints <- function(char_vect) {
550 -
  if (any(tolower(char_vect) %in% c("all", "total"))) {
551 +
  if (any(tolower(char_vect) %in% c("all", "total", "ag1", "ag2", "ag3", "ag4", "ag5"))) {
551 552
    return(TRUE)
552 553
  }
553 554
  as_ints <- suppressWarnings(as.integer(char_vect))
Files Coverage
R 77.33%
Project Totals (9 files) 77.33%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading