diff --git a/_pkgdown.yml b/_pkgdown.yml index 0cc0ce3..6955d35 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -3,7 +3,6 @@ articles: navbar: ~ contents: - Introduction - - HTML_Rendering - Calcofi - Erddap - Marine @@ -23,6 +22,7 @@ reference: - calculate_statistics - get_dates - ply2erddap + - plot_metric_timeseries - plot_SST_anomaly - title: "Data: Rocky intertidal (MARINe)" desc: Produce interactive maps and plots. @@ -31,7 +31,6 @@ reference: - make_sites_csv - map_nms_sites - plot_intertidal_nms - - plot_metric_timeseries - title: Reporting functions desc: Render html for R markdown files that form the modal windows. contents: diff --git a/docs/404.html b/docs/404.html index 4fd8b24..55cee27 100644 --- a/docs/404.html +++ b/docs/404.html @@ -104,9 +104,6 @@
The data used by the two CALCOFI display functions (calcofi_map()
& calcofi_plot()
) are found in the calcofi-analysis folder within the marinebon GitHub account.
Content to be added
+ERDDAP (Environmental Research Division Data Access Portal) data is sourced from the ERDDAP server using the rerddap R library.
+As data on the ERDDAP server is updated regularly this provides the opportunity for interactive figures using ERDDAP data to be updated regularly as well. The first step in this process is to update the relevant tables, which for the Channel Islands Marine Sanctuary (CINMS) are located at: https://github.com/marinebon/cinms/tree/master/data/oceano. These tables, saved in csv format, are updated monthly via GitHub Actions using the update_oceano.yml workflow. This workflow in turn calls the R script update_oceano-data.R, which uses the calculate_statistics()
and calculate_SST_anomaly
functions from the nms4r package to update the relevant csv files.
Once the data tables have been updated, the next step is to update the figures that draw upon those tables. This is done by rerendering the modal windows (which are R Markdown files) that contain those figures. This also occurs on a monthly basis via GitHub Actions using the update_oceano.yml workflow. The workflow calls the R script render_oceano-modals.R, which calls the nms4r function render_all_rmd()
to update the relevant modal windows.
Satellite-derived data is displayed in several of the modal windows, such as in the following example:
- -This data and the resulting figures are auto-updated every month by calling nms4r functions in Github Actions. In the case of the Channel Islands National Marine Sanctuary, the file that controls these actions can be found on GitHub here.
+ +This data and the resulting figures are auto-updated every month by calling nms4r functions in Github Actions. In the case of the Channel Islands National Marine Sanctuary, the file that controls these actions can be found on GitHub here.
diff --git a/docs/articles/Marine.html b/docs/articles/Marine.html index 25c226f..b40b8c6 100644 --- a/docs/articles/Marine.html +++ b/docs/articles/Marine.html @@ -63,9 +63,6 @@Content to be added
+MARINe (Multi-Agency Rocky Intertidal Network) data is not publicly available (though it is available upon request). As a consequence, interactive figures containing MARINe data can only be generated by users that have been given data access. The MARINe-related nms4r functions assume that the MARINe data is available locally, with local access provided via the application Google Drive File Stream. Google Drive File Stream in turn connects to a non-public Google Drive that contains the MARINe data.
+Content to be added
- +The reporting functions of the nms4r package work together to generate HTML files from the R Markdown files known as modal windows. The process of rendering a R Markdown file to HTML is a multi-step process. The initial step is to render all of the R code within the R Markdown file, creating a temporary Markdown file. Once that process has completed though, there is a big step remaining before the html can be created from that Markdown file. Namely, any words in the Markdown file that are designated as glossary terms need to be flagged and given necessary html codes. Once this is done, the html is rendered from the Markdown file, with all glossary terms getting a Javascript “tooltip” in the html.
+Here’s the steps in the process of rendering the HTML from R Markdown.
+generate_html_4_rmd()
: renders a single R Markdown file.render_all_rmd()
: renders all R Markdown files in “modals” directory using generate_html_4_rmd()
.generate_html_4_rmd()
calls rmd2html()
, which creates a temporary Markdown file in which all of the R code in the R Markdown File has been executed.rmd2html()
opens the temporary Markdown file and then calls glossarize_md()
.glossarize_md()
loads up all of the glossary terms in the google sheet where they are stored and then goes through the Markdown file, line by line. Each combination of glossary term and line of the Markdown file is fed into insert_tooltips()
.insert_tooltips()
inserts tooltip-related tags around that term.glossarize_md()
loads the tooltip Javascript library at the bottom of the file (but only if there is at least one glossary term in the file).generate_html_4_rmd()
then renders the edited Markdown file to html. This function also renders the original R Markdown file to a temporary html file using rmarkdown::render()
, as this is the only way to know what the right Javascript libraries are for any interactive elements in the final html. The entire head section of the second html file rewrites the head section of the first html file.