Núcleo de Innovación Social - Buenos Aires Argentina
My name is Betsabé Cohen I’m a sociologist and data analyst from Buenos Aires Argentina.
👩🏻🎓 I am currently a Masters student in Statistics at University of Tres de Febrero.
I’m currently organizer at:
RLadies Buenos Aires: A global organisation that promotes gender diversity in the R community
Núcleo de Innovación Social: An inter-disciplinary research and development team in social sciences and technology.
Why Reproducibility?
What is Quarto?
Core Use Cases: a short walk around
Academic Production with Quarto Journal and Manuscripts
Journal Templates
Quarto Manuscript Projects
Citations, Cross references, and authoring
Learning More
This presentation is based on:
“Slides and materials for the”Reproducible Manuscripts with Quarto” talk at posit::conf(2023). by Mine Çetinkaya-Rundel
Quarto for Academics video on YouTube by Mine Çetinkaya-Rundel and Posit
R/Medicine: Quarto for Reproducible Medical Manuscripts by Mine Cetinkaya-Rundel webinar in youtube video
The Turing Way Community, & Scriberia.(2024) on https://book.the-turing-way.org/
An open-source scientific and technical publishing system
Create dynamic content with Python, R, Julia, and Observable.
Publish reproducible, production quality articles, presentations, dashboards, websites, blogs, and books in HTML, PDF, MS Word, e Pub, and more.
Share knowledge and insights organization-wide by publishing to Posit Connect, Confluence, or other publishing systems.
Write using Pandoc markdown, including equations, citations, cross refs, figure panels, call-outs, advanced layout, and more.
“Artwork from”Hello, Quarto” keynote by Julia Lowndes and Mine Çetinkaya-Rundel, presented at RStudio Conference 2022. Illustrated by Allison Horst.”
🗃️Dynamic Documents
🌄Beautiful Publications
🧪Scientific Markdown
🕸️Websites and Books
📽️Interactivity
Take a visit to Quarto Gallery here
You can add Quarto options to code cells by adding a #| comment to the top, followed by the option in YAML syntax. For example, adding the echo option with the value true would look like this:
The echo
option describes whether the code is included in the rendered article. If you make this change and save index.qmd, you’ll see this code now appears in the article.
Code chunck options guide
You can find a list of all the code cell options available on the Knitr Code Cell reference page at https://quarto.org/docs/reference/cells/cells-knitr.html
be authored in your favorite code editor
apply journal styles to your outputs with Quarto extensions
orchestrate multiple inputs and outputs with embedded computing using a new Quarto project type: manuscript
produce manuscripts in multiple formats (including LaTeX or MS Word formats required by journals), and give readers easy access to all of the formats through a website
publish computations from one or more notebooks alongside the manuscript, allowing readers to dive into your code and view it or interact with it in a virtual environment
publish to GitHub Pages, Netlify, and more
In Quarto, a journal refers to a single document, potentially with embedded computations and visualizations, designed for publication in a journal format.
A manuscript, on the other hand, represents a collection of Quarto documents, potentially including multiple chapters, that are intended to be assembled into a book-like structure.
Start from scratch
quarto create project manuscript <name>
Start with a sample from https://quarto.org/docs/manuscripts
Tip
Learn how to Track your project with Git and host on GitHub for happy publishing.
If you already have a peper of your own (with differnt r files with code) go to your RStudio Terminal and create a new project from scratch
If you wanna follow along the same structure we are going to you can copy the repo from github repo
https://github.com/quarto-ext/manuscript-template-rstudio/tree/main
{fig-align = “center”}
👍 Please sign me with when you are ready.
The basic workflow for writing a manuscript in Quarto is to make changes to your article content (the index.qmd if you are following the example), preview the changes with Quarto, and repeat.
👍 Please sign me with when you are ready.
{fig-align = “center”}
_index.qmd
title: La Palma Earthquakes
author:
- name: Steve Purves
orcid: 0000-0002-0760-5497
corresponding: true
email: steve@curvenote.com
roles:
- Investigation
- Project administration
- Software
- Visualization
affiliations:
- Curvenote
- name: Rowan Cockett
orcid: 0000-0002-7859-8394
corresponding: false
roles: []
affiliations:
- Curvenote
keywords:
- La Palma
- Earthquakes
abstract: |
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). ...
plain-language-summary: |
Earthquake data for the island of La Palma from the September 2021 eruption is found ...
key-points:
- A web scraping script was developed to pull data from the Instituto Geogràphico Nacional into a machine-readable form for analysis
- Earthquake events on La Palma are consistent with the presence of both mantle and crustal reservoirs.
date: last-modified
bibliography: references.bib
citation:
container-title: Earth and Space Science
number-sections: true
---
You can use computed values directly in your article text using the syntax `{r} expr`
. For example, consider this line in index.qmd
:
Based on data up to and including 1971, eruptions on La Palma happen every `{r} round(avg_years_between_eruptions, 1)` years on average.
When rendered, it displays as:
Based on data up to and including 1971, eruptions on La Palma happen every 79.8 years on average.
lable
and fig-
options```{r}
#| label: fig-timeline
#| fig-cap: Timeline of recent earthquakes on La Palma
#| fig-alt: An event plot of the years of the last 8 eruptions on La Palma.
#| fig-height: 1.5
#| fig-width: 6
par(mar = c(3, 1, 1, 1) + 0.1)
plot(
eruptions, rep(0, n_eruptions),
pch = "|", axes = FALSE
)
axis(1)
box()
```
references.bib
@article{marrero2019,
author = {Marrero, Jos{\' e} and Garc{\' i}a, Alicia and Berrocoso, Manuel and Llinares, {\' A}ngeles and Rodr{\' i}guez-Losada, Antonio and Ortiz, R.},
journal = {Journal of Applied Volcanology},
year = {2019},
month = {7},
pages = {},
title = {Strategies for the development of volcanic hazard maps in monogenetic volcanic fields: the example of {La} {Palma} ({Canary} {Islands})},
volume = {8},
doi = {10.1186/s13617-019-0085-5},
}
When rendered, it displays as:
Studies of the magma systems feeding the volcano, such as Marrero et al. (2019), have proposed
… and when hovering over the citation text it reveals the full reference details allowing reader to click on the citation and take it to the reference in the References section at the end of the article:
Another common style is to place the citation within parentheses at the end of a sentence. You can achieve this by enclosing the citation syntax in square brackets [. For example,
A prior study of the magma systems feeding the volcano proposed that there are two main magma reservoirs feeding the Cumbre Vieja volcano [@marrero2019].
When rendered, it displays as:
A prior study of the magma systems feeding the volcano proposed that there are two main magma reservoirs feeding the Cumbre Vieja volcano (Marrero et al. 2019).
Tip
Quarto support differnt syntax variotions to include page numbers, chapters, exclude author names and other cool posibilities. You can learn more about it the Citation documentation at https://quarto.org/docs/authoring/citations.html
👍 Please sign me with when you are ready.
Labeled as…
Should be use used as
And will look something like
Eight eruptions have been recorded since the late 1400s (Figure 1).
Figure fig-
and will render as Figure 1
Table tbl-
and will render as Table 1
Equation eq-
and will render as Equation 1
Section sec-
and will render as Section 1
Warning
To cross reference sections your document YAML header must also include number-sections: true
You can add a label to a section heading in curly braces after the heading, e.g ## Data & Methods {#sec-data-methods}
and the you can then reference this section in the text by adding the text and the @ reference like Data and methods are discussed in @sec-data-methods.
To include a figure from a file, the markdown syntax looks like:
By using #fig-name-of-image inside curly braces following the image path you can provide the reader a label for cross references. For eg.
{#fig-map fig-alt="A map of the Canary Islands. The second most west island, La Palma, is highlighted."}
Tip
It is recomended to store your in an folder named images/. Your images can be anywhere inside your manuscript project directory, just make sure you include the full path to the image, relative to the location of index.qmd.
To publish your site on GitHub Pages simply tipe
Choose GitHub Pages or the platform you prefer.
You can learn more about publishing at https://quarto.org/docs/publishing/
www.linkedin.com/in/betsabe1984