Skip to content

Commit

Permalink
Merge pull request #4 from cwickham/inline-code
Browse files Browse the repository at this point in the history
Use curly brace inline code syntax
  • Loading branch information
cwickham authored Oct 22, 2024
2 parents 1c31f9e + 4e5dc2c commit 84036c2
Show file tree
Hide file tree
Showing 32 changed files with 3,269 additions and 16 deletions.
5 changes: 3 additions & 2 deletions _freeze/index/execute-results/docx.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"hash": "495a88a39f8524ef7fcceeead8f29b7c",
"hash": "12f412c1727b545eefadd0ae0deef926",
"result": {
"markdown": "---\ntitle: La Palma Earthquakes\nauthor:\n - name: Steve Purves\n orcid: 0000-0002-0760-5497\n corresponding: true\n email: [email protected]\n roles:\n - Investigation\n - Project administration\n - Software\n - Visualization\n affiliations:\n - Curvenote\n - name: Rowan Cockett\n orcid: 0000-0002-7859-8394\n corresponding: false\n roles: []\n affiliations:\n - Curvenote\nkeywords:\n - La Palma\n - Earthquakes\nabstract: |\n In September 2021, a significant jump in seismic activity on the island of La Palma (Canary Islands, Spain) signaled the start of a volcanic crisis that still continues at the time of writing. Earthquake data is continually collected and published by the Instituto Geográphico Nacional (IGN). ...\nplain-language-summary: |\n Earthquake data for the island of La Palma from the September 2021 eruption is found ...\nkey-points:\n - A web scraping script was developed to pull data from the Instituto Geogràphico Nacional into a machine-readable form for analysis\n - Earthquake events on La Palma are consistent with the presence of both mantle and crustal reservoirs.\ndate: last-modified\nbibliography: references.bib\ncitation:\n container-title: Earth and Space Science\nnumber-sections: true\n---\n\n\n\n## Introduction\n\n\n\n::: {.cell warning.hidden='true' message.hidden='true'}\n\n```{.r .cell-code .hidden}\neruptions <- c(1492, 1585, 1646, 1677, 1712, 1949, 1971, 2021)\nn_eruptions <- length(eruptions)\n```\n:::\n\n::: {#cell-fig-timeline .cell warning.hidden='true' message.hidden='true'}\n\n```{.r .cell-code .hidden}\npar(mar = c(3, 1, 1, 1) + 0.1)\nplot(eruptions, rep(0, n_eruptions), \n pch = \"|\", axes = FALSE)\naxis(1)\nbox()\n```\n\n::: {.cell-output-display}\n![Timeline of recent earthquakes on La Palma](index_files/figure-docx/fig-timeline-1.png){#fig-timeline fig-alt='An event plot of the years of the last 8 eruptions on La Palma.'}\n:::\n:::\n\n::: {.cell warning.hidden='true' message.hidden='true'}\n\n```{.r .cell-code .hidden}\navg_years_between_eruptions <- mean(diff(eruptions[-n_eruptions]))\navg_years_between_eruptions\n```\n\n::: {.cell-output .cell-output-stdout .hidden}\n\n```\n[1] 79.83333\n```\n\n\n:::\n:::\n\n\n\nBased on data up to and including 1971, eruptions on La Palma happen every 79.8 years on average.\n\nStudies of the magma systems feeding the volcano, such as @marrero2019, have proposed that there are two main magma reservoirs feeding the Cumbre Vieja volcano; one in the mantle (30-40km depth) which charges and in turn feeds a shallower crustal reservoir (10-20km depth).\n\nEight eruptions have been recorded since the late 1400s (@fig-timeline).\n\nData and methods are discussed in @sec-data-methods.\n\nLet $x$ denote the number of eruptions in a year. Then, $x$ can be modeled by a Poisson distribution\n\n$$\np(x) = \\frac{e^{-\\lambda} \\lambda^{x}}{x !}\n$$ {#eq-poisson}\n\nwhere $\\lambda$ is the rate of eruptions per year. Using @eq-poisson, the probability of an eruption in the next $t$ years can be calculated.\n\n| Name | Year |\n| -------------------- | ------ |\n| Current | 2021 |\n| Teneguía | 1971 |\n| Nambroque | 1949 |\n| El Charco | 1712 |\n| Volcán San Antonio | 1677 |\n| Volcán San Martin | 1646 |\n| Tajuya near El Paso | 1585 |\n| Montaña Quemada | 1492 |\n\n: Recent historic eruptions on La Palma {#tbl-history}\n\n@tbl-history summarises the eruptions recorded since the colonization of the islands by Europeans in the late 1400s.\n\n![Map of La Palma](images/la-palma-map.png){#fig-map}\n\nLa Palma is one of the west most islands in the Volcanic Archipelago of the Canary Islands (@fig-map). \n\n\n\n{{< embed notebooks/explore-earthquakes.qmd#fig-spatial-plot >}}\n\n\n\n\n\n@fig-spatial-plot shows the location of recent Earthquakes on La Palma.\n\n## Data & Methods {#sec-data-methods}\n\n## Conclusion\n\n## References {.unnumbered}\n\n:::{#refs}\n\n:::",
"engine": "knitr",
"markdown": "---\ntitle: La Palma Earthquakes\nauthor:\n - name: Steve Purves\n orcid: 0000-0002-0760-5497\n corresponding: true\n email: [email protected]\n roles:\n - Investigation\n - Project administration\n - Software\n - Visualization\n affiliations:\n - Curvenote\n - name: Rowan Cockett\n orcid: 0000-0002-7859-8394\n corresponding: false\n roles: []\n affiliations:\n - Curvenote\nkeywords:\n - La Palma\n - Earthquakes\nabstract: |\n In September 2021, a significant jump in seismic activity on the island of La Palma (Canary Islands, Spain) signaled the start of a volcanic crisis that still continues at the time of writing. Earthquake data is continually collected and published by the Instituto Geográphico Nacional (IGN). ...\nplain-language-summary: |\n Earthquake data for the island of La Palma from the September 2021 eruption is found ...\nkey-points:\n - A web scraping script was developed to pull data from the Instituto Geogràphico Nacional into a machine-readable form for analysis\n - Earthquake events on La Palma are consistent with the presence of both mantle and crustal reservoirs.\ndate: last-modified\nbibliography: references.bib\ncitation:\n container-title: Earth and Space Science\nnumber-sections: true\n---\n\n\n\n\n\n\n## Introduction\n\n\n\n\n\n\n::: {.cell}\n\n```{.r .cell-code .hidden}\neruptions <- c(1492, 1585, 1646, 1677, 1712, 1949, 1971, 2021)\nn_eruptions <- length(eruptions)\n```\n:::\n\n::: {#cell-fig-timeline .cell}\n\n```{.r .cell-code .hidden}\npar(mar = c(3, 1, 1, 1) + 0.1)\nplot(eruptions, rep(0, n_eruptions), \n pch = \"|\", axes = FALSE)\naxis(1)\nbox()\n```\n\n::: {.cell-output-display}\n![Timeline of recent earthquakes on La Palma](index_files/figure-docx/fig-timeline-1.png){#fig-timeline fig-alt='An event plot of the years of the last 8 eruptions on La Palma.'}\n:::\n:::\n\n::: {.cell}\n\n```{.r .cell-code .hidden}\navg_years_between_eruptions <- mean(diff(eruptions[-n_eruptions]))\navg_years_between_eruptions\n```\n\n::: {.cell-output .cell-output-stdout .hidden}\n\n```\n[1] 79.83333\n```\n\n\n:::\n:::\n\n\n\n\n\n\nBased on data up to and including 1971, eruptions on La Palma happen every 79.8 years on average.\n\nStudies of the magma systems feeding the volcano, such as @marrero2019, have proposed that there are two main magma reservoirs feeding the Cumbre Vieja volcano; one in the mantle (30-40km depth) which charges and in turn feeds a shallower crustal reservoir (10-20km depth).\n\nEight eruptions have been recorded since the late 1400s (@fig-timeline).\n\nData and methods are discussed in @sec-data-methods.\n\nLet $x$ denote the number of eruptions in a year. Then, $x$ can be modeled by a Poisson distribution\n\n$$\np(x) = \\frac{e^{-\\lambda} \\lambda^{x}}{x !}\n$$ {#eq-poisson}\n\nwhere $\\lambda$ is the rate of eruptions per year. Using @eq-poisson, the probability of an eruption in the next $t$ years can be calculated.\n\n| Name | Year |\n| -------------------- | ------ |\n| Current | 2021 |\n| Teneguía | 1971 |\n| Nambroque | 1949 |\n| El Charco | 1712 |\n| Volcán San Antonio | 1677 |\n| Volcán San Martin | 1646 |\n| Tajuya near El Paso | 1585 |\n| Montaña Quemada | 1492 |\n\n: Recent historic eruptions on La Palma {#tbl-history}\n\n@tbl-history summarises the eruptions recorded since the colonization of the islands by Europeans in the late 1400s.\n\n![Map of La Palma](images/la-palma-map.png){#fig-map}\n\nLa Palma is one of the west most islands in the Volcanic Archipelago of the Canary Islands (@fig-map). \n\n\n\n\n\n\n{{< embed notebooks/explore-earthquakes.qmd#fig-spatial-plot >}}\n\n\n\n\n\n\n\n\n\n\n@fig-spatial-plot shows the location of recent Earthquakes on La Palma.\n\n## Data & Methods {#sec-data-methods}\n\n## Conclusion\n\n## References {.unnumbered}\n\n:::{#refs}\n\n:::",
"supporting": [
"index_files/figure-docx"
],
Expand Down
5 changes: 3 additions & 2 deletions _freeze/index/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"hash": "495a88a39f8524ef7fcceeead8f29b7c",
"hash": "12f412c1727b545eefadd0ae0deef926",
"result": {
"markdown": "---\ntitle: La Palma Earthquakes\nauthor:\n - name: Steve Purves\n orcid: 0000-0002-0760-5497\n corresponding: true\n email: [email protected]\n roles:\n - Investigation\n - Project administration\n - Software\n - Visualization\n affiliations:\n - Curvenote\n - name: Rowan Cockett\n orcid: 0000-0002-7859-8394\n corresponding: false\n roles: []\n affiliations:\n - Curvenote\nkeywords:\n - La Palma\n - Earthquakes\nabstract: |\n In September 2021, a significant jump in seismic activity on the island of La Palma (Canary Islands, Spain) signaled the start of a volcanic crisis that still continues at the time of writing. Earthquake data is continually collected and published by the Instituto Geográphico Nacional (IGN). ...\nplain-language-summary: |\n Earthquake data for the island of La Palma from the September 2021 eruption is found ...\nkey-points:\n - A web scraping script was developed to pull data from the Instituto Geogràphico Nacional into a machine-readable form for analysis\n - Earthquake events on La Palma are consistent with the presence of both mantle and crustal reservoirs.\ndate: last-modified\nbibliography: references.bib\ncitation:\n container-title: Earth and Space Science\nnumber-sections: true\n---\n\n\n## Introduction\n\n\n::: {.cell warning.hidden='true' message.hidden='true'}\n\n```{.r .cell-code .hidden}\neruptions <- c(1492, 1585, 1646, 1677, 1712, 1949, 1971, 2021)\nn_eruptions <- length(eruptions)\n```\n:::\n\n::: {#cell-fig-timeline .cell warning.hidden='true' message.hidden='true'}\n\n```{.r .cell-code .hidden}\npar(mar = c(3, 1, 1, 1) + 0.1)\nplot(eruptions, rep(0, n_eruptions), \n pch = \"|\", axes = FALSE)\naxis(1)\nbox()\n```\n\n::: {.cell-output-display}\n![Timeline of recent earthquakes on La Palma](index_files/figure-html/fig-timeline-1.png){#fig-timeline fig-alt='An event plot of the years of the last 8 eruptions on La Palma.' width=576}\n:::\n:::\n\n::: {.cell warning.hidden='true' message.hidden='true'}\n\n```{.r .cell-code .hidden}\navg_years_between_eruptions <- mean(diff(eruptions[-n_eruptions]))\navg_years_between_eruptions\n```\n\n::: {.cell-output .cell-output-stdout .hidden}\n\n```\n[1] 79.83333\n```\n\n\n:::\n:::\n\n\nBased on data up to and including 1971, eruptions on La Palma happen every 79.8 years on average.\n\nStudies of the magma systems feeding the volcano, such as @marrero2019, have proposed that there are two main magma reservoirs feeding the Cumbre Vieja volcano; one in the mantle (30-40km depth) which charges and in turn feeds a shallower crustal reservoir (10-20km depth).\n\nEight eruptions have been recorded since the late 1400s (@fig-timeline).\n\nData and methods are discussed in @sec-data-methods.\n\nLet $x$ denote the number of eruptions in a year. Then, $x$ can be modeled by a Poisson distribution\n\n$$\np(x) = \\frac{e^{-\\lambda} \\lambda^{x}}{x !}\n$$ {#eq-poisson}\n\nwhere $\\lambda$ is the rate of eruptions per year. Using @eq-poisson, the probability of an eruption in the next $t$ years can be calculated.\n\n| Name | Year |\n| -------------------- | ------ |\n| Current | 2021 |\n| Teneguía | 1971 |\n| Nambroque | 1949 |\n| El Charco | 1712 |\n| Volcán San Antonio | 1677 |\n| Volcán San Martin | 1646 |\n| Tajuya near El Paso | 1585 |\n| Montaña Quemada | 1492 |\n\n: Recent historic eruptions on La Palma {#tbl-history}\n\n@tbl-history summarises the eruptions recorded since the colonization of the islands by Europeans in the late 1400s.\n\n![Map of La Palma](images/la-palma-map.png){#fig-map}\n\nLa Palma is one of the west most islands in the Volcanic Archipelago of the Canary Islands (@fig-map). \n\n\n{{< embed notebooks/explore-earthquakes.qmd#fig-spatial-plot >}}\n\n\n\n@fig-spatial-plot shows the location of recent Earthquakes on La Palma.\n\n## Data & Methods {#sec-data-methods}\n\n## Conclusion\n\n## References {.unnumbered}\n\n:::{#refs}\n\n:::",
"engine": "knitr",
"markdown": "---\ntitle: La Palma Earthquakes\nauthor:\n - name: Steve Purves\n orcid: 0000-0002-0760-5497\n corresponding: true\n email: [email protected]\n roles:\n - Investigation\n - Project administration\n - Software\n - Visualization\n affiliations:\n - Curvenote\n - name: Rowan Cockett\n orcid: 0000-0002-7859-8394\n corresponding: false\n roles: []\n affiliations:\n - Curvenote\nkeywords:\n - La Palma\n - Earthquakes\nabstract: |\n In September 2021, a significant jump in seismic activity on the island of La Palma (Canary Islands, Spain) signaled the start of a volcanic crisis that still continues at the time of writing. Earthquake data is continually collected and published by the Instituto Geográphico Nacional (IGN). ...\nplain-language-summary: |\n Earthquake data for the island of La Palma from the September 2021 eruption is found ...\nkey-points:\n - A web scraping script was developed to pull data from the Instituto Geogràphico Nacional into a machine-readable form for analysis\n - Earthquake events on La Palma are consistent with the presence of both mantle and crustal reservoirs.\ndate: last-modified\nbibliography: references.bib\ncitation:\n container-title: Earth and Space Science\nnumber-sections: true\n---\n\n\n\n\n\n\n## Introduction\n\n\n\n\n\n\n::: {.cell}\n\n```{.r .cell-code .hidden}\neruptions <- c(1492, 1585, 1646, 1677, 1712, 1949, 1971, 2021)\nn_eruptions <- length(eruptions)\n```\n:::\n\n::: {#cell-fig-timeline .cell}\n\n```{.r .cell-code .hidden}\npar(mar = c(3, 1, 1, 1) + 0.1)\nplot(eruptions, rep(0, n_eruptions), \n pch = \"|\", axes = FALSE)\naxis(1)\nbox()\n```\n\n::: {.cell-output-display}\n![Timeline of recent earthquakes on La Palma](index_files/figure-html/fig-timeline-1.png){#fig-timeline fig-alt='An event plot of the years of the last 8 eruptions on La Palma.' width=576}\n:::\n:::\n\n::: {.cell}\n\n```{.r .cell-code .hidden}\navg_years_between_eruptions <- mean(diff(eruptions[-n_eruptions]))\navg_years_between_eruptions\n```\n\n::: {.cell-output .cell-output-stdout .hidden}\n\n```\n[1] 79.83333\n```\n\n\n:::\n:::\n\n\n\n\n\n\nBased on data up to and including 1971, eruptions on La Palma happen every 79.8 years on average.\n\nStudies of the magma systems feeding the volcano, such as @marrero2019, have proposed that there are two main magma reservoirs feeding the Cumbre Vieja volcano; one in the mantle (30-40km depth) which charges and in turn feeds a shallower crustal reservoir (10-20km depth).\n\nEight eruptions have been recorded since the late 1400s (@fig-timeline).\n\nData and methods are discussed in @sec-data-methods.\n\nLet $x$ denote the number of eruptions in a year. Then, $x$ can be modeled by a Poisson distribution\n\n$$\np(x) = \\frac{e^{-\\lambda} \\lambda^{x}}{x !}\n$$ {#eq-poisson}\n\nwhere $\\lambda$ is the rate of eruptions per year. Using @eq-poisson, the probability of an eruption in the next $t$ years can be calculated.\n\n| Name | Year |\n| -------------------- | ------ |\n| Current | 2021 |\n| Teneguía | 1971 |\n| Nambroque | 1949 |\n| El Charco | 1712 |\n| Volcán San Antonio | 1677 |\n| Volcán San Martin | 1646 |\n| Tajuya near El Paso | 1585 |\n| Montaña Quemada | 1492 |\n\n: Recent historic eruptions on La Palma {#tbl-history}\n\n@tbl-history summarises the eruptions recorded since the colonization of the islands by Europeans in the late 1400s.\n\n![Map of La Palma](images/la-palma-map.png){#fig-map}\n\nLa Palma is one of the west most islands in the Volcanic Archipelago of the Canary Islands (@fig-map). \n\n\n\n\n\n\n{{< embed notebooks/explore-earthquakes.qmd#fig-spatial-plot >}}\n\n\n\n\n\n\n\n\n\n\n@fig-spatial-plot shows the location of recent Earthquakes on La Palma.\n\n## Data & Methods {#sec-data-methods}\n\n## Conclusion\n\n## References {.unnumbered}\n\n:::{#refs}\n\n:::",
"supporting": [
"index_files"
],
Expand Down
Loading

0 comments on commit 84036c2

Please sign in to comment.