'nomis_data_info' function times out
Opened this issue · 8 comments
Hi I am getting the following error when trying to use nomisr at work (Birmingham City Council)
datasets <- nomis_data_info()
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached: Connection timed out after 10000 milliseconds
My code works OK at home on my own MacBook.
Our outsourced ICT help is of little use (they dont know anything about R, and are unwilling to find out) so I was hoping you may have a clue as to how I can get this fixed?
cheers
Ralph
What's the result of sessionInfo()
?
It might be an issue with your internet, is there any throttling or firewalls or things like that? If you're on wifi, try running from a ethernet cable if that's available.
Do other 'nomisr' functions work?
What's the result of httr::GET("https://www.nomisweb.co.uk/api/v01/dataset/def.sdmx.json")
?
It should look something like:
httr::GET("https://www.nomisweb.co.uk/api/v01/dataset/def.sdmx.json")
Response [https://www.nomisweb.co.uk/api/v01/dataset/def.sdmx.json]
Date: 2019-01-14 12:32
Status: 200
Content-Type: application/json; charset=utf-8
Size: 4.49 MB
{
"structure" :{
"header" :{
"id" :"none",
"prepared" :"2019-01-14T12:31:48Z",
"sender" :{
"contact" :{
"email" :"support@nomisweb.co.uk",
"name" :"Nomis",
"telephone" :"+441913342680",
...
Do other data API packages work in R?
Try:
req <- curl_fetch_memory("https://www.birmingham.gov.uk/info/20018/adult_social_care")
str(req)
If this errors, then the issue is with curl. I am not very familiar with Windows 7, but I don't believe that it comes with curl built in. You may need to install curl from here: https://curl.haxx.se/windows/
Ok, let me know if they find a solution, I'm glad to hear that it's otherwise useful for you.
@ralphlsmith As it does not work at inside your company network but work at home, I suspect it comes from proxy you may be behing. Do you know about a proxy ? Can you ask IT for that ?
You can try this to find if there is a proxy
curl::ie_get_proxy_for_url()
If you have one, you need to get the url and credentials to pass through.
You then need to configure it using httr::use_proxy()
in a httr::set_config
call.
I made a WIP 📦 to help that you may try and find useful. README has some info about proxy;