Skip to content

Commit

Permalink
data now from pins
Browse files Browse the repository at this point in the history
  • Loading branch information
riinuots committed Sep 18, 2023
1 parent dd65652 commit 537bd2c
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 5 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Imports:
pkgload,
tidyr,
stringr,
finalfit
finalfit,
pins
Encoding: UTF-8
LazyData: true
RoxygenNote: 7.1.0
Expand Down
18 changes: 18 additions & 0 deletions R/app_server.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,32 @@
#' DO NOT REMOVE.
#' @import shiny
#' @noRd
#'
#'
library(dplyr)
library(pins)
library(magrittr)
board = board_connect()
appdata = pin_read(board, "rots/gecko_appdata")
updated_date = pin_meta(board, "rots/gecko_appdata")$created

allvars = appdata %>%
finalfit::extract_labels() %>%
select(vname, vfill) %$%
setNames(as.list(vname), vfill)


app_server <- function( input, output, session ) {
# List the first level callModules here
library(dplyr)
library(forcats)
library(tidyr)
library(ggplot2)
library(magrittr)

r <- reactiveValues()


#data_subset <- callModule(mod_subset_server, "subset_ui_1", r, alldata = appdata)
#data_subset <- callModule(mod_subset_server, "subset_ui_1", r, alldata = cs_data_app)
#summary_table <- callModule(mod_subset_server, "subset_ui_1", r, alldata = bmjdata)
Expand Down
1 change: 1 addition & 0 deletions app.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
pkgload::load_all(export_all = FALSE,helpers = FALSE,attach_testthat = FALSE)
options( "golem.app.prod" = TRUE)
gecko_shinyviz::run_app() # add parameters here (if any)

7 changes: 6 additions & 1 deletion data-raw/appdata.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
## code to prepare `appdata` dataset goes here

# Now replaced with pins
if(FALSE){


library(tidyverse)
library(finalfit)

Expand Down Expand Up @@ -153,9 +158,9 @@ allvars = appdata %>%




updated_date = format(Sys.time(), format = "%d-%B %Y")

usethis::use_data(appdata, overwrite = TRUE)
usethis::use_data(allvars, overwrite = TRUE)
usethis::use_data(updated_date, overwrite = TRUE)
}
7 changes: 4 additions & 3 deletions rsconnect/argoshare.is.ed.ac.uk/rots/gecko_shinyviz.dcf
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ account: rots
server: argoshare.is.ed.ac.uk
hostUrl: https://argoshare.is.ed.ac.uk/__api__
appId: 639
bundleId: 3273
bundleId: 3292
url: https://argoshare.is.ed.ac.uk/gecko_shinyviz/
when: 1694790034.70899
lastSyncTime: 1694790034.709
when: 1695030009.3658
lastSyncTime: 1695030009.36581
asMultiple: FALSE
asStatic: FALSE
ignoredFiles: data-raw/appdata.R

0 comments on commit 537bd2c

Please sign in to comment.