-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdelete_dashboard.qmd
109 lines (77 loc) · 1.82 KB
/
delete_dashboard.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
---
title: "Palmer Penguins"
format: dashboard
---
```{python}
#| include: false
from palmerpenguins import load_penguins
penguins = load_penguins()
ojs_define(penguins_OJS = penguins)
```
# Page 1
## Row
```{python}
#| content: valuebox
#| title: "Penguin Count"
#| color: primary
len(penguins)
```
```{python}
#| content: valuebox
#| title: "Penguin Count"
#| color: green
len(penguins)
```
::: {.card title="My Title"}
This text will be displayed within a card
:::
## Row {height=70%}
```{python}
penguins.head()
```
```{python}
#| title: Option 2
from IPython.display import Markdown
from tabulate import tabulate
Markdown(
tabulate(penguins, showindex=False,
headers=penguins.columns)
)
```
## Row {height=30%}
### Column {.tabset}
```{python}
#| title: Chart 2
print("1")
```
```{python}
#| title: Chart 3
print("1")
```
### Column
```{python}
print("1")
```
::: {.card title="My Title"}
This text will be displayed within a card
:::
# Page 2
I'm thinking that if you use ggplot2 and you want interactivity, the solution is shiny.
If you think shiny is a little silly and would prefer a more professional approach and still be in Quarto, use observable. It has plotting capabilities and interactive user input capabilities. The R/Python to ObservableJS connection is `ojs_define()`. I would not wrangle in observable though.
At the same time, if you're in the R space, use R things!
```{python}
# import pandas as pd
# penguins = pd.read_csv("palmer-penguins.csv")
ojs_define(data2 = penguins)
```
```{ojs}
filtered = transpose(data2).filter(function(penguin) {
return penguin.bill_length_mm;
})
```
```{ojs}
Plot.dot(
penguins,
{x: "bill_length_mm", y: "bill_depth_mm"}
).plot()
```