Density Surface Models

88 views
Skip to first unread message

Julia Saltzman

unread,
Feb 19, 2024, 5:37:51 PMFeb 19
to distance-sampling


Hi all!  

I am currently attempting to make a density surface model and make a map of the data. Below, I describe the issues I am running into and include screenshots of my issues.


The first thing I did is formatted the data following the steps in: https://examples.distancesampling.org/dsm-data-formatting/dsm-data-formatting.html  


My R-Script can be found here: dsmnew.R  

 

In line 1-50, I read the data from excel and read in the shapefiles.  

 

When I print the plot with the transects it looks like this:

 

·                 

 

When I view the transect data in R, it looks like this:

 

In lines 52-203 I follow the steps for segmentizing the data, following all of the transformation when I enter “segs” into R in line 139 it looks like this:

 

When I plot the segments, they look like this:

 

This is where my first question is, is there a reason the segments are so concentrated in some transects, and not in others? I have tried changing the size of the segments in the function, and this does not seem to help.

Despite the issues with the segments described above, I continue to the next steps. Now I relate the observations to the segments. Once my observations are joined with the segments it looks like this:

 

Here is the map with the segments and the observations:

 

 

I then convert the observations back to a table, and get rid of the data from the dataset which I am not using. The table looks like this:

 

Once I follow the steps to drop the geometry, my segs data frame looks like this:  

Here is the map with the segments and the observations:

I then convert the observations back to a table, and get rid of the data from the dataset which I am not using. The observation table looks like this:

The segment table looks like this:

I have now moved on to completing the  analysis outlined here https://examples.distancesampling.org/dsm-line-dolphins/mexico-analysis.html  

This is where my second question is. When I look at the derived segs data from the previous script it looks like this:

However,the segment data in the example analysis looks like this:

Even if I skip over the code suggested to get rid of the “spatialness” in the segs data, it looks like this, I don’t have the output of X and Y which is required for the example analysis. Is there a way to correct this? Do I need the x and y coordinates? 

I attempted to proceed without those coordinates, and my segment and observation data looks like this: 

Ultimately, I was able to get the DSM to run, and I am still having some issues with mapping. I am not sure if this is because of the reasons described above of because of something else. I am hoping to get a density of DSM like this: 

However, I am attempting to use the grid_plot_obj function in lines 279-299 and ultimately get an error which looks like this:  I think a potential issue could be with the way I made the grid, however the method described here: https://distancesampling.org/R/vignettes/hare_point_transect_dsm.html to make the grid has dependencies from packages like rdgal which do not exist anymore.  

I appreciate any advice which can be provided. Thank you in advance for reading this very long email. 


Julia 


Julia Saltzman, M.S.

PhD Student

Marine Turtle Research, Ecology, & Conservation Group

Department of Earth, Ocean, & Atmospheric Sciences 

Florida State University 

P: 216-870-7543

E: jrs...@fsu.edu

W: JuliaSaltzmanScience.com

Julia Saltzman

unread,
Feb 20, 2024, 1:01:44 AMFeb 20
to distance-sampling
Hi all! 

Sorry for another message. For some reason my attachments didn't show up in the email. 

I have attached a PDF with the email sent below, including the images. 

Thanks so much, 
Julia Saltzman

Email With Images.pdf
Reply all
Reply to author
Forward
0 new messages