Add demonstrations of new functions.

communication
junos 2021-08-06 18:38:21 +02:00
parent 4a2ca581b3
commit 33ebf9caea
1 changed files with 28 additions and 3 deletions

View File

@ -14,6 +14,7 @@
# ---
# %%
# %matplotlib inline
import os
import sys
@ -39,9 +40,6 @@ print(df_calls)
# %%
count_comms(df_calls)
# %%
enumerate_contacts(df_calls)
# %%
df_sms = get_sms_data(["nokia_0000003"])
count_comms(df_sms)
@ -141,3 +139,30 @@ sms_number = pd.wide_to_long(
sns.displot(
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))
# %%