Add new features and updates to dibujar.py and pygwalker_visualizaciones.py

- Introduced a new markdown cell in dibujar.py to enhance user guidance for drawing with the mouse.
- Updated the version in pygwalker_visualizaciones.py from 0.15.1 to 0.15.2.
- Added a new markdown cell in pygwalker_visualizaciones.py for interactive EDA with PyGWalker.
- Refactored return values in pygwalker_visualizaciones.py to streamline data handling.
- Modified Graficos_plotly.grid.json to include additional layout positions.
This commit is contained in:
2025-09-08 03:02:01 +02:00
parent 2e7c80bae8
commit 527d9dfa00
11 changed files with 227 additions and 68 deletions
+13 -7
View File
@@ -1,17 +1,28 @@
import marimo import marimo
__generated_with = "0.15.1" __generated_with = "0.15.2"
app = marimo.App(width="columns") app = marimo.App(width="columns")
@app.cell(column=0) @app.cell(column=0)
def _(): def _():
import marimo as mo import marimo as mo
return (mo,)
@app.cell
def _(mo):
mo.md(r"""# Altair: graficos interactivos""")
return
@app.cell
def _():
from vega_datasets import data from vega_datasets import data
import altair as alt import altair as alt
import pandas as pd import pandas as pd
import pyarrow import pyarrow
return alt, data, mo, pd return alt, data, pd
@app.cell @app.cell
@@ -64,7 +75,6 @@ def _(alt, mo, pd):
bar_chart1 = mo.ui.altair_chart(_bar_chart1) bar_chart1 = mo.ui.altair_chart(_bar_chart1)
bar_chart1 bar_chart1
return bar_chart1, dataset return bar_chart1, dataset
@@ -123,7 +133,6 @@ def _(alt, data, mo):
weather_chart2 = mo.ui.altair_chart(layered_chart2) weather_chart2 = mo.ui.altair_chart(layered_chart2)
weather_chart2 weather_chart2
return dataset_weather2, weather_chart2 return dataset_weather2, weather_chart2
@@ -197,7 +206,6 @@ def _(alt, data, mo):
movies_chart3 = mo.ui.altair_chart(layered_movies3) movies_chart3 = mo.ui.altair_chart(layered_movies3)
movies_chart3 movies_chart3
return return
@@ -237,7 +245,6 @@ def _(alt, data, mo):
movies_rect4 = mo.ui.altair_chart(rect4.add_params(pts4)) movies_rect4 = mo.ui.altair_chart(rect4.add_params(pts4))
movies_rect4 movies_rect4
return dataset_movies4, pts4, x1, y1 return dataset_movies4, pts4, x1, y1
@@ -257,7 +264,6 @@ def _(alt, dataset_movies4, mo, pts4, x1, y1):
movies_circ4 = mo.ui.altair_chart(circ4) movies_circ4 = mo.ui.altair_chart(circ4)
movies_circ4 movies_circ4
return return
+13 -2
View File
@@ -9,8 +9,19 @@ app = marimo.App(
@app.cell @app.cell
def _(): def _():
# Cell 1: gráfico Plotly (reactivo)
import marimo as mo import marimo as mo
return (mo,)
@app.cell(hide_code=True)
def _(mo):
mo.md(r""" # Plotly: Graficos interactivos con plotly""")
return
@app.cell
def _(mo):
# Cell 1: gráfico Plotly (reactivo)
import pandas as pd import pandas as pd
import plotly.express as px import plotly.express as px
import numpy as np import numpy as np
@@ -28,7 +39,7 @@ def _():
plot = mo.ui.plotly(fig) # Solo scatter/treemap/sunburst soportan selección reactiva plot = mo.ui.plotly(fig) # Solo scatter/treemap/sunburst soportan selección reactiva
plot plot
return df, mo, np, pd, plot, px return df, np, pd, plot, px
@app.cell @app.cell
+9 -2
View File
@@ -6,6 +6,13 @@ app = marimo.App(width="medium")
@app.cell @app.cell
def _(): def _():
import marimo as mo
return (mo,)
@app.cell
def _(mo):
mo.md(r"""# Wigglystuff: widgets interactivos""")
return return
@@ -279,13 +286,13 @@ def _(mo):
@app.cell @app.cell
def _(): def _():
import altair as alt import altair as alt
import marimo as mo # import marimo as mo
import micropip import micropip
import numpy as np import numpy as np
import pandas as pd import pandas as pd
# await micropip.install("wigglystuff==0.1.1") # await micropip.install("wigglystuff==0.1.1")
return alt, mo, np, pd return alt, np, pd
@app.cell @app.cell
+35 -2
View File
@@ -1,13 +1,46 @@
{ {
"version": "1", "version": "1",
"metadata": { "metadata": {
"marimo_version": "0.15.1" "marimo_version": "0.15.2"
}, },
"cells": [ "cells": [
{
"id": "ABIT",
"code_hash": "1d0db38904205bec4d6f6f6a1f6cec3e",
"outputs": [
{
"type": "data",
"data": {
"text/plain": ""
}
}
],
"console": []
},
{
"id": "DhHd",
"code_hash": "0a5af7d2e3c1f5f359897f5fbbb24070",
"outputs": [
{
"type": "data",
"data": {
"text/html": "<span class=\"markdown prose dark:prose-invert\"><h1 id=\"altair-graficos-interactivos\">Altair: graficos interactivos</h1></span>"
}
}
],
"console": []
},
{ {
"id": "Hbol", "id": "Hbol",
"code_hash": "0914bd1bbeb9727790bfe2b5da7b0eb3", "code_hash": "0914bd1bbeb9727790bfe2b5da7b0eb3",
"outputs": [], "outputs": [
{
"type": "error",
"ename": "multiple-defs",
"evalue": "The variable 'mo' was defined by another cell",
"traceback": []
}
],
"console": [] "console": []
}, },
{ {
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+6
View File
@@ -10,6 +10,12 @@ def _():
return (mo,) return (mo,)
@app.cell
def _(mo):
mo.md(r""" # Dibujar: Dibujar con el raton y recibir la imagen""")
return
@app.cell @app.cell
def _(): def _():
from modraw import Draw from modraw import Draw
+6
View File
@@ -15,6 +15,12 @@
{ {
"position": null "position": null
}, },
{
"position": null
},
{
"position": null
},
{ {
"position": [ "position": [
0, 0,
+14 -2
View File
@@ -1,6 +1,6 @@
import marimo import marimo
__generated_with = "0.15.1" __generated_with = "0.15.2"
app = marimo.App(width="medium") app = marimo.App(width="medium")
@@ -8,6 +8,18 @@ app = marimo.App(width="medium")
def _(): def _():
# Cell 1 — Imports y utilidades # Cell 1 — Imports y utilidades
import marimo as mo import marimo as mo
return (mo,)
@app.cell
def _(mo):
mo.md(r"""# PyGWalker: EDA rapido e interactivo con pygwalker""")
return
@app.cell
def _():
import os import os
import pandas as pd import pandas as pd
import numpy as np import numpy as np
@@ -25,7 +37,7 @@ def _():
DATASET_URLS: Dict[str, str] = { DATASET_URLS: Dict[str, str] = {
"Bike Sharing (DC)": "https://kanaries-app.s3.ap-northeast-1.amazonaws.com/public-datasets/bike_sharing_dc.csv", "Bike Sharing (DC)": "https://kanaries-app.s3.ap-northeast-1.amazonaws.com/public-datasets/bike_sharing_dc.csv",
} }
return DATASET_URLS, mo, pd, pyg, vega_data return DATASET_URLS, pd, pyg, vega_data
@app.cell @app.cell