Interactive explorer with 6 tabs: - ASP Pricing: product-level time series with $127.28 flat rate line - Market: manufacturer revenue bar chart, product category breakdown - Geographic: state spend/bene, MAC jurisdiction comparison - Setting: specialty x setting spend analysis - Anomaly: provider risk scatter (volume vs intensity z-scores) - Evidence: source distribution, study characteristics summary Snippet: skin-subs-connect.py for quick DuckDB table inventory. Updated snippet count test from 10 to 11.
45 lines
743 B
Python
45 lines
743 B
Python
import marimo
|
|
|
|
__generated_with = "0.20.4"
|
|
app = marimo.App()
|
|
|
|
|
|
@app.cell
|
|
def _(mo):
|
|
mo.md(r"""
|
|
# Skin Substitutes: Connect to DuckDB
|
|
|
|
Load all 17 skin_subs tables for analysis.
|
|
""")
|
|
return
|
|
|
|
|
|
@app.cell
|
|
def _():
|
|
import polars as pl
|
|
from conf import connect
|
|
|
|
con = connect.duckdb()
|
|
|
|
# Quick inventory
|
|
tables = con.execute("""
|
|
SELECT table_name, (
|
|
SELECT count(*) FROM skin_subs. || table_name
|
|
) as row_count
|
|
FROM information_schema.tables
|
|
WHERE table_schema = 'skin_subs'
|
|
ORDER BY table_name
|
|
""").fetchdf()
|
|
return con, connect, pl, tables
|
|
|
|
|
|
@app.cell
|
|
def _():
|
|
import marimo as mo
|
|
|
|
return (mo,)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
app.run()
|