Skip to content

Commit

Permalink
rednering quarto lab report
Browse files Browse the repository at this point in the history
  • Loading branch information
CarissaGervasi-NOAA committed Feb 6, 2024
1 parent 9ba1b43 commit bdb7d1a
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 14 deletions.
28 changes: 28 additions & 0 deletions .Rhistory
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
rm(list = ls())
dat <- read.table("../indicator_data/surface_omega_series.txt", skip = 0, header = F)
head(dat)
tail(dat)
dat$dates <- paste0(month.abb[dat$V2], dat$V1)
datdata <- dat$dates
inddata <- data.frame(dat$V3)
labs <- c("Ocean acidification", "Surface aragonite saturation", "")
indnames <- data.frame(matrix(labs, nrow = 3, byrow = F))
s <- list(labels = indnames, indicators = inddata, datelist = datdata)
class(s) <-"indicatordata"
plotIndicatorTimeSeries(s)
library(plotTimeSeries)
library(spam)
rm(list = ls())
dat <- read.table("../indicator_data/surface_omega_series.txt", skip = 0, header = F)
head(dat)
tail(dat)
dat$dates <- paste0(month.abb[dat$V2], dat$V1)
datdata <- dat$dates
inddata <- data.frame(dat$V3)
labs <- c("Ocean acidification", "Surface aragonite saturation", "")
indnames <- data.frame(matrix(labs, nrow = 3, byrow = F))
s <- list(labels = indnames, indicators = inddata, datelist = datdata)
class(s) <-"indicatordata"
plotIndicatorTimeSeries(s)
inddata <- s
save(inddata, file = "OA_test.RData")
2 changes: 1 addition & 1 deletion Lab report/OA.qmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Ocean acificiation indicator
## Ocean acidification indicator

Sent by F. Gomez on 02/19/2023

Expand Down
9 changes: 4 additions & 5 deletions Lab report/_book/OA.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">


<title>Caribbean ESR Lab Report - Ocean acificiation indicator</title>
<title>Caribbean ESR Lab Report - Ocean acidification indicator</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
Expand Down Expand Up @@ -96,7 +96,6 @@
}</script>


<link rel="stylesheet" href="styles.css">
</head>

<body class="nav-sidebar floating">
Expand All @@ -108,7 +107,7 @@
<button type="button" class="quarto-btn-toggle btn" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar,#quarto-sidebar-glass" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
<i class="bi bi-layout-text-sidebar-reverse"></i>
</button>
<nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="./OA.html">Part 2: Indicators</a></li><li class="breadcrumb-item"><a href="./OA.html"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Ocean acificiation indicator</span></a></li></ol></nav>
<nav class="quarto-page-breadcrumbs" aria-label="breadcrumb"><ol class="breadcrumb"><li class="breadcrumb-item"><a href="./OA.html">Part 2: Indicators</a></li><li class="breadcrumb-item"><a href="./OA.html"><span class="chapter-number">2</span>&nbsp; <span class="chapter-title">Ocean acidification indicator</span></a></li></ol></nav>
<a class="flex-grow-1" role="button" data-bs-toggle="collapse" data-bs-target="#quarto-sidebar,#quarto-sidebar-glass" aria-controls="quarto-sidebar" aria-expanded="false" aria-label="Toggle sidebar navigation" onclick="if (window.quartoToggleHeadroom) { window.quartoToggleHeadroom(); }">
</a>
<button type="button" class="btn quarto-search-button" aria-label="" onclick="window.quartoOpenSearch();">
Expand Down Expand Up @@ -160,7 +159,7 @@
<ul id="quarto-sidebar-section-2" class="collapse list-unstyled sidebar-section depth1 show">
<li class="sidebar-item">
<div class="sidebar-item-container">
<a href="./OA.html" class="sidebar-item-text sidebar-link active"><span class="chapter-title">Ocean acificiation indicator</span></a>
<a href="./OA.html" class="sidebar-item-text sidebar-link active"><span class="chapter-title">Ocean acidification indicator</span></a>
</div>
</li>
</ul>
Expand All @@ -178,7 +177,7 @@

<header id="title-block-header" class="quarto-title-block default">
<div class="quarto-title">
<h1 class="title"><span class="chapter-title">Ocean acificiation indicator</span></h1>
<h1 class="title"><span class="chapter-title">Ocean acidification indicator</span></h1>
</div>


Expand Down
14 changes: 13 additions & 1 deletion Lab report/_book/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
}</script>


<link rel="stylesheet" href="styles.css">
</head>

