diff --git a/.env b/.env index d1cc3a0..6c6f248 100644 --- a/.env +++ b/.env @@ -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/ diff --git a/RFunction.R b/RFunction.R index f401ed9..89c4233 100644 --- a/RFunction.R +++ b/RFunction.R @@ -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)) @@ -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( diff --git a/app-configuration.json b/app-configuration.json index 9e26dfe..f80ae78 100644 --- a/app-configuration.json +++ b/app-configuration.json @@ -1 +1,4 @@ -{} \ No newline at end of file +{ + "threshold": 100, + "window": 96 +} \ No newline at end of file diff --git a/data/Ya_Ha_Tinda_Elk_for_troubleshooting___Interactive_Map_leaflet___2024-05-03_11-03-51.rds b/data/Ya_Ha_Tinda_Elk_for_troubleshooting___Interactive_Map_leaflet___2024-05-03_11-03-51.rds new file mode 100644 index 0000000..9fd701b Binary files /dev/null and b/data/Ya_Ha_Tinda_Elk_for_troubleshooting___Interactive_Map_leaflet___2024-05-03_11-03-51.rds differ diff --git a/data/auxiliary/user-files/provided-app-files/auxiliary-file-a/sample.txt b/data/auxiliary/user-files/provided-app-files/auxiliary-file-a/sample.txt new file mode 100644 index 0000000..9cdfc0d --- /dev/null +++ b/data/auxiliary/user-files/provided-app-files/auxiliary-file-a/sample.txt @@ -0,0 +1 @@ +This file content was provided by the app developer. \ No newline at end of file diff --git a/data/raw/input1_move2loc_LatLon.rds b/data/raw/input1_move2loc_LatLon.rds new file mode 100644 index 0000000..8f52791 Binary files /dev/null and b/data/raw/input1_move2loc_LatLon.rds differ diff --git a/data/raw/input1_move2loc_Mollweide.rds b/data/raw/input1_move2loc_Mollweide.rds new file mode 100644 index 0000000..3312cea Binary files /dev/null and b/data/raw/input1_move2loc_Mollweide.rds differ diff --git a/data/raw/input1_telemetrylist_aeqd.rds b/data/raw/input1_telemetrylist_aeqd.rds new file mode 100644 index 0000000..ea3aaba Binary files /dev/null and b/data/raw/input1_telemetrylist_aeqd.rds differ diff --git a/data/raw/input2_move2loc_LatLon.rds b/data/raw/input2_move2loc_LatLon.rds new file mode 100644 index 0000000..428cec9 Binary files /dev/null and b/data/raw/input2_move2loc_LatLon.rds differ diff --git a/data/raw/input2_move2loc_Mollweide.rds b/data/raw/input2_move2loc_Mollweide.rds new file mode 100644 index 0000000..57398eb Binary files /dev/null and b/data/raw/input2_move2loc_Mollweide.rds differ diff --git a/data/raw/input2_telemetrylist_aeqd.rds b/data/raw/input2_telemetrylist_aeqd.rds new file mode 100644 index 0000000..443067d Binary files /dev/null and b/data/raw/input2_telemetrylist_aeqd.rds differ diff --git a/data/raw/input3_move2loc_LatLon.rds b/data/raw/input3_move2loc_LatLon.rds new file mode 100644 index 0000000..a77ceae Binary files /dev/null and b/data/raw/input3_move2loc_LatLon.rds differ diff --git a/data/raw/input3_move2loc_Mollweide.rds b/data/raw/input3_move2loc_Mollweide.rds new file mode 100644 index 0000000..8e0e52f Binary files /dev/null and b/data/raw/input3_move2loc_Mollweide.rds differ diff --git a/data/raw/input4_move2loc_LatLon.rds b/data/raw/input4_move2loc_LatLon.rds new file mode 100644 index 0000000..8d7825b Binary files /dev/null and b/data/raw/input4_move2loc_LatLon.rds differ diff --git a/data/raw/input4_move2loc_Mollweide.rds b/data/raw/input4_move2loc_Mollweide.rds new file mode 100644 index 0000000..0fc0fac Binary files /dev/null and b/data/raw/input4_move2loc_Mollweide.rds differ