src.prepare_data.task_prepare_mossong_data

Module Contents

Functions

task_prepare_mossong_data(depends_on, produces)

_prepare_hh_data(common, extra)

_prepare_participant_data(common, extra)

_prepare_contact_data(common)

_make_frequencies_categorical(sr)

_make_durations_categorical(sr)

_create_place(row)

_prepare_day_data(sday)

_merge_mossong_data(contacts, participants, hh, sday)

_from_wide_to_long_format(hh)

Convert the data from wide to long format.

_make_columns_in_contact_data_nice(df)

_drop_hh_with_missing_ages(df)

Drop households that don't have ages for every person in the household.

Attributes

LOCATIONS = ['cnt_home', 'cnt_work', 'cnt_school', 'cnt_leisure', 'cnt_transport', 'cnt_otherplace'][source]
MOSSONG_IN[source]
MOSSONG_OUT[source]
task_prepare_mossong_data(depends_on, produces)[source]
_prepare_hh_data(common, extra)[source]
_prepare_participant_data(common, extra)[source]
_prepare_contact_data(common)[source]
_make_frequencies_categorical(sr)[source]
_make_durations_categorical(sr)[source]
_create_place(row)[source]
_prepare_day_data(sday)[source]
_merge_mossong_data(contacts, participants, hh, sday)[source]
_from_wide_to_long_format(hh)[source]

Convert the data from wide to long format.

_make_columns_in_contact_data_nice(df)[source]
_drop_hh_with_missing_ages(df)[source]

Drop households that don’t have ages for every person in the household.