Skip to content

Commit

Permalink
adjust max response limit to 100k, was erroneously 250k
Browse files Browse the repository at this point in the history
  • Loading branch information
datapumpernickel committed Nov 17, 2023
1 parent e281508 commit 039ab08
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/ct_process_response.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ ct_process_response <- function(resp, verbose = FALSE, tidy_cols) {


if (length(result$data) > 0) {
if(nrow(result$data)==250000){
cli::cli_warn(c("x" ='Your request returns exactly 250k rows. This means that most likely not all the data you queried has been returned, as the upper limit is 250k. Please partition your API call, e.g. by using only half the period in the first call.')) # nolint
} else if(nrow(result$data)>200000){
cli::cli_inform(c("i" = "Your request has passed 200k rows. If you exceed 250k rows Comtrade will not return all data. You will have to slice your request in smaller parts.")) # nolint
if(nrow(result$data)==100000){
cli::cli_warn(c("x" ='Your request returns exactly 100k rows. This means that most likely not all the data you queried has been returned, as the upper limit without subscription is 100k. Please partition your API call, e.g. by using only half the period in the first call.')) # nolint
} else if(nrow(result$data)>90000){
cli::cli_inform(c("i" = "Your request has passed 90k rows. If you exceed 100k rows Comtrade will not return all data. You will have to slice your request in smaller parts.")) # nolint
}

processed <- result$data
Expand Down

0 comments on commit 039ab08

Please sign in to comment.