Skip to content

Commit

Permalink
clenaup and docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
cdibble committed Dec 28, 2022
1 parent 1feff4f commit 5af99b7
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions src/ccfrp/angler.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,19 @@ def fish_length_map_prep(
feat_properties: list = ['Area', 'MPA_Status'],
**kwargs
):
'''
Aggregate fish data to the appropriate spatial scale basd on `id_column`
and create a geospatial FeatureCollection with specified `feat_properties` that specify the
geometries that match the aggregated fish data.
Outputs can be used for Chloropleth/Raster plots.
Returns
---------
DataFrame, FeatureCollection
The DataFrame with aggregated fish data and properties.
The FeatureCollection with geojson specifying geometries for fish data aggregations.
'''
if df is None:
df = self.get_df(
'length',
Expand All @@ -220,12 +233,6 @@ def fish_length_map_prep(
on = id_column
)
geo = self._create_features(gdf, id_column=id_column, feat_properties=feat_properties, **kwargs)
# if id_column == 'Area_MPA_Status':
# print('getting area sumary')
# gdf = self.melt_df_area(df, **kwargs)
# else:
# gdf = self.melt_df(df, **kwargs)
# geo = FeatureCollection(self._create_features(gdf, id_column=id_column, **kwargs))
return df, geo

@staticmethod
Expand Down

0 comments on commit 5af99b7

Please sign in to comment.