Skip to content

Commit 8d0bfde

Browse files
committed
Fix the bug in issue #17, adding the required line to rename the latitude and longitude columns to work nicely with the particleset constructor.
1 parent 777a8e9 commit 8d0bfde

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

plasticparcels/scripts/create_release_maps.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,8 @@ def create_fisheries_gfwv2_release_map(fisheries_filepath, mask_land_filepath):
390390

391391
# Create a data set where longitude and latitude are from the model
392392
model_agg_data_fisheries_info = model_agg_data_fisheries_info.groupby(['ModelLongitude', 'ModelLatitude', 'Flag', 'Geartype', 'Month', 'Continent', 'Region', 'Subregion', 'Country'])['fishing_hours'].agg('sum').reset_index()
393-
393+
model_agg_data_fisheries_info = model_agg_data_fisheries_info.rename(columns={'ModelLatitude': 'Latitude', 'ModelLongitude': 'Longitude'})
394+
394395
# Return both raw and model datasets
395396
return agg_data_fisheries_info, model_agg_data_fisheries_info
396397

0 commit comments

Comments
 (0)