1

I'm trying to download a csv file from the Our World in Data website. There are several charts at the end of the post, and each has a "Data" tab that reveals a download link.

enter image description here

When you click the csv downloads directly. The link to the "relative-share-of-deaths-in-usa.csv" button is "https://ourworldindata.org/e9df3be1-29e0-4366-bc14-554bb4ba8be1", but when I use this in RCurl, it downloads an html file. How can I pull into R from the site?

library (RCurl)
download <- getURL("https://ourworldindata.org/e9df3be1-29e0-4366-bc14-554bb4ba8be1")
data <- read.csv(textConnection(download))
Eric Green
  • 7,385
  • 11
  • 56
  • 102
  • 1
    This site generate address like blob:https://ourworldindata.org/6c98db5b-d9ec-48cc-ac45-d25661bec6eb please look here https://stackoverflow.com/questions/14952052/convert-blob-url-to-normal-url Looks like its impossible to find right download URL to be used in R. – Yuriy Barvinchenko Jun 14 '19 at 07:40
  • Interesting. OK, thanks @YuriyBarvinchenko. – Eric Green Jun 14 '19 at 07:42

0 Answers0