A class for handling Benthic Photo Quadrat data from MERMAID.
The BenthicPhotoQuadrat class is responsible for fetching Benthic Photo Quadrat data,
including observations, observations aggregated by sample units, and observations
aggregated by sample events, for a specified project.
Source code in seasnake/summaries/benthic_photo_quadrat.py
classBenthicPhotoQuadrat(BaseSummary):""" A class for handling Benthic Photo Quadrat data from MERMAID. The BenthicPhotoQuadrat class is responsible for fetching Benthic Photo Quadrat data, including observations, observations aggregated by sample units, and observations aggregated by sample events, for a specified project. """@requires_tokendefobservations(self,project_id:str)->DataFrame:""" Retrieves a project's Benthic Photo Quadrat observations. Args: project_id (str): The ID of the project for which to fetch Benthic Photo Quadrat observations. Returns: DataFrame Examples: ``` from seasnake import MermaidAuth, BenthicPhotoQuadrat auth = MermaidAuth() bpq = BenthicPhotoQuadrat(token=auth.get_token()) project_id = "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE" print(bpq.observations(project_id)) ``` """url=f"/projects/{project_id}/benthicpqts/obstransectbenthicpqts/"df=self.read_cache(url)returnself.to_cache(url,self.data_frame_from_url(url))ifdfisNoneelsedf@requires_tokendefsample_units(self,project_id:str)->DataFrame:""" Retrieves a project's Benthic Photo Quadrat observations aggregated by sample units. Args: project_id (str): The ID of the project for which to fetch Benthic Photo Quadrat sample units. Returns: DataFrame Examples: ``` from seasnake import MermaidAuth, BenthicPhotoQuadrat auth = MermaidAuth() bpq = BenthicPhotoQuadrat(token=auth.get_token()) project_id = "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE" print(bpq.sample_units(project_id)) ``` """url=f"/projects/{project_id}/benthicpqts/sampleunits/"df=self.read_cache(url)returnself.to_cache(url,self.data_frame_from_url(url))ifdfisNoneelsedf@requires_tokendefsample_events(self,project_id:str)->DataFrame:""" Retrieves a project's Benthic Photo Quadrat observations aggregated by sample events. Args: project_id (str): The ID of the project for which to fetch Benthic Photo Quadrat sample events. Returns: DataFrame Examples: ``` from seasnake import MermaidAuth, BenthicPhotoQuadrat auth = MermaidAuth() bpq = BenthicPhotoQuadrat(token=auth.get_token()) project_id = "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE" print(bpq.sample_events(project_id)) ``` """url=f"/projects/{project_id}/benthicpqts/sampleevents/"df=self.read_cache(url)returnself.to_cache(url,self.data_frame_from_url(url))ifdfisNoneelsedf
observations(project_id)
Retrieves a project's Benthic Photo Quadrat observations.
Parameters:
Name
Type
Description
Default
project_id
str
The ID of the project for which to fetch
Benthic Photo Quadrat observations.
@requires_tokendefobservations(self,project_id:str)->DataFrame:""" Retrieves a project's Benthic Photo Quadrat observations. Args: project_id (str): The ID of the project for which to fetch Benthic Photo Quadrat observations. Returns: DataFrame Examples: ``` from seasnake import MermaidAuth, BenthicPhotoQuadrat auth = MermaidAuth() bpq = BenthicPhotoQuadrat(token=auth.get_token()) project_id = "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE" print(bpq.observations(project_id)) ``` """url=f"/projects/{project_id}/benthicpqts/obstransectbenthicpqts/"df=self.read_cache(url)returnself.to_cache(url,self.data_frame_from_url(url))ifdfisNoneelsedf
sample_events(project_id)
Retrieves a project's Benthic Photo Quadrat observations aggregated by sample events.
Parameters:
Name
Type
Description
Default
project_id
str
The ID of the project for which to fetch
Benthic Photo Quadrat sample events.
@requires_tokendefsample_events(self,project_id:str)->DataFrame:""" Retrieves a project's Benthic Photo Quadrat observations aggregated by sample events. Args: project_id (str): The ID of the project for which to fetch Benthic Photo Quadrat sample events. Returns: DataFrame Examples: ``` from seasnake import MermaidAuth, BenthicPhotoQuadrat auth = MermaidAuth() bpq = BenthicPhotoQuadrat(token=auth.get_token()) project_id = "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE" print(bpq.sample_events(project_id)) ``` """url=f"/projects/{project_id}/benthicpqts/sampleevents/"df=self.read_cache(url)returnself.to_cache(url,self.data_frame_from_url(url))ifdfisNoneelsedf
sample_units(project_id)
Retrieves a project's Benthic Photo Quadrat observations aggregated by sample units.
Parameters:
Name
Type
Description
Default
project_id
str
The ID of the project for which to fetch
Benthic Photo Quadrat sample units.
@requires_tokendefsample_units(self,project_id:str)->DataFrame:""" Retrieves a project's Benthic Photo Quadrat observations aggregated by sample units. Args: project_id (str): The ID of the project for which to fetch Benthic Photo Quadrat sample units. Returns: DataFrame Examples: ``` from seasnake import MermaidAuth, BenthicPhotoQuadrat auth = MermaidAuth() bpq = BenthicPhotoQuadrat(token=auth.get_token()) project_id = "AAAAAAAA-BBBB-CCCC-DDDD-EEEEEEEEEEEE" print(bpq.sample_units(project_id)) ``` """url=f"/projects/{project_id}/benthicpqts/sampleunits/"df=self.read_cache(url)returnself.to_cache(url,self.data_frame_from_url(url))ifdfisNoneelsedf