Add demonstrations of new functions.
parent
4a2ca581b3
commit
33ebf9caea
|
@ -14,6 +14,7 @@
|
||||||
# ---
|
# ---
|
||||||
|
|
||||||
# %%
|
# %%
|
||||||
|
# %matplotlib inline
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
@ -39,9 +40,6 @@ print(df_calls)
|
||||||
# %%
|
# %%
|
||||||
count_comms(df_calls)
|
count_comms(df_calls)
|
||||||
|
|
||||||
# %%
|
|
||||||
enumerate_contacts(df_calls)
|
|
||||||
|
|
||||||
# %%
|
# %%
|
||||||
df_sms = get_sms_data(["nokia_0000003"])
|
df_sms = get_sms_data(["nokia_0000003"])
|
||||||
count_comms(df_sms)
|
count_comms(df_sms)
|
||||||
|
@ -141,3 +139,30 @@ sms_number = pd.wide_to_long(
|
||||||
sns.displot(
|
sns.displot(
|
||||||
sms_number, x="no", hue="message_type", binwidth=5, element="step", height=8
|
sms_number, x="no", hue="message_type", binwidth=5, element="step", height=8
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# %% [markdown]
|
||||||
|
# # Communication features
|
||||||
|
|
||||||
|
# %%
|
||||||
|
df_calls_enumerated = enumerate_contacts(df_calls)
|
||||||
|
display(df_calls_enumerated)
|
||||||
|
|
||||||
|
# %%
|
||||||
|
df_calls_contact_features = contact_features(df_calls_enumerated)
|
||||||
|
display(df_calls_contact_features)
|
||||||
|
|
||||||
|
# %%
|
||||||
|
df_sms_enumerated = enumerate_contacts(df_sms)
|
||||||
|
df_sms_contact_features = contact_features(df_sms_enumerated)
|
||||||
|
display(df_sms_contact_features)
|
||||||
|
|
||||||
|
# %%
|
||||||
|
display(count_comms(df_calls))
|
||||||
|
|
||||||
|
# %%
|
||||||
|
display(count_comms(df_sms))
|
||||||
|
|
||||||
|
# %%
|
||||||
|
display(calls_sms_features(df_calls, df_sms))
|
||||||
|
|
||||||
|
# %%
|
||||||
|
|
Loading…
Reference in New Issue