The goal of bsrto is to generate data products for the Barrow Strait Real Time Observatory.
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()
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.