How to read csv file from googledrive?

Hi all,
how can I read the CSV file stored in google drive?
This is my link for the data.

Thank you.!

The following worked for me, though I would not be surprised to find out there is a better way.
I right clicked on the file in my google drive and selected Get Link. In that dialog, I set the permission to let anyone with the link download the file. I then copied the displayed link which had the form

I then used the document ID, that long string of characters in the following code.

id <- "LongStringOfRandomCharacters"
DF <- read.csv(sprintf("", id))

I tried pulling out the ID from your link and the above did not work and I'm not sure why. I got the method that worked for me from here:

I did the same as you suggested.


this is not working in my system.
I'm not sure whether I have to make any changes..!!

Have you tried the googlesheets4 package? You will be asked to authenticate. Afterwards, you can read the CSV using read_sheet().

# once installed

# running read_sheet() will ask you to authenticate with Google first

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.