Meta

class bb_utils.meta.BeeMetaInfo[source]

Bases: object

get_age(bee_id, timestamp)[source]

Check the age of a bee given a timestamp and ID.

Arguments:
bee_id (BeesbookID): BeesbookID with ID timestamp (datetime.datetime): datatime.datetime with timestamp
Returns:
datetime.timedelta Age of the bee at the given timestamp
get_beename(bee_id)[source]

Return the Beename-Char-RNN generated name for the given ID.

Arguments:
bee_id (BeesbookID): BeesbookID with ID
Returns:
str Name of the bee with the given ID
get_foragergroup(group_id)[source]

Get metainformation for a specific forager group.

Arguments:
group_id (:int:): Group ID
Returns:
pd.Series: forager group metainformation
get_group_memberships(bee_id)[source]

Get forager groups of the bee with the given ID.

Arguments:
bee_id (BeesbookID): BeesbookID with ID
Returns:
[int]:list of forager group ids
get_hatchdate(bee_id)[source]

Get hatchdate of the bee with the given ID.

Arguments:
bee_id (BeesbookID): BeesbookID with ID
Returns:
datetime.dateime: hatchdate of the bee
get_mapped_id(bee_id, timestamp)[source]

Return the mapped id given the timestamp such that each reused has a unique ID.

Arguments:
bee_id (BeesbookID): BeesbookID with ID timestamp (datetime.datetime): datatime.datetime with timestamp
Returns:
int Original ID in ferwar format for IDs that don’t need mapping, mapped ID otherwise
has_hatched(bee_id, timestamp)[source]

Check whether a bee has already hatched given a timestamp and ID.

Arguments:
bee_id (BeesbookID): BeesbookID with ID timestamp (datetime.datetime): datatime.datetime with timestamp
Returns:
bool:True if bee has hatched before the given timestamp