README.md

bsrto

R build
status

The goal of bsrto is to generate data products for the Barrow Strait Real Time Observatory.

Installation

You can install the development version from GitHub with:

# install.packages("remotes")
remotes::install_github("paleolimbot/bsrto")
library(bsrto)

The main event of the bsrto package are the bs_build_() functions, which generate data products from data available on the ftp server. A number of helper functions support them which can be useful when debugging problems with the intermediary outputs. You will need to set up the location of the ftp server and you will probably want to set a persistent cache directory in your .Rprofile (e.g., usethis::edit_r_profile()).

# address of the ftp server
options(bsrto.ftp = "...")

# local path to copy of the ftp server
options(bsrto.cache = "...")

# local build cache (will need invalidating if the
# read functions are updated)
options(bsrto.build_cache = "...")

Then you can build the real-time data! It will take \~60 minutes the first time (because it needs to download a few thousand files) and \~1 minute each time thereafter.

bs_build_realtime()

You can build other products as well, including the Navigator data:

bs_build_navigator()

Development workflow

Change something about bs_build_realtime():

devtools::load_all(".") # Cmd/Ctrl + Shift + L in RStudio
bs_build_interactive() # takes ~30 seconds
# ...step through the write_realtime_*()

Change the Shiny app:

bs_build_realtime("inst/bsrto-shiny/build-cache")
library(shiny)
runApp("inst/bsrto-shiny")


paleolimbot/bsrto documentation built on Dec. 12, 2021, 5:44 a.m.