diff --git a/ecoscope/io/earthranger.py b/ecoscope/io/earthranger.py index bedc8249..1f559d87 100644 --- a/ecoscope/io/earthranger.py +++ b/ecoscope/io/earthranger.py @@ -484,6 +484,11 @@ def get_subjectgroup_observations(self, subject_group=None, group_name=None, inc return self.get_subject_observations(subject_ids, **kwargs) + def get_event_types(self, include_inactive=False, **addl_kwargs): + params = self._clean_kwargs(addl_kwargs, include_inactive=include_inactive) + + return pd.DataFrame(self._get("activity/events/eventtypes", **params)) + def get_events( self, is_collection=None, @@ -597,7 +602,7 @@ def get_events( df.set_crs(4326, inplace=True) df.sort_values("time", inplace=True) - return df + return df.set_index("id") def get_patrol_types(self): df = pd.DataFrame(self._get("activity/patrols/types"))