You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When the grid does not overlap the points, a better error message is needed. Currently the message is Error in sum(counts$n): invalid 'type' (list) of argument.
To Reproduce
library(sf)
library(sfhotspot)
library(tidyverse)
# Loading Data ----------------------------------------------------# ASB incidents in Lancashire in 2020 asb<- read_tsv("https://mpjashby.github.io/crimemappingdata/lancashire_asb.tab") |>
st_as_sf(coords= c("longitude","latitude"), crs="EPSG:4326") |>
st_transform("EPSG:27700")
# Lancashire districtsdistricts<- read_sf("https://mpjashby.github.io/crimemappingdata/northumbria_districts.geojson") |>
st_transform("EPSG:27700")
# Calculate KDE values for Lancashireasb_kde_Lancashire<-asb|>
hotspot_kde(grid= hotspot_grid(districts, cell_size=5000))
Expected behavior
An error message that explains the problem and how to fix it.
The text was updated successfully, but these errors were encountered:
Describe the bug
When the grid does not overlap the points, a better error message is needed. Currently the message is
Error in sum(counts$n): invalid 'type' (list) of argument
.To Reproduce
Expected behavior
An error message that explains the problem and how to fix it.
The text was updated successfully, but these errors were encountered: