Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# development settings
CONFIGURATION_FILE=./app-configuration.json
PRINT_CONFIGURATION=yes
SOURCE_FILE=./data/raw/input4.rds
SOURCE_FILE=./data/Ya_Ha_Tinda_Elk_for_troubleshooting___Interactive_Map_leaflet___2024-05-03_11-03-51.rds
OUTPUT_FILE=./data/output/output.rds
ERROR_FILE=./data/output/error.log
APP_ARTIFACTS_DIR=./data/output/
Expand Down
12 changes: 3 additions & 9 deletions RFunction.R
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,9 @@ rFunction <- function(data, threshold = NULL, window = 72, yaxs_limit = 1000) {
dat_updt <- list()
dat_fin_output <- list()

app_artifacts_base_path <- Sys.getenv(x = "APP_ARTIFACTS_DIR", "/tmp/")
#app_artifacts_base_path <- Sys.getenv(x = "APP_ARTIFACTS_DIR", "/tmp/")

pdf(paste0(
app_artifacts_base_path,
paste("Parturition_vel", window, ".pdf")
), width = 8, height = 12)
pdf(appArtifactPath(paste0("Parturition_vel", window, ".pdf")), width = 8, height = 12)

par(mfrow = c(4, 3), mar = c(4, 4, 3, 1))

Expand Down Expand Up @@ -237,10 +234,7 @@ rFunction <- function(data, threshold = NULL, window = 72, yaxs_limit = 1000) {
drop_na(start_date)

# write app artefact
write.csv(dat_final_output, file = paste0(
app_artifacts_base_path,
paste("Parturition_output", window, ".csv")
))
write.csv(dat_final_output, appArtifactPath(paste0("Parturition_output", window, ".csv")))

# convert the data.frame output into move2 object
dat_final <- left_join(
Expand Down
5 changes: 4 additions & 1 deletion app-configuration.json
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
{}
{
"threshold": 100,
"window": 96
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This file content was provided by the app developer.
Binary file added data/raw/input1_move2loc_LatLon.rds
Binary file not shown.
Binary file added data/raw/input1_move2loc_Mollweide.rds
Binary file not shown.
Binary file added data/raw/input1_telemetrylist_aeqd.rds
Binary file not shown.
Binary file added data/raw/input2_move2loc_LatLon.rds
Binary file not shown.
Binary file added data/raw/input2_move2loc_Mollweide.rds
Binary file not shown.
Binary file added data/raw/input2_telemetrylist_aeqd.rds
Binary file not shown.
Binary file added data/raw/input3_move2loc_LatLon.rds
Binary file not shown.
Binary file added data/raw/input3_move2loc_Mollweide.rds
Binary file not shown.
Binary file added data/raw/input4_move2loc_LatLon.rds
Binary file not shown.
Binary file added data/raw/input4_move2loc_Mollweide.rds
Binary file not shown.