I have GPS locations of 5 animals. I am trying to calculate the 50% and 95% kernel distribution to determine size of core and periphery areas in km2 (as a table) and I also want to plot the contours (50% and 95%) for these data. Can someone help with the code please?
After loading the required packages, I have been able to generate the raster image using the code below, but not the contours or the size of these areas.
dat <- read.csv("data/GW1.csv", stringsAsFactors = FALSE)
dat <- dat[, 1:6]
dat1 <- dat %>% mutate(date = ymd_hm(Time)) %>%
make_track(Longitude, Latitude, date, id = ID, crs = CRS("+init=epsg:4326")) %>%
filter(y_ < 10) %>%
group_by(id) %>% nest() %>%
mutate(hr_kde_ud = map(data, hr_kde),
hr_kde_area = map_dbl(hr_kde_ud, hr_area),
hr_mcp = map_dbl(data, ~ hr_mcp(.) %>% hr_area %>% pull(area)))
# get the uds for first animal
raster::plot(dat1$hr_kde_ud[[1]]$ud)
I am a very basic R user, and I have not used the dput function before. So here, I provide of my column headers and the first twenty three rows:
Time Latitude Longitude
2019-06-12 15:00 4.8708 97.3669
2019-06-12 14:00 4.87185 97.37221667
2019-06-12 13:00 4.86825 97.37365
2019-06-12 12:00 4.874516667 97.3715
2019-06-12 11:00 4.875483333 97.369
2019-06-12 10:00 4.8749 97.3695
2019-06-12 9:00 4.873416667 97.3693
2019-06-12 8:01 4.868933333 97.37481667
2019-06-12 7:00 4.872683333 97.37523333
2019-06-12 6:00 4.8725 97.37618333
2019-06-12 5:00 4.872466667 97.37611667
2019-06-12 4:00 4.872316667 97.37696667
2019-06-12 3:00 4.875716667 97.37618333
2019-06-12 2:00 4.876083333 97.37525
2019-06-12 1:00 4.877633333 97.37145
2019-06-12 0:00 4.8786 97.37205
2019-06-11 23:00 4.879683333 97.37051667
2019-06-11 22:00 4.8795 97.37171667
2019-06-11 21:00 4.877583333 97.37091667
2019-06-11 20:00 4.878233333 97.36876667
2019-06-11 19:01 4.872666667 97.36978333
2019-06-11 18:00 4.87035 97.37046667
2019-06-11 17:00 4.86995 97.37108333
I expect to get a table that says:
50% 100 km2
95% 210 km2
And a raster image that shows the contours (note that no contours are shown in my image)