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 experimentiere mit dem UV -Paketmanager für Python. Manchmal möchte ich kurz ein Paket ausprobieren, aber ich möchte es nicht für die Abhängigkeiten meines Projekts verpflichten, bis ich weiß,...
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...
In dieser Frage geht es nicht um aktuelle Abhängigkeiten, was für diese andere Frage der Fall ist, gegen die jemand diese Frage betrogen hat. Ich werde am Ende ein Modell zum Modell hinzufügen, um...
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...