I am trying to access the following http directory of weather data using the RCurl package in R:
http://ncei.noaa.gov/data/global-summary-of-the-day/access/
within each directory for each year is a unique list of weather stations.
I can access any specific dataset like this
url = 'http://ncei.noaa.gov/data/global-summary-of-the-day/access/1932/03005099999.csv'
data = read.csv(url)
However, I can't automate this process without knowing what files are within each directory. I've tried using the RCurl package to get a list of all the files within, but always get errors:
url = 'http://ncei.noaa.gov/data/global-summary-of-the-day/access/'
getURL(url)
This gives me the following output saying the address has changed (to an https address)
[1] "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n<html><head>\n<title>301 Moved Permanently</title>\n</head><body>\n<h1>Moved Permanently</h1>\n<p>The document has moved <a href=\"https://ncei.noaa.gov/data/global-summary-of-the-day/access/\">here</a>.</p>\n</body></html>\n"
Changing the address to the https url indicated gives this error
url = 'https://ncei.noaa.gov/data/global-summary-of-the-day/access/'
getURL(url)
Error in function (type, msg, asError = TRUE) : error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
I tried replacing the https: with ftps: and ftp: Doing so gives me a time out error.
Any thoughts on getting the directory printed?