ppt function to replace images
This commit is contained in:
@@ -29,18 +29,6 @@ def _():
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _(mo):
|
||||
mo.outline(label="Table of Contents")
|
||||
return
|
||||
|
||||
|
||||
@app.cell
|
||||
def _():
|
||||
# Select Dataset
|
||||
return
|
||||
|
||||
|
||||
@app.cell
|
||||
def _(mo):
|
||||
file_browser = mo.ui.file_browser(
|
||||
initial_path="./data/exports", multiple=False, restrict_navigation=True, filetypes=[".csv"], label="Select 'Labels' File"
|
||||
@@ -59,12 +47,6 @@ def _(Path, file_browser, mo):
|
||||
return QSF_FILE, RESULTS_FILE
|
||||
|
||||
|
||||
@app.cell
|
||||
def _(RESULTS_FILE, mo):
|
||||
mo.stop(not RESULTS_FILE.name.lower().endswith('labels.csv'), mo.md("**⚠️ Make sure you select a `_Labels.csv` file above**"))
|
||||
return
|
||||
|
||||
|
||||
@app.cell
|
||||
def _(JPMCSurvey, QSF_FILE, RESULTS_FILE, mo):
|
||||
S = JPMCSurvey(RESULTS_FILE, QSF_FILE)
|
||||
@@ -76,12 +58,6 @@ def _(JPMCSurvey, QSF_FILE, RESULTS_FILE, mo):
|
||||
|
||||
|
||||
@app.cell
|
||||
def _():
|
||||
# check_straight_liners(S.get_ss_green_blue(data_all)[0])
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _(Path, RESULTS_FILE, mo):
|
||||
mo.md(f"""
|
||||
|
||||
@@ -112,6 +88,26 @@ def _(check_progress, data_all, duration_validation, mo):
|
||||
return
|
||||
|
||||
|
||||
@app.cell
|
||||
def _(mo):
|
||||
mo.md(r"""
|
||||
### ⚠️ ToDo: "straight-liner" detection and removal
|
||||
""")
|
||||
return
|
||||
|
||||
|
||||
@app.cell
|
||||
def _(mo):
|
||||
mo.md(r"""
|
||||
---
|
||||
|
||||
# Data Filter
|
||||
|
||||
Use to select a subset of the data for the following analysis
|
||||
""")
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _(S, mo):
|
||||
filter_form = mo.md('''
|
||||
@@ -147,7 +143,7 @@ def _(S, mo):
|
||||
return (filter_form,)
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
@app.cell
|
||||
def _(S, data_all, filter_form, mo):
|
||||
mo.stop(filter_form.value is None, mo.md("**Please submit filter above to proceed**"))
|
||||
_d = S.filter_data(data_all, 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'])
|
||||
@@ -173,6 +169,20 @@ def _(S, data, mo):
|
||||
return (char_rank,)
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _(mo):
|
||||
mo.md(r"""
|
||||
|
||||
""")
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _():
|
||||
# char_rank = S.get_character_ranking(data)[0]
|
||||
return
|
||||
|
||||
|
||||
@app.cell
|
||||
def _(S, char_rank, mo):
|
||||
mo.md(f"""
|
||||
@@ -218,6 +228,13 @@ def _(S, data, mo):
|
||||
return (v_18_8_3,)
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _():
|
||||
|
||||
# print(v_18_8_3.head())
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _(S, mo, v_18_8_3):
|
||||
mo.md(f"""
|
||||
@@ -240,7 +257,7 @@ def _(S, mo, v_18_8_3):
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
@app.cell
|
||||
def _(S, calculate_weighted_ranking_scores, data):
|
||||
top3_voices = S.get_top_3_voices(data)[0]
|
||||
top3_voices_weighted = calculate_weighted_ranking_scores(top3_voices)
|
||||
@@ -284,6 +301,11 @@ def _(S, mo, top3_voices):
|
||||
|
||||
|
||||
@app.cell
|
||||
def _():
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _(S, data, mo, utils):
|
||||
ss_or, choice_map_or = S.get_ss_orange_red(data)
|
||||
ss_gb, choice_map_gb = S.get_ss_green_blue(data)
|
||||
@@ -322,12 +344,12 @@ def _(S, mo, pl, ss_long):
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
@app.cell
|
||||
def _():
|
||||
return
|
||||
|
||||
|
||||
@app.cell
|
||||
@app.cell(hide_code=True)
|
||||
def _(S, data, mo):
|
||||
vscales = S.get_voice_scale_1_10(data)[0]
|
||||
# plot_average_scores_with_counts(vscales, x_label='Voice', width=1000)
|
||||
@@ -337,7 +359,7 @@ def _(S, data, mo):
|
||||
return (vscales,)
|
||||
|
||||
|
||||
@app.cell
|
||||
@app.cell(hide_code=True)
|
||||
def _(S, mo, vscales):
|
||||
mo.md(f"""
|
||||
### How does each voice score on a scale from 1-10?
|
||||
@@ -352,7 +374,7 @@ def _():
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
@app.cell
|
||||
def _(mo):
|
||||
mo.md(r"""
|
||||
|
||||
@@ -360,7 +382,7 @@ def _(mo):
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
@app.cell
|
||||
def _(mo):
|
||||
mo.md(r"""
|
||||
|
||||
@@ -400,7 +422,7 @@ def _(choice_map, mo, ss_all, utils, vscales):
|
||||
return df_style, joined_df
|
||||
|
||||
|
||||
@app.cell
|
||||
@app.cell(hide_code=True)
|
||||
def _(S, SPEAKING_STYLES, joined_df, mo):
|
||||
_content = """### Total Results
|
||||
|
||||
@@ -431,34 +453,18 @@ def _(mo):
|
||||
|
||||
- [ ] 4 correlation diagrams considering each speaking style (4) and all female voice results.
|
||||
- [ ] 4 correlation diagrams considering each speaking style (4) and all male voice results.
|
||||
""")
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _(mo):
|
||||
mo.md(r"""
|
||||
|
||||
## Correlations Voice Speaking Styles <-> Voice Ranking Points
|
||||
""")
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _(mo):
|
||||
mo.md(r"""
|
||||
Let’s show how scoring better on these speaking styles correlates (or not) with better Vocie Ranking results. For each speaking style we show how the traits in these speaking styles correlate with voice ranking points. This gives us a total of 4 correlation diagrams.
|
||||
|
||||
Example for speaking style green:
|
||||
- Trait 1: Friendly | Conversational | Down-to-earth
|
||||
- Trait 2: Approachable | Familiar | Warm
|
||||
- Trait 3: Optimistic | Benevolent | Positive | Appreciative
|
||||
""")
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _(mo):
|
||||
mo.md(r"""
|
||||
### Total Results
|
||||
|
||||
- [ ] 4 correlation diagrams
|
||||
@@ -466,7 +472,31 @@ def _(mo):
|
||||
return
|
||||
|
||||
|
||||
@app.cell
|
||||
@app.cell(hide_code=True)
|
||||
def _(mo):
|
||||
mo.md(r"""
|
||||
|
||||
""")
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _(mo):
|
||||
mo.md(r"""
|
||||
|
||||
""")
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _(mo):
|
||||
mo.md(r"""
|
||||
|
||||
""")
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _(S, SPEAKING_STYLES, df_style, mo, top3_voices, utils):
|
||||
df_ranking = utils.process_voice_ranking_data(top3_voices)
|
||||
joined = df_style.join(df_ranking, on=['_recordId', 'Voice'], how='inner')
|
||||
@@ -490,7 +520,7 @@ def _(S, SPEAKING_STYLES, df_style, mo, top3_voices, utils):
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
@app.cell
|
||||
def _(mo):
|
||||
mo.md(r"""
|
||||
### Female / Male Voices considered seperately
|
||||
@@ -501,49 +531,5 @@ def _(mo):
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _(mo):
|
||||
mo.md(r"""
|
||||
## Correlation Heatmap all evaluations <-> voice acoustic data
|
||||
|
||||
- [ ] Heatmap for male voices
|
||||
- [ ] Heatmap for female voices
|
||||
""")
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _(mo):
|
||||
mo.md(r"""
|
||||
## Most Prominent Character Personality Traits
|
||||
""")
|
||||
return
|
||||
|
||||
|
||||
@app.cell(hide_code=True)
|
||||
def _(mo):
|
||||
mo.md(r"""
|
||||
The last question of the survey is about traits for the described character's personality. For each Character personality, we want to display the 8 most chosen character personality traits. This will give us a total of 4 diagrams, one for each character personality included in the test.
|
||||
|
||||
- [ ] Bank Teller
|
||||
- [ ] Familiar Friend
|
||||
- [ ] The Coach
|
||||
- [ ] Personal Assistant
|
||||
""")
|
||||
return
|
||||
|
||||
|
||||
@app.cell
|
||||
def _(mo):
|
||||
mo.md(r"""
|
||||
---
|
||||
|
||||
# Results per subgroup
|
||||
|
||||
Use the dropdown selector at the top to filter the data and generate all the plots again
|
||||
""")
|
||||
return
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run()
|
||||
|
||||
Reference in New Issue
Block a user