import seaborn as sns
import matplotlib.pyplot as plt
= sns.load_dataset("mpg")
mpg =mpg, x="horsepower", y="mpg")
sns.scatterplot(data plt.show()
Hola Quarto
compartir • colaborar • enseñar • reimaginar
Francisco Alfaro Medina
Valeska Canales Pozo
Quarto es un sistema abierto de
publicación científica y técnica
Quarto es un sistema abierto de
publicación científica y técnica
el objetivo es hacer que el proceso de creación
y colaboración sea drásticamente mejor
Un solo documento, múltiples formatos: HTML, PDF, presentaciones o sitios web.
Materiales más accesibles y fáciles de usar, con soporte para la enseñanza y la inclusión.
Fácil de aprender: usa Markdown simple y cuenta con ayudas para empezar rápido.
Flexibilidad total: integra texto, imágenes y código en R, Python, Julia u otros lenguajes.
quarto check
en la terminalCódigo: hello.qmd
---
title: "Hello, Quarto"
format: html
editor: visual
---
## 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>.
## Meet the penguins
{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.
HTML: hello.html
Código: example.qmd
---
title: "Habits"
author: "John Doe"
format:
revealjs:
transition: fade
theme: black
toc: true
center: true
---
## Getting up
- Turn off alarm
- Get out of bed
---
## Going to sleep
::: { .incremental }
- Get in bed
- Count sheep
:::
Slides: example.html
Renderizado de ecuaciones a HTML con MathJax.
Acomoda texto, imágenes o código en columnas de varios tamaños.
The data was extracted from the 1974 Motor Trend US magazine, and comprises fuel consumption and 10 aspects of automobile design and performance for 32 automobiles.
mpg | cyl | disp | hp | wt |
---|---|---|---|---|
18.000000 | 8 | 307.000000 | 130.000000 | 3504 |
15.000000 | 8 | 350.000000 | 165.000000 | 3693 |
18.000000 | 8 | 318.000000 | 150.000000 | 3436 |
16.000000 | 8 | 304.000000 | 150.000000 | 3433 |
17.000000 | 8 | 302.000000 | 140.000000 | 3449 |
Crea bloques con pestañas que permiten alternar entre distintos contenidos.
Las extensiones de Quarto permiten añadir nuevas características y potenciar su uso.
🔧Necesitas más poder? Usa Extensions
La extensión Quarto Quiz permite crear preguntas directamente en tus presentaciones.
📚 Más info: Quarto Quiz Extension
¿Cómo te ha parecido la presentación hasta ahora?
Shiny es un paquete de R que permite crear de manera sencilla aplicaciones interactivas usando R
(también disponible para Python).
📚 Más info: Shiny - Posit
Sigue en tu presentación.
No pierdas el ritmo 🎯
#| '!! shinylive warning !!': |
#| shinylive does not work in self-contained HTML documents.
#| Please set `embed-resources: false` in your metadata.
#| standalone: true
#| viewerHeight: 800
from shiny import App, ui, render, reactive
import matplotlib.pyplot as plt
import io
import base64
# Function to generate the plot dynamically based on input values
def create_plot(yes_value, no_value):
categories = ['Sí', 'No']
values = [yes_value, no_value]
fig, ax = plt.subplots(figsize=(14, 5))
ax.bar(categories, values, color=['lightblue', 'salmon'])
ax.set_title('¿Te ha gustado la presentación?')
# Convert the image to base64 for display in Shiny
buf = io.BytesIO()
plt.savefig(buf, format="png")
plt.close(fig)
buf.seek(0)
encoded_image = base64.b64encode(buf.getvalue()).decode()
return f'<img src="data:image/png;base64,{encoded_image}" style="max-width:100%;">'
# UI definition
app_ui = ui.page_fluid(
ui.h2("Encuesta Interactiva"),
# Sliders to change values dynamically
ui.input_slider("yes_value", "Respuestas 'Sí':", min=0, max=50, value=20),
ui.input_slider("no_value", "Respuestas 'No'", min=0, max=50, value=10),
# Output area for the plot
ui.output_ui("plot_output")
)
# Server function
def server(input, output, session):
@output
@render.ui
def plot_output():
return ui.HTML(create_plot(input.yes_value(), input.no_value()))
# Create the Shiny app
app = App(app_ui, server)
Compartir: Un mismo .qmd
genera HTML, PDF, slides o sitios web, pasando de lo estático a lo interactivo.
Colaborar: Con un archivo sencillo ya se puede crear y publicar material reproducible, iniciando el trabajo en equipo.
Enseñar: Sus features integran texto, código y visualizaciones, mejorando la enseñanza con recursos dinámicos.
Reimaginar: Tecnologías como WebR, Pyodide o Shiny abren nuevas formas de aprender e innovar en educación.
Documentación oficial
🔗 quarto.org
Guías y ejemplos prácticos para comenzar de inmediato.
Aprendizaje en video
🔗 Crash Course en YouTube
Introducción práctica a Quarto y sus distintos usos.
Recursos de la comunidad
🔗 Mine Cetinkaya-Rundel
Cursos, libros y presentaciones en Quarto en GitHub.
Aplicaciones en educación
🔗 sethnut.com/resources
Olimpiada Matemática, Verano Matemático, EMMA y más!
🔗 Nuestro Sitio Web: seth-nut.github.io/resources