Skip to content

Commit 3837575

Browse files
committed
Switch to parquet evaluation file read and write
1 parent 2aa919e commit 3837575

File tree

6 files changed

+10
-3
lines changed

6 files changed

+10
-3
lines changed

NAMESPACE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,9 @@ export(write_rodents_profiles_tab_html)
189189
export(www_path)
190190
export(zip_unzip)
191191
importFrom(arrow,read_csv_arrow)
192+
importFrom(arrow,read_parquet)
192193
importFrom(arrow,write_csv_arrow)
194+
importFrom(arrow,write_parquet)
193195
importFrom(bslib,bs_theme)
194196
importFrom(coda,HPDinterval)
195197
importFrom(coda,as.mcmc)

R/data_input_output.R

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,10 @@ write_data <- function (x = NULL,
101101

102102
write_yaml(x, file = full_path)
103103

104+
} else if (file_ext(filename) == "parquet"){
105+
106+
write_parquet(x, file = full_path)
107+
104108
} else if (file_ext(filename) == "json"){
105109

106110
x2 <- serializeJSON(x = x)

R/evaluate.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ read_forecasts_evaluations <- function (main = "."){
351351

352352
} else {
353353

354-
out <- as.data.frame(read_csv_arrow(file = eval_path))
354+
out <- as.data.frame(read_parquet(file = eval_path))
355355

356356
if ("species" %in% colnames(out)) {
357357
out <- na_conformer(out)

R/portalcasting.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#' @importFrom arrow read_csv_arrow write_csv_arrow
1+
#' @importFrom arrow read_csv_arrow write_csv_arrow read_parquet write_parquet
22
#' @importFrom bslib bs_theme
33
#' @importFrom coda as.mcmc HPDinterval
44
#' @importFrom english english

R/zip_unzip_forecasts.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ zip_unzip <- function(type = NULL,
7979
}
8080

8181
# Zip forecasts_evaluations.csv
82-
eval_file <- paste0(proj_path, "/forecasts_evaluations.csv")
82+
eval_file <- paste0(proj_path, "/forecasts_evaluations.parquet")
8383
zipfile <- paste0(proj_path, "/forecasts_evaluations.zip")
8484
zip_files(zipfile, eval_file)
8585
}

portalcasting.Rproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ LaTeX: pdfLaTeX
1515
BuildType: Package
1616
PackageUseDevtools: Yes
1717
PackageInstallArgs: --no-multiarch --with-keep.source
18+
PackageRoxygenize: rd,collate,namespace

0 commit comments

Comments
 (0)