ropensci / tradestatistics

R package to access Open Trade Statistics API
https://docs.ropensci.org/tradestatistics
Apache License 2.0
76 stars 14 forks source link

Every API call ends with 502 Bad Gateway error #78

Closed jakubrybacki closed 1 month ago

jakubrybacki commented 1 month ago

I have used examples for 'tradestatistics::ots_create_tidy_data'

Package tradestatistics version 5.0.0

pachadotdev commented 1 month ago

thanks @jakubrybacki

let me restart the server and I'll come back

pachadotdev commented 1 month ago

hi @jakubrybacki I managed to solve it! Sorry the problem, it was a conflict with an updated dependency on the web stack. Now it's all good.

pachadotdev commented 1 month ago

@jakubrybacki

here is a local test

> library(tradestatistics)
> yrp <- ots_create_tidy_data(
  years = 2018:2019,
  reporters = c("chl", "per"),
  partners = "arg",
  table = "yrp"
)
Downloading data for the combination 2018, chl, arg...
Downloading data for the combination 2019, chl, arg...
Downloading data for the combination 2018, per, arg...
Downloading data for the combination 2019, per, arg...
> yrp
Key: <partner_iso>
    year reporter_iso reporter_name partner_iso partner_name
   <int>       <char>        <char>      <char>       <char>
1:  2018          chl         Chile         arg    Argentina
2:  2019          chl         Chile         arg    Argentina
3:  2018          per          Peru         arg    Argentina
4:  2019          per          Peru         arg    Argentina
   trade_value_usd_imp trade_value_usd_exp
                 <int>               <int>
1:          1763201176           521799019
2:          1056322635           371381766
3:           123959153           108790873
4:           648984705            81927499

plz let me know if it works for you

jakubrybacki commented 1 month ago

Works well now.