Skip to content

hotspot_clip() unnecessarily reports removing zero rows from data #66

@mpjashby

Description

@mpjashby

Describe the bug
hotspot_clip() produces a message if it has removed rows from the data that are outside the clipped area. However, the function currently also produces this message even if it doesn't actually remove any rows from the data.

To Reproduce

library(sfhotspot)

# No rows from the data have been removed so there is no need for the message
# produced here
clipped_robberies <- hotspot_clip(memphis_robberies_jan, memphis_precincts)
#> Removed 0 rows (0.0% of original rows) from `data`

Created on 2025-07-30 with reprex v2.1.1

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions