There is some problem getting data with the WDI package. It gets data from World Development Indicators and other databases of The World Bank. I let the code run for several minutes and nothing happens. Sometimes it gives a time out message. I ran the same code last year and it worked. Any idea what the problem is and how to fix it?> dat1EU = WDI(indicator = c('NY.ADJ.NNAT.GN.ZS', 'NY.GNS.ICTR.GN.ZS'), country = c('EU'), start=1977, end=2020)> dat1OED = WDI(indicator = c('NY.ADJ.NNAT.GN.ZS', 'NY.GNS.ICTR.GN.ZS'), country = c('OED'), start=1977, end=2020)Warning message:In open.connection(con, "rb") : URL 'https://api.worldbank.org/v2/en/country/OED/indicator/NY.ADJ.NNAT.GN.ZS?format=json&date=1977:2020&per_page=32500&page=1': Timeout of 60 seconds was reached The following command works and gives the correct output.> WDIsearch('savings')-- Anupam. [[alternative HTML version deleted]]
? Thu, 8 Aug 2024 12:43:23 +0530 Anupam Tyagi <anuptyagi at gmail.com> ?????:> In open.connection(con, "rb") : > URL > 'https://api.worldbank.org/v2/en/country/OED/indicator/NY.ADJ.NNAT.GN.ZS?format=json&date=1977:2020&per_page=32500&page=1': > Timeout of 60 seconds was reachedIf you try to open the link in the browser, does it work? How long does it take to download? Try increasing options(timeout=...) to a larger time (in seconds). I see there is Cloudflare sitting in front of the API, but it's relatively non-aggressive. I could only get it to deny my request by accessing it through Tor. -- Best regards, Ivan
Apparently Analagous Threads
- WDI package commands timing out and not working
- WDI package commands timing out and not working
- WDI package commands timing out and not working
- WDI package commands timing out and not working
- Two questions about metacharacter in regexprs and function return