I’m currently creating an ssf model to analyse my data but I have an issue with one of the variables.
To put you in some context I have position data of a deer named Barbara. To explain its movement I chose several variables : slope, distance (distance of each step of the individual), delta_elevation and** var_NDVI**.
The last one is the one troubling me.
-
here is the output of the model : enter image description here
-
here is how i incorporated the raster data I told you about:
ssf_barbara <- ssf_barbara |> extract_covariates(landcover_corsica, where=”both”)
ssf_barbara <- ssf_barbara |> extract_covariates(elevation, where=”both”)
- my NDVI data :
cervus_xyt <- st_sf(‘geometry’ = cervus_clean$geometry,
‘timestamp’ = cervus_clean$timestamp,
‘id’=cervus_ta$individual-local-identifier
,
‘NDVI’= cervus_clean_env$MODIS Land Vegetation Indices 250m 16d Terra NDVI
)
cervus_xyt<- cervus_xyt %>% filter(id==”Barbara”)
cervus_xyt<-cbind(cervus_xyt, st_coordinates(cervus_xyt))
tibble <- tibble(x =cervus_xyt$X, y =cervus_xyt$Y, t = cervus_xyt$timestamp, id=cervus_xyt$id, NDVI=cervus_xyt$NDVI)
cervus_track <- amt::make_track(tibble, x, y, t, id, NDVI, crs = 4326)
cervus_track <- cervus_track |> mutate(sl_ = step_lengths(cervus_track))
summary(cervus_track$sl_)
amt::summarize_sampling_rate(cervus_track)
stps<- amt::track_resample(cervus_track, rate=hours(12),
tolerance=hours(1))
stps
stps <- filter_min_n_burst(stps, 3)
ssf_barbara <- steps_by_burst(stps, keep_cols = “both”)
**=> My NDVI data is actually extracted (not from a raster) but from a simple data frame from moovebank.
**
I don’t think it’s a class problem because I already checked that.
The only thing I can think about to explain the NA is that when I incorporated the NDVI data into my dataframe I didn’t use a Raster like the other variables.
Hannah Savalli is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.