Skip to content

Commit

Permalink
flake8 is back and picky again :D
Browse files Browse the repository at this point in the history
  • Loading branch information
jdpye committed Nov 24, 2023
1 parent 76891ed commit ebac552
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pyobistools/validation/check_onland.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import pyxylookup as xy
import warnings
import geopandas as gpd
import pandas as pd

# alternate idea for shapefiles from Bio Mobilization workshop module 6 example
import cartopy.io.shapereader as shpreader
Expand Down Expand Up @@ -73,8 +74,8 @@ def check_onland(data, land=None, report=False, buffer=0, offline=False):
if len(gdf) > 0:
return gdf[
gdf["on_land"]
] # TODO: return a report format describing which rows are land-bound
] # TODO: return a report format describing which rows are land-bound
else: # the function returns an empty dataframe
return pd.DataFrame(index=data.index,columns=data.columns) # return empty dataframe in the same shape, as per the R implementation
return pd.DataFrame(index=data.index, columns=data.columns) # return empty dataframe in the same shape, as per the R implementation
else: # if we are not returning a report, return the offending rows themselves.
return gdf[gdf["on_land"]]

0 comments on commit ebac552

Please sign in to comment.