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):BeesbookIDwith ID timestamp (datetime.datetime):datatime.datetimewith timestamp - Returns:
datetime.timedeltaAge 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):BeesbookIDwith ID - Returns:
strName 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):BeesbookIDwith 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):BeesbookIDwith 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):BeesbookIDwith ID timestamp (datetime.datetime):datatime.datetimewith timestamp - Returns:
intOriginal 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):BeesbookIDwith ID timestamp (datetime.datetime):datatime.datetimewith timestamp - Returns:
bool: True if bee has hatched before the given timestamp
-