tigris icon indicating copy to clipboard operation
tigris copied to clipboard

`erase_water()` should return `input_sf` if there is no overlap w/ water area

Open elipousson opened this issue 1 year ago • 1 comments

While trying to use erase_water() on a subset of tracts for an area, I realized that it returns an empty data frame if there is no overlapping water area. I just implemented a fix on my fork that I think also may improve performance for erase_water() since it incorporates the filter_by parameter when calling tigris::counties().

I'm optimistic this will be a welcome change so I'll go ahead and open a pull request for review.

elipousson avatar Aug 03 '23 23:08 elipousson

Thank you! I'll take a look at this. I wonder if this is an issue on the Python side as well, I'll have to take a look.

walkerke avatar Aug 07 '23 11:08 walkerke