<body class="nav-sidebar floating">
Expand Down Expand Up @@ -145,6 +144,7 @@ <h2 id="toc-title">Table of contents</h2>
<ul>
<li><a href="#esr-lab-reports" id="toc-esr-lab-reports" class="nav-link active" data-scroll-target="#esr-lab-reports">ESR Lab Reports</a></li>
<li><a href="#caribbean-esr" id="toc-caribbean-esr" class="nav-link" data-scroll-target="#caribbean-esr">Caribbean ESR</a></li>
<li><a href="#some-notes" id="toc-some-notes" class="nav-link" data-scroll-target="#some-notes">Some notes</a></li>
</ul>
</nav>
</div>
Expand Down Expand Up @@ -187,6 +187,18 @@ <h2 class="anchored" data-anchor-id="esr-lab-reports">ESR Lab Reports</h2>
<section id="caribbean-esr" class="level2">
<h2 class="anchored" data-anchor-id="caribbean-esr">Caribbean ESR</h2>
<p>This lab report is for the Caribbean ESR that was compiled from 2023-2024. This is the first ESR for the Caribbean region. Here we can add more text about why this ESR is being compiled.</p>
</section>
<section id="some-notes" class="level2">
<h2 class="anchored" data-anchor-id="some-notes">Some notes</h2>
<p>This lab report was created the following way:</p>
<ol type="1">
<li>clone the Caribbean ESR repo into my R studio</li>
<li>create a new folder in the repo called “Lab report”</li>
<li>create 2 files, one called “index.qmd” and abother called “_quarto.txt” within the Lab report folder</li>
<li>rename the “_quarto.txt” file to “_quarto.yml” in file explorer to change it into the book YAML</li>
<li>populate the YAML document</li>
</ol>
<p>Note: this works great for rendering the quarto book as an html file. I can’t figure out how to render it as a pdf though. This is not really necessary for the lab report but something to keep in mind.</p>


</section>
Expand Down
9 changes: 8 additions & 1 deletion Lab report/_book/search.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,15 @@
{
"objectID": "OA.html",
"href": "OA.html",
"title": "Ocean acificiation indicator",
"title": "Ocean acidification indicator",
"section": "",
"text": "Sent by F. Gomez on 02/19/2023\nNotes from Fabian:\nderived surface omega series from the MOM-Topaz hindcast 0.10deg resolution model *txt files have this structure: column1: year, column2=month, and column3=carbon system variable The mean magnitude of the simulated omega trends, around 9e-3 year-1, is consistent with observed trends in the Subtropical North Atlantic\nQuestion: What is causing the acceleration after 2008?\nAnswer: made a Taylor decomposition to figure out what was driving that acceleration in the simulated ??Ar anomaly. Interannual ??Ar changes were mostly driven by the balance between dic and alkalinity. There was a positive trend from the 1980s until mid 2000s, which contributed to moderate the ??Ar decline. But that trend vanished in the last 15 years or so, which probably has to do with this accelerated decline in ??Ar in the last decade.\n\nlibrary(plotTimeSeries)\nlibrary(spam)\n\n\nrm(list = ls())\n\ndat &lt;- read.table(\"../indicator_data/surface_omega_series.txt\", skip = 0, header = F)\nhead(dat)\ntail(dat)\ndat$dates &lt;- paste0(month.abb[dat$V2], dat$V1)\n\nFormat indicator object\n\ndatdata &lt;- dat$dates \ninddata &lt;- data.frame(dat$V3) \nlabs &lt;- c(\"Ocean acidification\", \"Surface aragonite saturation\", \"\") \nindnames &lt;- data.frame(matrix(labs, nrow = 3, byrow = F)) \ns &lt;- list(labels = indnames, indicators = inddata, datelist = datdata)\nclass(s) &lt;-\"indicatordata\"\n\nSave and plot\n\nplotIndicatorTimeSeries(s)\n\n\n\ninddata &lt;- s \nsave(inddata, file = \"OA_test.RData\")"
},
{
"objectID": "index.html#some-notes",
"href": "index.html#some-notes",
"title": "Caribbean ESR Lab Report",
"section": "Some notes",
"text": "Some notes\nThis lab report was created the following way:\n\nclone the Caribbean ESR repo into my R studio\ncreate a new folder in the repo called “Lab report”\ncreate 2 files, one called “index.qmd” and abother called “_quarto.txt” within the Lab report folder\nrename the “_quarto.txt” file to “_quarto.yml” in file explorer to change it into the book YAML\npopulate the YAML document\n\nNote: this works great for rendering the quarto book as an html file. I can’t figure out how to render it as a pdf though. This is not really necessary for the lab report but something to keep in mind."
}
]
4 changes: 2 additions & 2 deletions Lab report/_book/site_libs/bootstrap/bootstrap.min.css

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions Lab report/_quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ book:

format:
html:
theme: cosmo
css: styles.css
theme: flatly
number-sections: false
output: false
output: false
pdf:
documentclass: scrreprt
toc: true
number-sections: false
output: false

editor: visual
14 changes: 13 additions & 1 deletion Lab report/index.qmd
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
## ESR Lab Reports

ESR lab reports are quarto books that compile the R scripts for each indicator as well as any other descriptions of how the ESR will be put together.
ESR lab reports are quarto books that compile the R scripts for each indicator as well as any other descriptions of how the ESR will be put together.

## Caribbean ESR

This lab report is for the Caribbean ESR that was compiled from 2023-2024. This is the first ESR for the Caribbean region. Here we can add more text about why this ESR is being compiled.

## Some notes

This lab report was created the following way:

1. clone the Caribbean ESR repo into my R studio
2. create a new folder in the repo called "Lab report"
3. create 2 files, one called "index.qmd" and abother called "_quarto.txt" within the Lab report folder
4. rename the "_quarto.txt" file to "_quarto.yml" in file explorer to change it into the book YAML
5. populate the YAML document

Note: this works great for rendering the quarto book as an html file. I can't figure out how to render it as a pdf though. This is not really necessary for the lab report but something to keep in mind.

0 comments on commit bdb7d1a

Please sign in to comment.