-
Notifications
You must be signed in to change notification settings - Fork 0
/
testing.R
38 lines (29 loc) · 1.07 KB
/
testing.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
json_output<- httr::GET(paste("https://pops-model.org/api/output/", 158, "/?format=json", sep = ""))
output <- httr::content(json_output)
post_code <- httr::POST(url = "https://pops-model.org/api/output/", body = output, encode = "json")
code <- httr::content(post_code)
output$run <- 1488
## run with management for parsing using SLF
case_study_id = "1"
bucket = "pops-production"
session_id = "1"
run_collection_id = "182"
run_id = "250"
## run with management for parsing using SLF PA
case_study_id = "4"
bucket = "pops-production"
session_id = "3"
run_collection_id = "221"
run_id = "296"
## run with management for parsing using WSR
case_study_id = "2"
session_id = "2"
run_collection_id = "220"
# run_id = "4"
run_id = "293"
modelapi(case_study_id, session_id, run_collection_id, run_id)
t <- config$infected_file
save_file = aws.s3::save_object(object = t, bucket = bucket, file = t, check_region = FALSE)
result = raster::stack(t)
save_object("s", object = t, bucket = 'pops-production')
s <- raster("H:/Shared drives/Data/Raster/Regional/SLF_100m/tree_of_heaven_100m.tif")