maridemo / app.py
davidgasquez's picture
Upload 2 files
868b9c4 verified
raw
history blame contribute delete
765 Bytes
import marimo
__generated_with = "0.8.11"
app = marimo.App(width="medium", app_title="Marimo Example")
@app.cell
def __():
import marimo as mo
return mo,
@app.cell
def __(mo):
mo.md("""Hello World!""")
return
@app.cell
def __(mo):
lineitem = mo.sql(
f"""
SELECT * FROM 'https://shell.duckdb.org/data/tpch/0_01/parquet/lineitem.parquet';
"""
)
return lineitem,
@app.cell
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
@app.cell
def __(chart, mo):
mo.vstack([chart, chart.value])
return
if __name__ == "__main__":
app.run()