0

I'm trying to download all the zipped csv file from the following pg: http://mis.ercot.com/misapp/GetReports.do?reportTypeId=12301&reportTitle=Settlement%20Point%20Prices%20at%20Resource%20Nodes,%20Hubs%20and%20Load%20Zones&showHTMLView=&mimicKey

I've started by trying to download one file as an example before I move on to downloading multiple. This site contains prices from specific locations in Texas - interesting, given recent power outages due to cold weather in Texas.

url <- "http://mis.ercot.com/misapp/GetReports.do?reportTypeId=12301&reportTitle=Settlement%20Point%20Prices%20at%20Resource%20Nodes,%20Hubs%20and%20Load%20Zones&showHTMLView=&mimicKey/cdr.00012301.0000000000000000.20210220.141704636.SPPHLZNP6905_20210220_1415_csv.zip"
temp <- tempfile()
download.file(url,temp, mode = "wb")
data <- read.csv(unzip(temp, "cdr.00012301.0000000000000000.20210220.141704.SPPHLZNP6905_20210220_1415.csv"))
unlink(temp)

Keep receiving the following error message: "error 1 in extracting from zip file."

I'm relatively new to R, so any advice would be helpful.

Edit: If the link above doesn't work, another way to get to the link is following this: http://www.ercot.com/mktinfo/rtm and going to "Real-Time Price Reports" and selecting the last option "Settlement Point Prices at Resource Nodes, Hubs, and Load Zones." Might look a little overwhelming, but my goal for right now is just to download and open the first zipped csv file on there (and ignore all the other files on there)

ssss
  • 1
  • 1
  • does the link work for you outside R ? (it doesn't for me) – user20650 Feb 20 '21 at 21:53
  • That's odd- another way to get to the link is following this: http://www.ercot.com/mktinfo/rtm and going to "Real-Time Price Reports" and selecting the last option "Settlement Point Prices at Resource Nodes, Hubs, and Load Zones" Should take you to a pg with a host of zip files, and I'm trying to extract just one for now – ssss Feb 20 '21 at 22:00
  • Hi and welcome. Maybe [this question](https://stackoverflow.com/questions/37221184/r-function-unzip-error-1-in-extracting-from-zip-file) might provide an answer. – fr3d-5 Feb 20 '21 at 22:01
  • your link gives me "access denied" -- perhaps some country specific blocking ; i'm in th uk – user20650 Feb 20 '21 at 22:01
  • Might be - I'm located in the U.S. Took a look at unz vs unzip and tried them both to no avail. Made sure the directories/temp files matched as well :) – ssss Feb 20 '21 at 22:50

0 Answers0