forked from r-in-grenoble/r-in-grenoble.github.io
-
Notifications
You must be signed in to change notification settings - Fork 4
/
DownloadStuff.R
63 lines (56 loc) · 3.08 KB
/
DownloadStuff.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#Vinettes
library("googledrive")
# https://googledrive.tidyverse.org/
# https://docs.google.com/spreadsheets/d/1NkG331BZW_Q9PuzdhEgW5rB6vkLe0K_Dd1K3iFrAFNw/edit?usp=sharing
drive_deauth()
drive_auth()
drive_download("R Workshop Video Links", type = "csv", overwrite = TRUE, path = "./R Workshop Video Links")
drive_download("R Workshop Detailed Schedule", type = "csv", overwrite = TRUE, path = "./R Workshop Detailed Schedule")
drive_download("R Workshop Discussion", type = "csv", overwrite = TRUE, path = "./R Workshop Discussion")
#### Download GitHub Icons
# library(imagefx)
library(webshot)
# library(OpenImageR)
members<-data.frame("Name" = c("Aaron Mamula", "Emily Markowitz", "Erin Steiner",
"Rob Ames", "Ben Fissel", "Geret Depiper",
"Allen Chen"),
"First Name" = c("Aaron", "Emily", "Erin", "Rob", "Ben", "Geret", "Allen"),
"Last Name" = c("Mamula", "Markowitz", "Steiner", "Ames", "Fissel", "Depiper", "Chen"),
"github" = c("aaronmams", "emilyhmarkowitz", "erinsteiner-NOAA",
"", "", "gdepiper",
"allen-chen-noaa-gov"),
"lat" = c(36.956806, 41.197558, 47.640816,
45.510209, 47.640816, 41.526796,
47.640816),
"lon" = c(-122.021390, -73.897447, -122.336197,
-122.669898, -122.3361978, -70.675144,
-122.336197),
"Institution" = c("Southwest Fisheries Science Center",
"Office of Science and Technology/Alaska Fisheries Science Center",
"Northwest Fisheries Science Center",
"Pacific States Marine Fisheries Commission",
"Alaska Fisheries Science Center",
"Northeast Fisheries Science Center",
"Northwest Fisheries Science Center"))
members$imagelink<-members$githublink<-NA
members$Status<-"Presenter"
for (i in 1:nrow(members)) {
# if (!(members$github[i] %in% "")) {
members$imagelink[i]<-paste0("./images/", gsub(pattern = " ", replacement = "",
x = members$Name[i]),
".png")
webshot(url = paste0("https://github.com/", members$github[i]),
file = members$imagelink[i],
cliprect = "viewport",
vwidth = 300, vheight = 350)
# } else {
# members$githublink[i]<-paste0("https://github.com/")
# members$imagelink[i]<-paste0("./docs/images/noaa_logo.gif")
# webshot(url = paste0("https://github.com/", members$github[i]),
# file = members$imagelink[i],
# cliprect = "viewport",
# vwidth = 300, vheight = 500)
# }
# my_repos <- gh("GET /users/emilyhmarkowitz/repos")
# vapply(my_repos, "[[", "", "name")
}