Ich versuche, eine Shinylive -App in ein Quarto -Dashboard einzubetten. Die APP lässt den Benutzer eine kategoriale Variable in einer Seeborn -Barplot auswählen.
Error starting app!
Traceback (most recent call last):
File "", line 362, in _start_app
ModuleNotFoundError: The module 'shiny' is included in the Pyodide distribution, but it is not installed.
You can install it by calling:
await micropip.install("shiny") in Python, or
await pyodide.loadPackage("shiny") in JavaScript
See https://pyodide.org/en/stable/usage/loading-packages.html for more details.
< /code>
derzeit in meinem [b]_quarto.yml
```{python py_load_deps}
#| echo: false
# data munging & viz
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import seaborn as sns
import plotly.express as px
```
## Row
Some explainer text.
## Row
```{shinylive-python}
#| standalone: true
#| title: Grouped Bar Plot - NOV 2023
## file: dat/filename.xlsx
from shiny import *
import pandas as pd
import numpy as np
import seaborn as sns
from pathlib import Path
# UI
app_ui = ui.page_fluid(
ui.input_select(
"select_items",
"select items:",
dat().item.unique().tolist(),
multiple = True
),
ui.output_plot("plot")
)
# server
def server(input, output, session):
@reactive.calc
def dat():
v_path = Path(__file__).parent.resolve() / "dat/filename.xlsx"
dict_types = {"item": str, "value": np.float64, "value2": np.float64}
df_summary = pd.read_excel(v_path, sheet_name="sheet_name", usecols="A:D", dtype=dict_types)
df_summary_grp = df_summary.melt(id_vars='item', value_vars=['value1', 'value2'])
df_summary_grp = df_summary_grp.reset_index()
return df_summary_grp
@reactive.calc
def items():
return dat().item.unique().tolist()
@output
@render.plot(alt="Grouped Bar of Items")
def plot():
g_ax_item_grp = sns.barplot(y='item', x='values', hue='variable', data=dat().loc[dat()[['item']].isin[input.select_item()]])
g_ax_item_grp.set_xlabel(None)
sns.move_legend(g_ax_item_grp, loc="lower center", bbox_to_anchor=(-.4,-.3), ncol=2, title=None, frameon=False)
return g_ax_item_grp
# app
app = App(app_ui, server)
```
Ich habe überprüft, ob alle Pakete installiert sind, und haben versucht, micropip.install ('Shiny') zum in der Fehlermeldung angegebenen Shinylive -Block hinzuzufügen, aber ohne Verfügbarkeit.
Ich versuche, eine Shinylive -App in ein Quarto -Dashboard einzubetten. Die APP lässt den Benutzer eine kategoriale Variable in einer Seeborn -Barplot auswählen.[code]Error starting app!
Traceback (most recent call last): File "", line 362, in _start_app ModuleNotFoundError: The module 'shiny' is included in the Pyodide distribution, but it is not installed. You can install it by calling: await micropip.install("shiny") in Python, or await pyodide.loadPackage("shiny") in JavaScript See https://pyodide.org/en/stable/usage/loading-packages.html for more details. < /code> derzeit in meinem [b]_quarto.yml[/code] [/b] [code]project: type: website output-dir: public
website: title: "title" navbar: left: - href: index.qmd text: Home - href: about.qmd text: About
# data munging & viz import pandas as pd import numpy as np import matplotlib.pyplot as plt import matplotlib.dates as mdates import seaborn as sns import plotly.express as px ```
## Row
Some explainer text.
## Row
```{shinylive-python} #| standalone: true
#| title: Grouped Bar Plot - NOV 2023
## file: dat/filename.xlsx
from shiny import * import pandas as pd import numpy as np import seaborn as sns from pathlib import Path
``` [/code] Ich habe überprüft, ob alle Pakete installiert sind, und haben versucht, micropip.install ('Shiny') zum in der Fehlermeldung angegebenen Shinylive -Block hinzuzufügen, aber ohne Verfügbarkeit.
Ich baue ein Quarto -Dashboard mit glänzender Laufzeit und verwende eine einfache Radiobuttons () Steuerung in der Seitenleiste:
---
title: Quarto Dashboard with Radio Buttons
format:
html:
theme:...
Ich rendere ein Quarto-Dokument in HTML, das einen Code-Chuck enthält, der mehr als 26 Figuren generiert, denen ich Untertitel hinzufüge. Quarto verwendet Buchstaben zur Unterbeschriftung von...
Ich habe ein Projekt, bei dem es in einem Verzeichnis a Python (.py) -Datei gibt. Unter dem Ordner A habe ich eine Datei mit dem Code mit dem Code:
from utils.utils import csv_file_transform...
Ich habe ein Python-Paket, das ich auf PyPi veröffentliche.
Es unterstützt jedoch kein Windows und ich möchte verhindern, dass Benutzer es unter Windows installieren.Kann das nur mit pyproject.toml...
Ich habe eine Quarto-Website, die ich in r erstellt habe. Die Website funktioniert, allerdings habe ich Bilder in die Seitenleiste eingefügt, die groß sind und vor meinem Text erscheinen, wenn ich...