A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
New intro gif (#208)
Akshay Agrawal3545ae315df8
diff --git a/README.md b/README.mdindex 7275e1aea2..e1ffed3c75 100644--- a/README.md+++ b/README.md@@ -25,6 +25,8 @@ environment_.pip install marimo && marimo tutorial intro```++**Highlights.** marimo is purpose-built for working with data in Python. Some key features:- **reactive**: run a cell, and marimo automatically runs cells that depend on it@@ -39,7 +41,6 @@ marimo was built from the ground up to solve many [well-known problemswith traditional notebooks](https://docs.marimo.io/faq.html#faq-jupyter).marimo is _not_ built on top of Jupyter or any other notebook or app library.-**Contents.**diff --git a/docs/_static/docs-intro.gif b/docs/_static/docs-intro.gifnew file mode 100644index 0000000000..d192397ae7Binary files /dev/null and b/docs/_static/docs-intro.gif differdiff --git a/examples/reactive_plots.py b/examples/reactive_plots.pyindex a02fce39bf..7c297b867c 100644--- a/examples/reactive_plots.py+++ b/examples/reactive_plots.py@@ -1,45 +1,20 @@import marimo-__generated_with = "0.1.28"+__generated_with = "0.1.29"app = marimo.App(width="full")-def __():- import marimo as mo- return mo,--@app.celldef __(mo):- mo.md("# Reactive plots! 🚗 ⚡")+ mo.md("# Welcome to marimo!")return@app.cell-def __(alt, data, mo):- cars = data.cars()-- brush = alt.selection_interval()- scatter = (- alt.Chart(cars)- .mark_point()- .encode(- x="Horsepower",- y="Miles_per_Gallon",- color="Origin",- )- .add_params(brush)- )- bars = (- alt.Chart(cars)- .mark_bar()- .encode(y="Origin:N", color="Origin:N", x="count(Origin):Q")- .transform_filter(brush)- )+def __(bars, mo, scatter):chart = mo.ui.altair_chart(scatter & bars)chart- return bars, brush, cars, chart, scatter+ return chart,@app.cell@@ -65,6 +40,29 @@ def __(alt, filtered_data, mo):return horsepower_hist, mpg_hist+def __(alt, data):+ cars = data.cars()+ brush = alt.selection_interval()+ scatter = (+ alt.Chart(cars)+ .mark_point()+ .encode(+ x="Horsepower",+ y="Miles_per_Gallon",+ color="Origin",+ )+ .add_params(brush)+ )+ bars = (+ alt.Chart(cars)+ .mark_bar()+ .encode(y="Origin:N", color="Origin:N", x="count(Origin):Q")+ .transform_filter(brush)+ )+ return bars, brush, cars, scatter++@app.celldef __():import altair as alt@@ -72,5 +70,11 @@ def __():return alt, data+def __():+ import marimo as mo+ return mo,++if __name__ == "__main__":app.run()