-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.qmd
50 lines (38 loc) · 873 Bytes
/
index.qmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
---
title: "Gapminder: Example Quarto Report"
author: "The GRAPH Courses"
format: html
---
This is a Quarto report with a table, a scatter plot, and a map using the Gapminder dataset, Plotly, and itables.
::: {.panel-tabset}
## Table
```{python}
from itables import show
import plotly.express as px
# Load Gapminder dataset
gapminder = px.data.gapminder()
# Display table
show(gapminder.head())
```
## Scatter Plot
```{python}
px.scatter(
gapminder.query("year == 2007"),
x="gdpPercap",
y="lifeExp",
color="continent",
title="GDP vs Life Expectancy (2007)"
)
```
## Map
```{python}
px.choropleth(
gapminder.query("year == 2007"),
locations="iso_alpha",
color="lifeExp",
hover_name="country",
title="Life Expectancy (2007)",
)
```
:::
Sample quarto report from the GRAPH Courses python bootcamp (thegraphcourses.org/pbb).