Prepare figures for publication.

communication
junos 2021-07-02 16:02:55 +02:00
parent 767548b562
commit 4c07ccccf2
1 changed files with 9 additions and 8 deletions

View File

@ -203,7 +203,7 @@ df_session_counts_time_diff = df_session_counts_time_completed.join(
# %% [markdown] # %% [markdown]
# Now, select only the daytime EMAs of interest. Discard the differences between *different day* EMAs. # Now, select only the daytime EMAs of interest. Discard the differences between *different day* EMAs.
# %% # %% tags=[]
time_workday_completed_less_than_1_day = ( time_workday_completed_less_than_1_day = (
(df_session_counts_time_diff.time == "daytime") # Only take daytime EMAs. (df_session_counts_time_diff.time == "daytime") # Only take daytime EMAs.
& ~( & ~(
@ -221,9 +221,9 @@ df_session_workday = df_session_workday.assign(
) )
# %% # %%
g1 = sns.displot(df_session_workday["time_diff_minutes"], binwidth=5, height=5) g1 = sns.displot(df_session_workday["time_diff_minutes"], binwidth=5, height=5, aspect=1.5, color="#28827C")
g1.set_axis_labels("Time difference [min]", "Session count") g1.set_axis_labels("Time difference [min]", "Session count")
# g1.savefig("WorkdayEMAtimeDiff.pdf") #g1.savefig("WorkdayEMAtimeDiff.pdf")
# %% [markdown] # %% [markdown]
# There are some sessions that are really close together. By design, none should be closer than 30 min. Let's take a look at those. # There are some sessions that are really close together. By design, none should be closer than 30 min. Let's take a look at those.
@ -278,9 +278,9 @@ df_mean_daytime_interval = df_session_workday.groupby("participant_id").median()
df_mean_daytime_interval.describe() df_mean_daytime_interval.describe()
# %% # %%
g2 = sns.displot(df_mean_daytime_interval.time_diff_minutes, binwidth=5, height=5) g2 = sns.displot(df_mean_daytime_interval.time_diff_minutes, binwidth=5, height=5, aspect=1.5, color="#28827C")
g2.set_axis_labels("Median time difference [min]", "Participant count") g2.set_axis_labels("Median time difference [min]", "Participant count")
# g2.savefig("WorkdayEMAtimeDiffMedianParticip.pdf") #g2.savefig("WorkdayEMAtimeDiffMedianParticip.pdf")
# %% # %%
df_adherence = df_adherence.merge( df_adherence = df_adherence.merge(
@ -303,7 +303,7 @@ df_count_daytime_per_participant = df_session_workday.groupby(
df_count_daytime_per_participant["time"].describe() df_count_daytime_per_participant["time"].describe()
# %% # %%
sns.displot(df_count_daytime_per_participant.time, binwidth=1, height=5) sns.displot(df_count_daytime_per_participant.time, binwidth=1, height=5, aspect=1.5, color="#28827C")
# %% [markdown] # %% [markdown]
# ## Evening EMA # ## Evening EMA
@ -334,9 +334,10 @@ s_evening_completed_ratio = (
s_evening_completed_ratio.describe() s_evening_completed_ratio.describe()
# %% # %%
g3 = sns.displot(s_evening_completed_ratio - 0.001, binwidth=0.05, height=5) g3 = sns.displot(s_evening_completed_ratio - 0.001, binwidth=0.05, height=5, aspect=1.5, color="#28827C")
g3.set_axis_labels("Ratio of days with the evening EMA filled out", "Participant count") g3.set_axis_labels("Ratio of days with the evening EMA filled out", "Participant count")
# g3.savefig("EveningEMAratioParticip.pdf") g3.set(xlim=(1.01,0.59))
#g3.savefig("EveningEMAratioParticip.pdf")
# %% # %%
df_adherence = df_adherence.merge( df_adherence = df_adherence.merge(