Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pipeline-compact #338

Merged
merged 104 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from 102 commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
184e3d4
More test + calculate_covariate entry
Jan 23, 2024
b571796
stcv index-rsample compatibility function
Jan 24, 2024
e60e2ed
first move
Feb 16, 2024
3595a96
pipeline in progress (02192024)
sigmafelix Feb 20, 2024
70e19e5
pipeline update (continued)
Feb 21, 2024
76e31ea
pipeline update
sigmafelix Feb 21, 2024
6d82528
pipeline update
Feb 21, 2024
62ac2ec
pipeline external
Feb 21, 2024
4c68e5d
pipeline flowchart
Feb 22, 2024
9e245b1
static state of sites
Feb 27, 2024
f7e313c
pipeline dev
Mar 15, 2024
64601f9
pytorch to rtorch
sigmafelix Mar 18, 2024
4a9d117
code porting update
Mar 18, 2024
b4612b2
translation in progress
Mar 18, 2024
8ce3cec
stcnet dev
sigmafelix Mar 19, 2024
7210ad6
torch experiments
Mar 19, 2024
0f33a15
CUDA issue + figuring out data-tensor connection
Mar 20, 2024
a010323
pipeline code reorganization for dev
Mar 21, 2024
0fe9bf0
pipeline dev
Mar 22, 2024
3401c42
pipeline dev continued
Mar 22, 2024
300982a
lint + target update
Mar 25, 2024
b3853ff
transfer bulk geos processing function to pipeline base
Mar 25, 2024
40a8c46
pipeline in progress
Mar 25, 2024
15a1289
pipeline in progress
Mar 26, 2024
c93d2bd
pipeline dev: calc_geos refactoring
Mar 26, 2024
79e9b06
pipeline dev
Mar 28, 2024
f04eb09
pipeline dev
Mar 29, 2024
3719ad6
pipeline dev update
Mar 29, 2024
4c14594
pipeline on HPC
Mar 29, 2024
bb94005
Pipeline on SLURM
Mar 30, 2024
501ed94
pipeline update
Mar 30, 2024
5629675
Merge remote-tracking branch 'origin/main' into tidying-dependency
Apr 1, 2024
4f35646
Fixed conflicts with up-to-date main
Apr 1, 2024
45e21d4
Restructuring
Apr 1, 2024
d0a8c30
pipeline naming convention
Apr 1, 2024
9c052f1
renaming + config response test
Apr 1, 2024
5e34054
renaming, running example
Apr 2, 2024
b5d8c9b
pipeline dependency fix
Apr 2, 2024
31e2668
1-year test run + yaml update
Apr 2, 2024
ea19804
README update
Apr 2, 2024
371513a
Drop deprecated codebase
Apr 2, 2024
5425300
cleaning + drop quarto
Apr 2, 2024
eb5ea10
PR error fix
Apr 2, 2024
c804be4
PR error fix (2)
Apr 2, 2024
a9851cd
PR error fix (3)
Apr 2, 2024
d7c904a
PR error fix (4)
Apr 2, 2024
833b872
reducing configuration file
Apr 3, 2024
bfcfc70
in progress
Apr 5, 2024
0b4bdac
pipeline simplification (dev)
Apr 24, 2024
c91bfd7
compact pipeline in progress
Apr 25, 2024
ec30185
compact pipeline dev
Apr 25, 2024
3bbd5ab
pipeline update
Apr 26, 2024
a54f542
pipeline dev update
Apr 26, 2024
7903ce7
compact pipeline dev
May 1, 2024
73dca39
Compact pipeline -- calculation
May 3, 2024
2a65d35
1-year example (re)
May 3, 2024
d3b5c47
rerun
May 6, 2024
b649291
Bug fix in progress
May 8, 2024
da837a5
NARR processing function revision + a
May 8, 2024
0c1d957
in progress
May 13, 2024
dd98fe6
2022 in progress
May 15, 2024
183892b
Minor edit
May 20, 2024
98985ed
Calculation part update
May 21, 2024
95416c6
Experiments
May 29, 2024
cc5a12d
local run
May 30, 2024
4180ce4
pipeline update (SLURM)
May 31, 2024
f5d8dd7
imputation function + test
Jun 3, 2024
6f44db9
imputation function fix
Jun 3, 2024
cc49adc
imputation function update
Jun 6, 2024
228d187
revert lag & zero exclusion
Jun 7, 2024
d999caf
minor update
Jun 10, 2024
05dee61
imputation function fix
Jun 10, 2024
9885db5
update base learners
Jun 10, 2024
5e4f655
elastic net base learner
Jun 10, 2024
e58d35a
base learner roxygen2
Jun 10, 2024
ff25ab8
documentation edit
Jun 11, 2024
f1cf602
code cleaning
Jun 11, 2024
28d3399
DESCRIPTION
Jun 11, 2024
e0e316a
Merge branch 'main' into pipeline-compact
Jun 11, 2024
ada6b98
DESCRIPTION file
Jun 11, 2024
d16adf6
typo in DESCRIPTION + a
Jun 12, 2024
932f087
roxygen2 doc edit + description
Jun 12, 2024
0d54c96
yaml adjustment
Jun 12, 2024
b41757d
typo fix
Jun 12, 2024
368178e
edited description
Jun 12, 2024
0b96365
namespace reexport + .Rbuildignore
Jun 12, 2024
95de0bc
check dependency
Jun 12, 2024
862604d
Documentation update
Jun 12, 2024
e96735a
DESCRIPTION reorganized
Jun 12, 2024
06e20f8
example fix
Jun 12, 2024
b117bda
base learner + cv
Jun 13, 2024
a994322
CV index generation function patch and vis
Jun 13, 2024
d0fa822
a
Jun 13, 2024
37b9e22
pkgdown config fix + a
Jun 13, 2024
1152611
doc
Jun 13, 2024
a246ff9
doc fix (2)
Jun 13, 2024
96c002e
nocov + yml typo fix
Jun 13, 2024
474867d
no example run
Jun 13, 2024
1d4c180
yaml modified
Jun 13, 2024
12398e1
All examples will not run
Jun 13, 2024
aa96037
lint
Jun 13, 2024
526eaa1
base learner documentation
Jun 13, 2024
5fc04e3
relocate legacy targets directory
Jun 13, 2024
ad42e43
clean path + ./input
Jun 13, 2024
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
14 changes: 13 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
^vignettes/
^tests/
^input/
^tools/
^manuscript/
Expand All @@ -12,4 +13,15 @@
^_pkgdown\.yml$
^docs$
^pkgdown$
^.lintr
^.lintr
input/*
inst/targets-wide
^.future/
^_targets/
\.out$
\.err$
\.sif$
\.log$
\.vscode
\.qmd$
\.sh$
9 changes: 8 additions & 1 deletion .github/workflows/check-standard.yaml
sigmafelix marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
extra-packages: any::rcmdcheck, any::remotes, any::units, any::rmarkdown
needs: check

- name: install remote packages
run: |
Rscript -e 'remotes::install_github(sprintf("NIEHS/%s", c("amadeus", "chopin")), upgrade = FALSE)'
shell: bash

- uses: r-lib/actions/check-r-package@v2
with:
error-on: '"error"'
11 changes: 8 additions & 3 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,16 @@ jobs:

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
extra-packages: any::covr, any::remotes
needs: coverage

- name: install remote packages
run: |
Rscript -e 'remotes::install_github(sprintf("NIEHS/%s", c("amadeus", "chopin")), upgrade = FALSE)'
shell: bash

- name: Cache C++ and R dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
~/.cache/R
Expand Down Expand Up @@ -90,7 +95,7 @@ jobs:
run: |
npm i -g badgen-cli
export COV=${{ steps.get-values.outputs.coverage }}
COLOR=$(node -p '+process.env.COV >= 95 ? `green` : `orange`')
COLOR=$(node -p '+process.env.COV >= 95 ? `green` : `yellow`')
mkdir -p badges
badgen -j coverage -s $COV% -c $COLOR > badges/coverage.svg

Expand Down
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,5 +88,17 @@ tools/shiny_explore_pm/missingness_exploration_pm_quarto_shiny_data/

# raw data
input

# pipeline
_targets

# future batchtools outputs
.future
_targets
slurm_error.log

# SLURM messages and logs
**/*.err
**/*.out

# Apptainer images
**/*.sif
4 changes: 3 additions & 1 deletion .lintr
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,7 @@ linters: linters_with_defaults(
commented_code_linter = NULL
)
exclusions: list(
"tests/testthat/test-download_functions.R"
"tests/testthat/test-download_functions.R",
"inst",
"_targets.R"
)
59 changes: 54 additions & 5 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: beethoven
Title: Building an Extensible, rEproducible, Test-driven, Harmonized, Open-source, Versioned, ENsemble model for air quality
Version: 0.1.1
Version: 0.3.0
Authors@R: c(
person("Kyle", "Messier", , "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-9508-9623")),
person("Insang", "Song", role = c("aut", "ctb"), comment = c(ORCID = "0000-0001-8732-3256")),
Expand All @@ -15,14 +15,63 @@ Authors@R: c(
)
Description: Near Real Time air pollution model results and code produced by the SET group. It is fully tested, versioned, and open source and open access.
Depends: R (>= 4.1.0)
Imports: dplyr, sf, stats, terra, methods, BART, data.table, httr, rvest, spData, exactextractr, utils, stringr, testthat (>= 3.0.0), doParallel, parallelly, stars, foreach, future, ranger, xgboost, torch
Suggests: covr, withr, knitr, rmarkdown, sftime, lwgeom, FNN, ggplot2, scatterpie, doRNG
Imports:
dplyr,
sf,
stats,
terra,
methods,
BART,
data.table,
future,
targets,
tune (>= 1.2.1),
rlang,
rsample,
tidyr,
tidyselect,
yardstick,
workflows,
recipes,
missRanger,
parsnip,
future.apply,
future.batchtools,
anticlust,
qs,
stringi,
collapse,
tigris,
graphics
Suggests:
testthat (>= 3.0.0),
covr,
withr,
tarchetypes,
tidymodels,
xgboost,
torch,
brulee,
glmnet,
knitr,
rmarkdown,
stars,
sftime,
lwgeom,
FNN,
ggplot2,
doRNG,
DT,
scatterplot3d,
furrr,
quarto
Remotes: NIEHS/amadeus, NIEHS/chopin
Encoding: UTF-8
VignetteBuilder: knitr, rmarkdown
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.1
Config/Needs/website: tidyverse/tidytemplate
Config/testhat/edition: 3
License: MIT + file LICENSE
URL: https://github.com/Spatiotemporal-Exposures-and-Toxicology/beethoven,
https: //spatiotemporal-exposures-and-toxicology.github.io/beethoven/
URL: https://github.com/NIEHS/beethoven,
https: //NIEHS.github.io/beethoven/
172 changes: 96 additions & 76 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,94 +1,114 @@
# Generated by roxygen2: do not edit by hand

