Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
9610ee5
Beginning of bookdown refactor
rogilmore Feb 2, 2023
8d12867
Implement renv; implement targets; create new tags, and funders repor…
rogilmore Feb 3, 2023
6bc36e6
Progress toward refactored demographics report: New functions using v…
rogilmore Feb 4, 2023
79ea69a
More progress on demographics.
rogilmore Feb 6, 2023
508f7a0
More progress (struggling) toward robust demographics pipeline.
rogilmore Feb 7, 2023
88452ff
Finally! Robust create_complete_demog_df().
rogilmore Feb 8, 2023
156a8ac
Finish first working version of 06-demographics; render full set of r…
rogilmore Feb 8, 2023
8b1af37
Fix age_days calculations; add some simple visualizations to 06-demog…
rogilmore Feb 9, 2023
984066e
Fix figure captions for age_days histograms.
rogilmore Feb 9, 2023
3c8b682
1st effort at institutions report workflow.
rogilmore Feb 10, 2023
5983182
Initial work on 07-shared-volumes report.
rogilmore Feb 10, 2023
68f7c73
pull bookdown
ars17psu Feb 13, 2023
58c329b
Progress on institution-level data.
rogilmore Feb 13, 2023
1cbc621
Merge branch 'bookdown' of https://github.com/gilmore-lab/databrary-a…
rogilmore Feb 13, 2023
825f291
Remove participant-demographics/csv data from bookdown branch
rogilmore Feb 13, 2023
350740a
Further work on investigators and institutions.
rogilmore Feb 13, 2023
cb5d5d0
Add workflow.
rogilmore Feb 14, 2023
bf133fe
Clean-up of .Rmd files
rogilmore Feb 14, 2023
6ed0ac0
Copy archival weekly reports to bookdown
rogilmore Feb 15, 2023
722378d
Update targets and re-render.
rogilmore Feb 16, 2023
dd25e7f
Update analytics to show Karen and Beth.
rogilmore Feb 16, 2023
8352b39
New R/volume_asset_functions.R; workflow to calculate storage totals …
rogilmore Feb 20, 2023
dfc5217
Migrate to new pipe in .Rmd; fix ggmap rendering bug; minor formattin…
rogilmore Feb 24, 2023
51281ad
Performance improvements to institutions and investigators functions.
rogilmore Mar 3, 2023
21be4c0
Update data and rerender.
rogilmore Mar 15, 2023
377570b
Move to new Macbook and rerender.
rogilmore Mar 22, 2023
7e99344
Update README.
rogilmore Mar 22, 2023
9a2dcb4
Add test functions to assure reproducibility via cloned repo.
rogilmore Mar 30, 2023
ac7245d
Merge branch 'bookdown' of https://github.com/gilmore-lab/databrary-a…
rogilmore Mar 30, 2023
9ec5019
Update data & rerender.
rogilmore May 5, 2023
af6c42c
Delete _archival/; further test and fix starting_fresh functions.
rogilmore May 18, 2023
00e033f
ARS run first time - no render book
ars17psu May 18, 2023
a0e9efa
fix merge conflict
rogilmore May 18, 2023
896d496
Fix bugs; rerender.
rogilmore May 18, 2023
34751cb
Should have added to previous.
rogilmore May 18, 2023
d521973
Update README.md
ars17psu May 24, 2023
b97f4b8
Update before work with Andrea.
rogilmore Jun 1, 2023
86e4e78
ars run db analytics on bookdown branch for first time, minor update …
ars17psu Jun 2, 2023
72db566
Work toward fixing renv thrashing with ARS.
rogilmore Jun 9, 2023
4b9478d
Resolving bugs with ARS.
rogilmore Jun 9, 2023
2d7fde5
render report fix volume csv
ars17psu Jun 9, 2023
de79be5
render report
ars17psu Jun 12, 2023
e01672e
Merge pull request #43 from gilmore-lab/ars17psu-patch-1
ars17psu Jun 12, 2023
6290a9d
tar_make & render book
ars17psu Jun 21, 2023
87bea4c
update report 7/5/2023
ars17psu Jul 6, 2023
bd28006
Change to databraryr function calls.
rogilmore Jul 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 3 additions & 0 deletions .Rprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source("R/starting_fresh_functions.R")
# source("renv/activate.R")
unlink(".databrary.Rdata", recursive = TRUE)
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.Ruserdata
.databrary.RData
.httr-oauth
packrat/lib*/
.DS_Store
.Rproj
.Rproj
docs.zip
.Renviron
File renamed without changes.
75 changes: 75 additions & 0 deletions R/check_readiness_functions.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# R/check_readiness_functions.R

#------------------------------------------------------------------------------
check_directory_create <-
function(this_dir,
create_new = TRUE,
full_path = TRUE,
vb = TRUE) {
if (!dir.exists(this_dir)) {
if (create_new) {
if (vb)
message("Directory not found. Creating: '", this_dir, "'.")
dir.create(this_dir, recursive = full_path)
} else {
if (vb) message("Directory not found: '", this_dir, "'.")
FALSE
}
} else {
if (vb)
message("Directory found: '", this_dir, "'.")
TRUE
}
}

#------------------------------------------------------------------------------
create_required_directories <- function(required_dirs = c("src/archive", "src/csv")) {
purrr::map(required_dirs, check_directory_create) |>
purrr::list_c()
}

#------------------------------------------------------------------------------
add_gitignore_to_csv_dir <- function(csv_dir) {
stopifnot(dir.exists(csv_dir))

fileConn <- file(file.path(csv_dir, '.gitignore'))
writeLines(c('*sess-materials.csv',
'*assets.csv',
'*owners.csv',
'inst*',
'*.csv'), fileConn)
close(fileConn)
message("Created .gitignore in ", csv_dir)
}

#------------------------------------------------------------------------------
prepare_to_update_csvs <- function() {
create_required_directories()
add_gitignore_to_csv_dir('src/csv')
}

#------------------------------------------------------------------------------
update_csv_folders_data_rpt <- function() {
prepare_to_update_csvs()

require(targets)

message("Updating supporting CSV files. Please be patient.")
tar_make()

bookdown::render_book('src')
}

#------------------------------------------------------------------------------
# check_db_creds <- function(env_var = "DATABRARY_LOGIN") {
# stopifnot(is.character(env_var))
#
# db_login <- Sys.getenv(env_var)
# if (db_login == "") {
# message(env_var, " not found in user .Renviron.")
# message("Recommend saving ", env_var, " in user or project .Renviron. via `usethis::edit_r_environment()`.")
# message("Add DATABRARY_LOGIN='", env_var, "' to .Renviron.")
# } else {
# message(env_var, " found in `.Renviron`.")
# }
# }
26 changes: 26 additions & 0 deletions R/constants.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# constants.R

weekly_interval <- 1
weekly <- "weeks"
quarterly_interval <- 13 #(weeks)

max_volume_id <- 1520 # TODO: Need to find a better way to handle this

select_tags <-
c(
'numerical cognition',
'mathematical ability',
'number',
'teaching',
'teaching clips',
'abacus',
'classroom',
'mathematical equivalence',
'mental arithmetic',
'number comprehension',
'number discrimination',
'science',
'stem',
'statistical learning',
'school readiness'
)
11 changes: 11 additions & 0 deletions R/databrary_functions.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# R/databrary_functions.R
# Databrary-related functions

#-------------------------------------------------------------------------------
db_credentials_valid <- function() {
if (file.exists('.databrary.RData')) {
TRUE
} else {
FALSE
}
}
Loading