Skip to content

Commit

Permalink
Re-render
Browse files Browse the repository at this point in the history
  • Loading branch information
mine-cetinkaya-rundel committed May 2, 2024
1 parent 7e515f8 commit de10307
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 60 deletions.
5 changes: 3 additions & 2 deletions _freeze/html/data-import/execute-results/html.json

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions _freeze/html/lubridate/execute-results/html.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions _freeze/html/quarto/execute-results/html.json

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions _freeze/html/shiny-python/execute-results/html.json

Large diffs are not rendered by default.

9 changes: 6 additions & 3 deletions _freeze/html/sparklyr/execute-results/html.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"hash": "838cdfa44affcebdd0f5c14a01a5344f",
"hash": "dfa5d20431126ba509f25c2253692592",
"result": {
"markdown": "---\ntitle: \"Data science in Spark with sparklyr :: Cheatsheet\"\ndescription: \" \"\nimage-alt: \"\"\nexecute:\n eval: true\n output: false\n warning: false\n---\n\n::: {.cell .column-margin}\n<img src=\"images/logo-sparklyr.png\" height=\"138\" alt=\"Hex logo for sparklyr - Neon shooting stars of various shapes and sizes flying across a black and grey background.\" />\n<br><br><a href=\"../sparklyr.pdf\">\n<p><i class=\"bi bi-file-pdf\"></i> Download PDF</p>\n<img src=\"../pngs/sparklyr.png\" width=\"200\" alt=\"\"/>\n</a>\n<br><br><p>Translations (PDF)</p>\n* <a href=\"../translations/chinese/sparklyr_zh_cn.pdf\"><i class=\"bi bi-file-pdf\"></i>Chinese</a>\n* <a href=\"../translations/chinese/sparklyr_zh_tw.pdf\"><i class=\"bi bi-file-pdf\"></i>Chinese</a>\n* <a href=\"../translations/german/sparklyr_de.pdf\"><i class=\"bi bi-file-pdf\"></i>German</a>\n* <a href=\"../translations/japanese/sparklyr_ja.pdf\"><i class=\"bi bi-file-pdf\"></i>Japanese</a>\n* <a href=\"../translations/spanish/sparklyr_es.pdf\"><i class=\"bi bi-file-pdf\"></i>Spanish</a>\n:::\n\n\n<!-- Page 1 -->\n\nHTML version coming soon! The PDF is available for download [here](../sparklyr.pdf)",
"supporting": [],
"engine": "knitr",
"markdown": "---\ntitle: \"Data science in Spark with sparklyr :: Cheatsheet\"\ndescription: \" \"\nimage-alt: \"\"\nexecute:\n eval: true\n output: false\n warning: false\n---\n\n::: {.cell .column-margin}\n<img src=\"images/logo-sparklyr.png\" height=\"138\" alt=\"Hex logo for sparklyr - Neon shooting stars of various shapes and sizes flying across a black and grey background.\" />\n<br><br><a href=\"../sparklyr.pdf\">\n<p><i class=\"bi bi-file-pdf\"></i> Download PDF</p>\n<img src=\"../pngs/sparklyr.png\" width=\"200\" alt=\"\"/>\n</a>\n<br><br><p>Translations (PDF)</p>\n* <a href=\"../translations/chinese/sparklyr_zh_cn.pdf\"><i class=\"bi bi-file-pdf\"></i>Chinese</a>\n* <a href=\"../translations/chinese/sparklyr_zh_tw.pdf\"><i class=\"bi bi-file-pdf\"></i>Chinese</a>\n* <a href=\"../translations/german/sparklyr_de.pdf\"><i class=\"bi bi-file-pdf\"></i>German</a>\n* <a href=\"../translations/japanese/sparklyr_ja.pdf\"><i class=\"bi bi-file-pdf\"></i>Japanese</a>\n* <a href=\"../translations/spanish/sparklyr_es.pdf\"><i class=\"bi bi-file-pdf\"></i>Spanish</a>\n:::\n\n\n\n\n<!-- Page 1 -->\n\nHTML version coming soon!\nThe PDF is available to download [here](../sparklyr.pdf).\n",
"supporting": [
"sparklyr_files"
],
"filters": [
"rmarkdown/pagebreak.lua"
],
Expand Down
Binary file modified html/images/logo-lubridate.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified html/images/logo-readr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified html/images/logo-shiny.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified html/images/logo-sparklyr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
110 changes: 60 additions & 50 deletions html/quarto.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,20 @@ translation_list(sheet_name)

## Overview

![](images/quarto-illustration.png){fig-alt="A schematic representing the multi-language input (e.g. Python, R, Observable, Julia) and multi-format output (e.g. PDF, html, Word documents, and more) versatility of Quarto."}[^credit]
![](images/quarto-illustration.png){fig-alt="A schematic representing the multi-language input (e.g. Python, R, Observable, Julia) and multi-format output (e.g. PDF, html, Word documents, and more) versatility of Quarto."}[^1]

[^credit]: Artwork from "Hello, Quarto" keynote by Julia Lowndes and Mine Çetinkaya-Rundel, presented at RStudio Conference 2022. Illustrated by [Allison Horst](https://allisonhorst.com/allison-horst).
[^1]: Artwork from "Hello, Quarto" keynote by Julia Lowndes and Mine Çetinkaya-Rundel, presented at RStudio Conference 2022.
Illustrated by [Allison Horst](https://allisonhorst.com/allison-horst).

* **Author**: Write and code in plain text. Author documents as .qmd files, or Jupyter notebooks. Write in a rich Markdown syntax.
- **Author**: Write and code in plain text.
Author documents as .qmd files, or Jupyter notebooks.
Write in a rich Markdown syntax.

* **Render**: Generate documents, presentations and more. Produce HTML, PDF, MS Word, reveal.js, MS Powerpoint, Beamer, websites, blogs, books...
- **Render**: Generate documents, presentations and more.
Produce HTML, PDF, MS Word, reveal.js, MS Powerpoint, Beamer, websites, blogs, books...

* **Share**: Share your work with the world. Quickly deploy to GitHub Pages, Netlify, Quarto Pub, Posit Cloud, or Posit Connect.
- **Share**: Share your work with the world.
Quickly deploy to GitHub Pages, Netlify, Quarto Pub, Posit Cloud, or Posit Connect.

### Get Quarto

Expand All @@ -53,7 +58,7 @@ Or, use version **bundled with RStudio.**

### Source File: hello.qmd

````{.markdown}
```` markdown
---
title: "Hello, Penguins"
format: html
Expand Down Expand Up @@ -87,37 +92,39 @@ penguins |>

### Highlights in the source file

* Set format(s) and options. Use YAML Syntax.

```` markdown
- Set format(s) and options.
Use YAML Syntax.

``` markdown
---
title: "Hello, Penguins"
format: html
execute:
echo: false
---
````
```

- `## Write with **Markdown**`

**RStudio**: Help \> Markdown Quick Reference

* `## Write with **Markdown**`

**RStudio**: Help > Markdown Quick Reference

RStudio & VS Code: Use the **Visual Editor**

```` markdown
``` markdown
## Meet the penguins

The `penguins` data contains size measurements for
penguins from three islands in the Palmer Archipelago,
Antarctica.

The three species of penguins have quite distinct
distributions of physical dimensions (@fig-penguins).
````

* Include code. R, Python, Julia, Observable, or any language with a Jupyter kernel.
```

- Include code.
R, Python, Julia, Observable, or any language with a Jupyter kernel.

````markdown
```` markdown
```{{r}}
#| label: fig-penguins
#| fig-cap: "Dimensions of penguins across three species."
Expand All @@ -135,17 +142,20 @@ penguins |>

### Use a tool with a rich authoring experience

[RStudio](https://posit.co/products/open-source/rstudio/), or
[RStudio](https://posit.co/products/open-source/rstudio/), or\
[Visual Studio Code](https://code.visualstudio.com/) + [Quarto extension](https://marketplace.visualstudio.com/items?itemName=quarto.quarto)

* **Run** code cells as you write
* **Render** with a button or keyboard shortcut
* Edit Quarto documents with a **Visual Editor**

- **Run** code cells as you write

- **Render** with a button or keyboard shortcut

- Edit Quarto documents with a **Visual Editor**

![](images/quarto-visual-editor.png){fig-alt="Screenshot of the Visual Editor toolbar. Toolbar shows menu items: Normal with dropdown, bold, italics, code, bulleted list, numbered list, link, image, Format dropdown, Insert dropdown and Table dropdown."}

- Apply formatting in Visual Editor. Saved as Markdown in source.


- Apply formatting in Visual Editor.
Saved as Markdown in source.

- Insert elements like code cells, cross references, and more.

### Or any text editor
Expand All @@ -154,25 +164,28 @@ Quarto documents (.qmd) can be edited in any tool that edits text.

## Render

**Save,** then render to **preview** the document output.
**Save,** then render to **preview** the document output.

```{.bash filename="Terminal"}
``` {.bash filename="Terminal"}
quarto preview hello.qmd
```

RStudio & VS Code: Use **Render** button

The resulting HTML/PDF/MS Word/etc. document will be created and saved in the same directory as the source .qmd file.
The resulting HTML/PDF/MS Word/etc.
document will be created and saved in the same directory as the source .qmd file.

### Rendered output: hello.html

![](images/quarto-rendered-output.png){fig-alt="Screenshot of a webpage with the title 'Hello, Penguins'. There is a subheading 'Meet the penguins' followed by a paragraph of text including a link to 'Figure 1', then a scatterplot."}

### Highlights in the rendered output

* Features for scientific publishing. Cross references, citations, equations, and more.
- Features for scientific publishing.
Cross references, citations, equations, and more.

* Output integrated into document. Control how output appears with special comments in your code.
- Output integrated into document.
Control how output appears with special comments in your code.

### Behind the Scenes

Expand All @@ -181,7 +194,6 @@ When you render a document, Quarto:
1. Runs the code and embeds results and text into an .md file with:
- **Knitr**, if any `{r}` cells, or
- **Jupyter**, if any other cells.

2. Converts the .md file into the output format with Pandoc.

## Publish
Expand All @@ -196,9 +208,11 @@ RStudio: Use **Publish** button ![](images/quarto-rstudio-publish.png){fig-alt="

- [**Quarto Pub**](https://quartopub.com/) Free publishing service for Quarto content.

- [**Posit Cloud**](https://posit.cloud/) Cloud-hosted, control access to project and output. ![](images/quarto-rstudio-publish.png){fig-alt="Push button publishing from RStudio" width="10%"}
- [**Posit Cloud**](https://posit.cloud/) Cloud-hosted, control access to project and output.
![](images/quarto-rstudio-publish.png){fig-alt="Push button publishing from RStudio" width="10%"}

- [**Posit Connect**](https://posit.co/products/enterprise/connect/) Org-hosted, control access, schedule updates. ![](images/quarto-rstudio-publish.png){fig-alt="Push button publishing from RStudio" width="10%"}
- [**Posit Connect**](https://posit.co/products/enterprise/connect/) Org-hosted, control access, schedule updates.
![](images/quarto-rstudio-publish.png){fig-alt="Push button publishing from RStudio" width="10%"}

## Quarto Projects

Expand Down Expand Up @@ -240,7 +254,8 @@ Other languages: `{julia}`, `{ojs}`

Add code cell options with `#|` comments.

Cell options control [**execution**](#execution), [figures](#figures), [tables](#tables), layout and more. See them all at: <https://quarto.org/docs/reference/cells/>
Cell options control [**execution**](#execution), [figures](#figures), [tables](#tables), layout and more.
See them all at: <https://quarto.org/docs/reference/cells/>

### Execution Options {#execution}

Expand Down Expand Up @@ -276,7 +291,7 @@ Set execution options at the **cell level**:

Set options in code cells with `#|` comments and YAML syntax: `key: value`.

Or globally in the YAML header with the **execute** option:
Or globally in the YAML header with the **execute** option:

``` yaml
---
Expand All @@ -287,7 +302,8 @@ execute:

### Inline Code

Use computed values directly in text sections. Code is evaluated at render and results appear as text.
Use computed values directly in text sections.
Code is evaluated at render and results appear as text.

::: {layout-ncol="3"}
<div>
Expand Down Expand Up @@ -319,8 +335,7 @@ Value is `r 2*2`.

## Set Formats and Options

::: {layout-ncol=2}

::: {layout-ncol="2"}
::: {#set-options}
### Set Format Options

Expand All @@ -339,7 +354,6 @@ format:
:::

::: {#multiple-formats}

### Multiple Formats

``` yaml
Expand All @@ -354,11 +368,11 @@ format:
```

- Top-level options (e.g. `toc`) apply to all formats

:::
:::

Common values for `format`: html, pdf[^2], docx, odt, rtf, gfm, pptx, revealjs, beamer[^3]
Common values for `format`: html, pdf[^2], docx, odt, rtf, gfm, pptx, revealjs, beamer
[^3]

[^2]: PDFs and Beamer slides require LaTeX, use:

Expand All @@ -372,7 +386,6 @@ Common values for `format`: html, pdf[^2], docx, odt, rtf, gfm, pptx, revealjs,
quarto install tinytex
```


Render **all** formats:

``` {.bash filename="Terminal"}
Expand All @@ -385,7 +398,6 @@ Render a **specific** format:
quarto render hello.qmd --to pdf
```


### Output Options Table

```{r}
Expand Down Expand Up @@ -418,7 +430,6 @@ format_options |>

Visit <https://quarto.org/docs/reference/> to see all options by format


## Add Content

### Figures {#figures}
Expand Down Expand Up @@ -494,7 +505,6 @@ Markdown(df.to_markdown(index=False))
</div>
:::


### Cross References

1. **Add labels:**
Expand Down Expand Up @@ -527,7 +537,7 @@ Markdown(df.to_markdown(index=False))

2. Add citations: `[@citation]`, or `@citation`

RStudio & VS Code: Use **Insert Citations** dialog in the Visual Editor.
RStudio & VS Code: Use **Insert Citations** dialog in the Visual Editor.
Build your bibliography file from your Zotero library, DOI, Crossref, DataCite, or PubMed.

### Callouts
Expand Down

0 comments on commit de10307

Please sign in to comment.