Spaces:
Sleeping
Sleeping
import marimo | |
__generated_with = "0.8.11" | |
app = marimo.App(width="medium", app_title="Marimo Example") | |
def __(): | |
import marimo as mo | |
return mo, | |
def __(mo): | |
mo.md("""Hello World!""") | |
return | |
def __(mo): | |
lineitem = mo.sql( | |
f""" | |
SELECT * FROM 'https://shell.duckdb.org/data/tpch/0_01/parquet/lineitem.parquet'; | |
""" | |
) | |
return lineitem, | |
def __(lineitem, mo): | |
import altair as alt | |
chart = mo.ui.altair_chart(alt.Chart(lineitem.sample(500)).mark_point().encode( | |
x='l_quantity', | |
y='l_extendedprice' | |
)) | |
return alt, chart | |
def __(chart, mo): | |
mo.vstack([chart, chart.value]) | |
return | |
if __name__ == "__main__": | |
app.run() | |