drop voice46 from scales 1-10. fix plots breakline in title
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import marimo
|
||||
|
||||
__generated_with = "0.19.2"
|
||||
app = marimo.App(width="medium")
|
||||
app = marimo.App(width="full")
|
||||
|
||||
|
||||
@app.cell
|
||||
@@ -167,17 +167,19 @@ def _(S, mo):
|
||||
''')
|
||||
|
||||
|
||||
return (filter_form,)
|
||||
return
|
||||
|
||||
|
||||
@app.cell
|
||||
def _(S, data_validated, filter_form, mo):
|
||||
mo.stop(filter_form.value is None, mo.md("**Please submit filter above to proceed**"))
|
||||
_d = S.filter_data(data_validated, age=filter_form.value['age'], gender=filter_form.value['gender'], income=filter_form.value['income'], ethnicity=filter_form.value['ethnicity'], consumer=filter_form.value['consumer'])
|
||||
def _(data_validated):
|
||||
# mo.stop(filter_form.value is None, mo.md("**Please submit filter above to proceed**"))
|
||||
# _d = S.filter_data(data_validated, age=filter_form.value['age'], gender=filter_form.value['gender'], income=filter_form.value['income'], ethnicity=filter_form.value['ethnicity'], consumer=filter_form.value['consumer'])
|
||||
|
||||
# Stop execution and prevent other cells from running if no data is selected
|
||||
mo.stop(len(_d.collect()) == 0, mo.md("**No Data available for current filter combination**"))
|
||||
data = _d
|
||||
# # Stop execution and prevent other cells from running if no data is selected
|
||||
# mo.stop(len(_d.collect()) == 0, mo.md("**No Data available for current filter combination**"))
|
||||
# data = _d
|
||||
|
||||
data = data_validated
|
||||
|
||||
data.collect()
|
||||
return (data,)
|
||||
@@ -391,28 +393,25 @@ def _(S, mo, vscales):
|
||||
mo.md(f"""
|
||||
### How does each voice score on a scale from 1-10?
|
||||
|
||||
{mo.ui.altair_chart(S.plot_average_scores_with_counts(vscales, x_label='Voice', width=1000))}
|
||||
{mo.ui.altair_chart(S.plot_average_scores_with_counts(vscales, x_label='Voice', width=1000, domain=[1,10]))}
|
||||
""")
|
||||
return
|
||||
|
||||
|
||||
@app.cell
|
||||
def _(vscales):
|
||||
target_cols=[c for c in vscales.columns if c not in ['_recordId']]
|
||||
target_cols
|
||||
return (target_cols,)
|
||||
def _(utils, vscales):
|
||||
_target_cols=[c for c in vscales.collect().columns if c not in ['_recordId']]
|
||||
vscales_row_norm = utils.normalize_row_values(vscales.collect(), target_cols=_target_cols)
|
||||
vscales_row_norm
|
||||
return (vscales_row_norm,)
|
||||
|
||||
|
||||
@app.cell
|
||||
def _(target_cols, utils, vscales):
|
||||
vscales_row_norm = utils.normalize_row_values(vscales.collect(), target_cols=target_cols)
|
||||
return
|
||||
def _(S, mo, vscales_row_norm):
|
||||
mo.md(f"""
|
||||
### Voice scale 1-10 normalized per respondent?
|
||||
|
||||
|
||||
@app.cell
|
||||
def _(mo):
|
||||
mo.md(r"""
|
||||
|
||||
{mo.ui.altair_chart(S.plot_average_scores_with_counts(vscales_row_norm, x_label='Voice', width=1000))}
|
||||
""")
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user