<beginfold id='1'>---</beginfold id='1'>
title: <beginfold id='2'>"</beginfold id='2'>Hello, Quarto<endfold id='2'>"</endfold id='2'>
format: html
editor: visual
<endfold id='1'>---</endfold id='1'>

<beginfold id='3'>```{r}</beginfold id='3'>
#| label: load-packages
#| include: false

library(tidyverse)
library(palmerpenguins)
<endfold id='3'>```</endfold id='3'>

<endfold id='4'></endfold id='4'><beginfold id='4'></beginfold id='4'><endfold id='5'></endfold id='5'><endfold id='6'></endfold id='6'><endfold id='7'></endfold id='7'><endfold id='8'></endfold id='8'>## This example

This example code mostly from the Quatro guide: https://quarto.org/docs/guide/ . GPL-2.

Quarto is very similar to R markdown, but also allows (inline) code blocks in Python, Julia, and Observable JS.

<endfold id='4'></endfold id='4'><beginfold id='4'></beginfold id='4'><endfold id='5'></endfold id='5'><endfold id='6'></endfold id='6'><endfold id='7'></endfold id='7'><endfold id='8'></endfold id='8'>## Meet Quarto

Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.

<endfold id='4'></endfold id='4'><beginfold id='4'></beginfold id='4'><endfold id='5'></endfold id='5'><endfold id='6'></endfold id='6'><endfold id='7'></endfold id='7'><endfold id='8'></endfold id='8'>## Meet the penguins

![](https://raw.githubusercontent.com/quarto-dev/quarto-web/main/docs/get-started/hello/rstudio/lter_penguins.png){style="float:right;" fig-alt="Illustration of three species of Palmer Archipelago penguins: Chinstrap, Gentoo, and Adelie. Artwork by @allison_horst." width="401"}

The `penguins` data from the [**palmerpenguins**](https://allisonhorst.github.io/palmerpenguins "palmerpenguins R package") package contains size measurements for `{r} nrow(penguins)` penguins from three species observed on three islands in the Palmer Archipelago, Antarctica.

The plot below shows the relationship between flipper and bill lengths of these penguins.

<beginfold id='3'>```{r}</beginfold id='3'>
#| label: plot-penguins
#| warning: false
#| echo: false
# NOTE: We may want to add some sort of ighlighting for the above rendering options

ggplot(penguins, 
       aes(x = flipper_length_mm, y = bill_length_mm)) +
  geom_point(aes(color = species, shape = species)) +
  scale_color_manual(values = c("darkorange","purple","cyan4")) +
  labs(
    title = "Flipper and bill length",
    subtitle = "Dimensions for penguins at Palmer Station LTER",
    x = "Flipper length (mm)", y = "Bill length (mm)",
    color = "Penguin species", shape = "Penguin species"
  ) +
  theme_minimal()
<endfold id='3'>```</endfold id='3'>


<beginfold id='9'>```{python}</beginfold id='9'>
#| label: fig-polar
#| fig-cap: "A line plot on a polar axis"

import numpy as np
import matplotlib.pyplot as plt

r = np.arange<beginfold id='10'>(</beginfold id='10'>0, 2, 0.01<endfold id='10'>)</endfold id='10'>
theta = 2 * np.pi * r
fig, ax = plt.subplots<beginfold id='10'>(</beginfold id='10'>
  subplot_kw = <beginfold id='11'>{</beginfold id='11'>'projection': 'polar'<endfold id='11'>}</endfold id='11'> 
<endfold id='10'>)</endfold id='10'>
ax.plot<beginfold id='10'>(</beginfold id='10'>theta, r<endfold id='10'>)</endfold id='10'>
ax.set_rticks<beginfold id='10'>(</beginfold id='10'><beginfold id='12'>[</beginfold id='12'>0.5, 1, 1.5, 2<endfold id='12'>]</endfold id='12'><endfold id='10'>)</endfold id='10'>
ax.grid<beginfold id='10'>(</beginfold id='10'>True<endfold id='10'>)</endfold id='10'>
plt.show<beginfold id='10'>(</beginfold id='10'><endfold id='10'>)</endfold id='10'>
<endfold id='9'>```</endfold id='9'>

<beginfold id='13'>```{julia}</beginfold id='13'>
#| label: fig-parametric
#| fig-cap: "Parametric Plots"

using Plots

plot(sin, 
     x->sin(2x), 
     0, 
     2π, 
     leg=false, 
     fill=(0,:lavender))
<endfold id='13'>```</endfold id='13'>

<beginfold id='14'>```{ojs}</beginfold id='14'>
viewof bill_length_min = Inputs.range(
  <beginfold id='15'>[</beginfold id='15'>32, 50<endfold id='15'>]</endfold id='15'>, 
  <beginfold id='16'>{</beginfold id='16'>value: 35, step: 1, label: "Bill length (min):"<endfold id='16'>}</endfold id='16'>
)
viewof islands = Inputs.checkbox(
  <beginfold id='15'>[</beginfold id='15'>"Torgersen", "Biscoe", "Dream"<endfold id='15'>]</endfold id='15'>, 
  <beginfold id='16'>{</beginfold id='16'> value: <beginfold id='15'>[</beginfold id='15'>"Torgersen", "Biscoe"<endfold id='15'>]</endfold id='15'>, 
    label: "Islands:"
  <endfold id='16'>}</endfold id='16'>
)
<endfold id='14'>```</endfold id='14'>
