core classes

The core module contains classes to store all the data used by bandicoot.

User

User() Data structure storing all the call, text or mobility records of the user.

Attributes and underlying data

User.records Can be used to get or set the list of user's records.
User.antennas The purpose of this is to hook into assignments to the user's antenna dictionary, and update records' location based on the new value.
User.recharges A list of Recharge objects.
User.attributes
User.network
User.home
User.has_antennas
User.has_recharges
User.has_attributes
User.has_network
User.has_home
User.name
User.antennas_path
User.attributes_path
User.recharges_path
User.start_time
User.end_time
User.night_start
User.night_end
User.start_time
User.weekend
User.ignored_records
User.percent_outofnetwork_calls
User.percent_outofnetwork_texts
User.percent_outofnetwork_contacts
User.percent_outofnetwork_call_durations

Methods

User.describe() Generates a short description of the object, and writes it to the standard output.
User.recompute_home() Return the antenna where the user spends most of his time at night.
User.recompute_missing_neighbors() Recomputes statistics for missing users of the current user's
User.reset_cache() Reset the cache used to groups records when computing indicators.
User.set_home(new_home) Sets the user's home.

Record

Record([interaction, direction, ...]) Data structure storing a call detail record.

Methods

Record.matches(other) Return true if two records 'match': if they share the same values for interaction, direction, call_duration, and datetime.
Record.all_matches(iterable)
Record.has_match(iterable)

Position

Position([antenna, location]) Data structure storing a generic location.

Attributes and underlying data

Position.location
Position.antenna

Methods

Position.type()

Recharge

Recharge(datetime, amount, retailer_id) An object storing a mobile phone recharge, also called top up.