forked from cellular-tracking-technologies/data_tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi_run.R
More file actions
22 lines (17 loc) · 713 Bytes
/
Copy pathapi_run.R
File metadata and controls
22 lines (17 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
source("functions/api_postgres.R")
library(DBI)
start <- Sys.time()
####SETTINGS#####
my_token <- "your token here"
db_name <- "mydb"
myproject <- "CTT Project Name" #this is your project name on your CTT account
conn <- dbConnect(RPostgres::Postgres(), dbname=db_name)
################
get_my_data(my_token, "~/Documents/data/radio_projects/myproject" , conn, myproject) #the folder path is where you want your downloaded files to go
outpath <- "~/Documents/data/radio_projects/myproject"
update_db(conn, outpath, myproject)
dbDisconnect(conn)
#source("functions/filecatch.R")
#findfiles(outpath, "directory path where you want your caught files to go")
time_elapse <- Sys.time() - start
print(time_elapse)