This article describes how to load files from your Google Drive in ecocloud.
Access files from Google Drive
To access files that you have in Google Drive in ecocloud you first need to make sure that the folder or file(s) that you want to use is shared on Google Drive:
- Find the file/folder on Google Drive.
- Right click: Share, click Advanced in the pop-up box.
- Change who has access to: On - Anyone with the link (no sign-in required).
- Save.
In ecocloud:
- Go to the Google Drive tab in the left menu, and navigate to the file that you want to use.
- Right click, Copy Download Link.
- Use this link in the code below.
NB. Unfortunately, there is no functionality yet that enables you to save back to Google Drive, except for a Jupyter Notebook that you start in ecocloud. However, you can use the following code to load a file in your R environment (either in a Jupyter Notebook or in the RStudio server):
## Install packages install.packages("curl") library(curl) install.packages("raster") library(raster) library(maptools) ## Load csv file link <- sprintf("https://drive.google.com/a/griffith.edu.au/uc?id=1suFFD2IouR2M2pRnuXMxfCGNXTqIi01k&export=download") con <- curl(link) egernia <- read.csv(con) head(egernia) dim(egernia)
# Load geotiff files bc01 <- raster("https://drive.google.com/a/griffith.edu.au/uc?id=1sLBInJDyWQ2sFlEE7UeU555IGuTk_Lbc&export=download") plot(bc01)