The Oceans Dashboard displays indicator time-series data to monitor progress towards goals for nature, people, and climate.
If you wish to run the Oceans Dashboard offline, you can install the development version from Github using:
devtools::install_github("cabuelow/OceansDash", build_vignettes = TRUE)run the application using:
library(OceansDash)
run_app()and access the user manual:
vignette('User_Manual', package ='OceansDash')The user manual vignette is also published here for easy access.
The above download and installation is not required if you simply want to use the Oceans Dashboard. The latest version is available on the Shiny Server
To contribute to the development of this web application please follow these instructions:
- Fork and clone the github repository
- Start a new development branch
- Make edits to scripts and files - pull, commit and push regularly to your development branch. See below information on navigating the R package to make edits
- When your edits are complete, make a pull request and merge if there are no conflicts.
If you are further developing {OceansDash}, start by:
-
Opening your local {OceansDash} github repo by double-clicking on the .Rproj file
OceansDash.Rproj -
Opening the ‘dev/02_dev.R’ script.
- This is where you can:
-
- add packages,
-
- add modules, and
-
- add ‘business’ logic (as opposed to application logic) in the form of of functions (add_fct) or utilities (add_utils) - the latter being smaller functions that will be used several times. Read more here
-
- Opening the ‘data-raw/make-sysdata.R’ script.
- Here you can import and wrangle data to be used internally by the app. Make sure to add it to the ‘sysdata.rda’ at the bottom of the script. Run through all lines of code in the script to update all internal datasets and overwrite the current ‘sysdata.rda’.
- Opening the ‘R/’ folder.
- Here you will find the following R scripts and files:
-
- The
app_ui.Randapp_server.Rfiles that serve to provide the main app structure and integrate modules,
- The
-
- Any modules (aka ‘sub-apps’, e.g.,
mod_main.R), and
- Any modules (aka ‘sub-apps’, e.g.,
-
- The
sysdata.rdafile created via Step 2 above
- The
-
- Once you have made changes to any of the above, you can run the development version of the app via:
golem::run_dev()- If you want to deploy the app to a shinyapps.io server, run the development version as above and click the ‘Publish’ or ‘Re-publish’ button on the top right corner of the app as it is running.
Note that there are many other files in the {OceansDash} package that are not discussed here. Those not mentioned are not necessary for editing or updating the dashboard application, but you can find more information on what they do/how to use them here.
- Declare packages that functions belong to explicitly with
::, e.g.dplyr::mutateor you will get an error message saying that the function cannot be found.