export(build_pipeline)
export(calc_covariates)
export(calc_ecoregion)
export(calc_koppen_geiger)
export(calc_modis)
export(calc_nei)
export(calc_nlcd_ratio)
export(calc_temporal_dummies)
export(calc_tri)
export(check_crs_is_valid)
export(check_data_completeness)
export(check_input_raster_in_extent)
export(check_means_are_valid)
export(check_output_locs_are_valid)
export(check_variances_are_valid)
export(convert_stdt)
export(convert_stdt_sftime)
export(convert_stdt_spatrastdataset)
export(convert_stdt_spatvect)
export(convert_stobj_to_stdt)
export(generic_base_learner)
export(generic_meta_learner)
export(is_stdt)
export("%tin%")
export(add_time_col)
export(append_predecessors)
export(attach_xy)
export(calc_geos_strict)
export(calc_gmted_direct)
export(calc_narr2)
export(calculate)
export(convert_cv_index_rset)
export(df_params)
export(divisor)
export(fit_base_brulee)
export(fit_base_elnet)
export(fit_base_xgb)
export(generate_cv_index)
export(impute_all)
export(inject_calculate)
export(inject_geos)
export(inject_gmted)
export(inject_modis_par)
export(load_modis_files)
export(loadargs)
export(meta_learner_fit)
export(meta_learner_predict)
export(modis_aggregate_sds)
export(modis_get_vrt)
export(modis_mosaic_mod06)
export(modis_prefilter_sds)
export(modis_preprocess_vnp46)
export(modis_warp_stars)
export(modis_worker)
export(par_narr)
export(post_calc_autojoin)
export(post_calc_convert_time)
export(post_calc_df_year_expand)
export(post_calc_drop_cols)
export(post_calc_merge_all)
export(post_calc_merge_features)
export(post_calc_unify_timecols)
export(post_calc_year_expand)
export(process_counties)
export(process_geos_bulk)
export(process_narr2)
export(read_locs)
export(read_paths)
export(reduce_merge)
export(search_function)
export(set_slurm_resource)
export(vis_rset)
import(BART)
import(spData)
importClassesFrom(terra,SpatRaster)
importClassesFrom(terra,SpatRasterDataset)
importClassesFrom(terra,SpatVector)
importFrom(anticlust,balanced_clustering)
importFrom(collapse,fnth)
importFrom(collapse,fvar)
importFrom(collapse,join)
importFrom(collapse,replace_inf)
importFrom(collapse,replace_na)
importFrom(collapse,set_collapse)
importFrom(data.table,.SD)
importFrom(data.table,`:=`)
importFrom(data.table,as.data.table)
importFrom(data.table,fread)
importFrom(data.table,melt)
importFrom(data.table,copy)
importFrom(data.table,merge.data.table)
importFrom(data.table,month)
importFrom(data.table,rbindlist)
importFrom(data.table,year)
importFrom(doParallel,registerDoParallel)
importFrom(data.table,setDTthreads)
importFrom(data.table,setnafill)
importFrom(dplyr,`%>%`)
importFrom(dplyr,across)
importFrom(dplyr,all_of)
importFrom(dplyr,as_tibble)
importFrom(dplyr,bind_rows)
importFrom(dplyr,left_join)
importFrom(exactextractr,exact_extract)
importFrom(foreach,"%dopar%")
importFrom(foreach,foreach)
importFrom(future,cluster)
importFrom(dplyr,group_by)
importFrom(dplyr,summarize)
importFrom(dplyr,ungroup)
importFrom(future,multicore)
importFrom(future,multisession)
importFrom(future,plan)
importFrom(future,sequential)
importFrom(future,tweak)
importFrom(future.apply,future_lapply)
importFrom(future.batchtools,batchtools_slurm)
importFrom(methods,is)
importFrom(parallelly,availableWorkers)
importFrom(missRanger,missRanger)
importFrom(parsnip,boost_tree)
importFrom(parsnip,linear_reg)
importFrom(parsnip,mlp)
importFrom(parsnip,set_engine)
importFrom(parsnip,set_mode)
importFrom(qs,qread)
importFrom(qs,qsave)
importFrom(recipes,recipe)
importFrom(recipes,update_role)
importFrom(rlang,as_name)
importFrom(rlang,inject)
importFrom(rlang,sym)
importFrom(rsample,make_splits)
importFrom(rsample,manual_rset)
importFrom(rsample,vfold_cv)
importFrom(sf,st_as_sf)
importFrom(sf,st_as_sfc)
importFrom(sf,st_bbox)
importFrom(sf,st_buffer)
importFrom(sf,st_coordinates)
importFrom(sf,st_covered_by)
importFrom(sf,st_crs)
importFrom(sf,st_drop_geometry)
importFrom(sf,st_geometry)
importFrom(sf,st_sf)
importFrom(sf,st_transform)
importFrom(sf,st_union)
importFrom(sf,st_within)
importFrom(stars,read_stars)
importFrom(stars,st_warp)
importFrom(stats,predict)
importFrom(stats,reshape)
importFrom(terra,buffer)
importFrom(terra,coltab)
importFrom(terra,crop)
importFrom(stats,sd)
importFrom(stats,setNames)
importFrom(stringi,stri_replace_all_regex)
importFrom(targets,tar_resources)
importFrom(targets,tar_resources_future)
importFrom(terra,crs)
importFrom(terra,describe)
importFrom(terra,ext)
importFrom(terra,extract)
importFrom(terra,intersect)
importFrom(terra,merge)
importFrom(terra,mosaic)
importFrom(terra,nlyr)
importFrom(terra,project)
importFrom(terra,rast)
importFrom(terra,same.crs)
importFrom(terra,sds)
importFrom(terra,snap)
importFrom(terra,tapp)
importFrom(terra,vect)
importFrom(utils,data)
importFrom(utils,read.csv)
importFrom(terra,subset)
importFrom(terra,time)
importFrom(terra,varnames)
importFrom(tidyselect,all_of)
importFrom(tigris,counties)
importFrom(tune,tune_grid)
importFrom(workflows,add_model)
importFrom(workflows,add_recipe)
importFrom(workflows,workflow)
importFrom(yardstick,metric_set)
importFrom(yardstick,rmse)
Loading
Loading