The Oceans Dashboard is an interactive application that displays indicator time-series data to monitor progress towards goals for nature, people, and climate. It has been developed as an R package {OceansDash} to facilitate robust documentation and long-term maintenance of the application using the {golem} framework (read more about {golem} here).
To install {OceansDash}, first open RStudio and install {devtools} if it is not installed already,
install.packages('devtools')
then install {OceansDash} with,
devtools::install_github("cabuelow/OceansDash", build_vignettes = TRUE)
Once you have {OceansDash} installed, you can run the dashboard application locally via:
library(OceansDash)
run_app()
To deploy the dashboard application on a remote shiny server, follow the instructions here.
This manual provides instructions for:
The instructions assume knowledge of how to use RStudio and Github.
To edit the dashboard application:
OceansDash.Rproj to open it
in RStudio,There are two main components to the dashboard application, the user-interface (ui) and the server.
The user-interface is what what we see in the dashboard application. It takes inputs and displays outputs, and has been developed as a series of nested modules to minimise the codebase length.
The server provides instructions for how the dashboard application reacts to inputs to the user-interface and for how it displays outputs. For example, {ggplot} code for visualising data as a user-interface output is located in the server, while code defining widgets for selecting data to visualise in the {ggplot} is located in the ui .
To edit the codebase defining the dashboard application user-interface (ui), modules, and server:
app_ui.R and
server in app_server.R,app_ui.R in the following scripts: mod_main.R
and mod_ind_timeseries.RThese scripts define specific parts of the dashboard application user-interface:
The data loaded and visualised in the dashboard application is an RDA file. The RDA file is made in the R script ‘data-raw/make-sysdata.R’ and is stored in the ‘R/’ folder along with the user-interface, server, and module R scripts.
Note that the make-sysdata.R file compiles indicator data that has already been processed to regions/countries of interest in to the RDA file. If you want to update the processed data before compiling the indicator data in the RDA file, go to the section below: Instructions for updating indicator data displayed in the application.
To edit or update the data stored in the RDA file and used by the dashboard application:
Once you have made changes to any of the above, you can test your edits by running the development version of the app via:
golem::run_dev()
If you want to deploy or re-deploy the app to a remote shiny server, run the development version as above and hit ‘Publish’ or ‘Re-publish’ button on the top right corner of the app as it is running. For more detailed explanations regarding shiny application deployment, go here.
The following server settings are recommended to make the deployed dashboard application as responsive as possible:
General settings
Advanced settings
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.
Scripts for processing indicator data are located in the ‘data-raw/process-indicators/’ folder. Instructions for downloading data and processing the indicators are provided below, organised such that indicators derived from the same data source are described together:
Important! After you have updated data for any of the indicators (following the instructions provided below), you will need to make the new data available internally to the dashboard application by running the script: data-raw/make-sysdata.R.
The Marine Red List, Fisheries Stock Condition, Habitat Condition, and Carbon Storage indicators are all sourced from the Ocean Health Index. All indicator values are standardised on a scale from 0 to 100, with higher values indicating better status relative to low values. A description of each indicator is provided below.
Note that data is not available for Alaska.
Citation: Ocean Health Index. 2024. ohi-global version: Global scenarios data for Ocean Health Index, [August 26, 2024]. National Center for Ecological Analysis and Synthesis, University of California, Santa Barbara. Available at: https://github.com/OHI-Science/ohi-global/releases
The Marine Red List indicator is the Ocean Health Index Biodiversity (Species sub-goal) indicator. A high score indicates that most native marine species in a country are not identified as threatened or vulnerable by the IUCN which monitors the status of many species.
The Fisheries Stock Condition indicator is the Ocean Health Index Food Provision (Wild Caught Fisheries subgoal) indicator. It measures ability to sustainably maximize wild-caught fisheries.
The Habitat Condition indicator is the Ocean Health Index Biodiversity (Habitat sub-goal) indicator. This goal assesses the condition of marine habitats that are particularly important in supporting large numbers of marine species. The status of each habitat is its current condition relative to its reference condition, which is based on historical area in the 1980s.
The Carbon Storage indicator is the Ocean Health Index Carbon storage indicator. It captures the ability of coastal habitats to store carbon given the amount of carbon they store and their health.
To update these indicators:
The percentage of ecosystem extent and carbon storage under effective protection are calculated for mangroves, saltmarsh, and coral reef ecosystems (with the exception of carbon storage for coral reefs as global data is not currently available). Global mapping of seagrass and kelp forest ecosystem extent is not of high enough resolution to estimate their effective protection, but can be included when data becomes available.
Note that the spatial data files required to process these indicators are too large to be stored on github, and so instructions below for updating and re-processing each indicator require data to be downloaded and stored locally.
Indicator values are calculated for each country/region using spatial polygon data representing national borders and exclusive economic zones (EEZs). The most recent version of this spatial data can be downloaded here - Marine and land zones: the union of world country boundaries and EEZ’s. As of September 5th, 2024 the current version being used in {OceansDash} is version 3.
This spatial data requires some processing to remove countries that aren’t part of the Oceans Dashboard monitoring. To perform this processing:
Spatial data on protected areas and other effective conservation measures (OECMs) are derived from World Database on Protected Areas (WDPA) and the World Database on Other Effective Area-based Conservation Measures (WDOECM). The R package {wdpar} is used to download and clean these spatial data layers following best practice (Butchart et al., 2015; Hanson, 2022). This includes: a) excluding protected areas that do not have the status of “Designated”, “Inscribed” and “Established”, and areas that are UNESCO Biosphere Reserves, b) protected areas represented as points with a reported extent are buffered to a circular area using their reported extent, and c) overlapping protected areas are erased such that areas associated with more effective management categories (i.e. higher IUCN Protected Area Management Categories) and historical precedence are kept (Hanson, 2022).
To download and clean the most recent protected area/OECM data using {wdpar}:
Once you have processed and cleaned the EEZ and protected area/OECM data (described above), you can update the Effective protection and Carbon under effective protection indicators following the steps below.
The percentage of habitat under effective protection was calculated for mangroves, coral reefs, and tidal (salt) marshes. Currently (as of September 2024), there is only a single time point available on extent of coral reefs and tidal marshes. Check for the latest data on the extent of each habitat at the following sources:
To update the Effective protection indicator for each habitat:
The percentage of carbon under effective protection was calculated for mangrove and tidal marshes. Check for the latest data at the sources listed below:
To update the Carbon Under Effective Protection indicator for each habitat:
The Marine Living Planet Index measures trends in marine species populations through time. Index values represent the average rate of change in populations from 1970 (the reference year). A value of 1 means the population size is the same as in the reference year, a value less than 1 means population size has decreased, and a value greater than 1 means population size has increased. It is calculated for marine species in each country following Living Planet Index methodology.
Citation: LPI 2024. Living Planet Index database. 2024. < www.livingplanetindex.org/>. Downloaded on 30 August 2024
To update this indicator:
Small-scale fisheries rights represents the degree of application of a legal/regulatory/policy/institutional framework which recognizes and protects access rights for small-scale fisheries. The indicator score refers to the level of implementation: 1 (lowest) to 5 (highest).
Note there is no data available for Alaska, Mozambique, Papua New Guinea, or Madagascar.
Citation: Data from multiple sources compiled by the UN – processed by Our World in Data. “14.b.1 - Degree of application of a legal/regulatory/policy/institutional framework which recognizes and protects access rights for small-scale fisheries (level of implementation: 1 lowest to 5 highest) - ER_REG_SSFRAR” [dataset]. Data from multiple sources compiled by the UN [original data].
To update this indicator:
Average Wealth Relative Index within each country/region was calculated by inverting the Global Gridded Relative Deprivation Index (GRDI; v1 (2010–2020)), which characterizes the relative levels of multidimensional deprivation and poverty at 30 arc-second (~1 km) resolution. A value of 100 represents the highest level of deprivation and a value of 0 the lowest. Check for the latest data here.
To update:
Average Human Development Index within each country/region was calculated from the ‘Gridded global datasets for Gross Domestic Product and Human Development Index’ from 1990–2015 at 5 arc-min resolution. Check for the latest data here.
The Human Development Index (HDI) is a summary measure of average achievement in key dimensions of human development: a long and healthy life, being knowledgeable and having a decent standard of living. It ranges from 0 (low) to 1 (high).
To update:
TODO
Baseline (year 2020) indicator values for each country/region are extracted from the indicator data processed as described in the above sections. Target (year 2030) values for each country/region are provided in a ‘.csv’ file. The baseline and target values are wrangled into a single dataframe for plotting in the ‘data-raw/make-sysdata.R’ script.
To update the target indicator values: