formatting data from one file into two files

25 views
Skip to first unread message

Beth

unread,
Mar 30, 2026, 10:32:35 AMMar 30
to distance-sampling
Hello,

My distance sampling data was collected and compiled at the observation level, but unmarked requires two separate files (one at the observation-level and one at the survey route-level). How do I efficiently convert my data into two files? Specifically, how do I create a file for survey routes from my observation data? 

I have 12 study areas with 4-6 survey routes each. The survey routes range from 30-40 miles and were created after ensuring the habitat composition matched the composition of the larger study area. Because I collected the habitat type of the observations, I don't have a habitat variable describing a single habitat type for each survey route and have many different habitat types described for a single survey route because the habitat variable is describing the observation. 

Thus far, I have been trying to segment my survey routes shapefiles into many, smaller segments based on segments of dominant habitat type along the survey route. I have over 60 survey routes and will end up with hundreds of smaller segments after segmentation. Then, I think I need to match my observation data to each segment to get a new survey route ID. 

Is this a feasible method? If so, how do I efficiently accomplish this? Has anyone dealt with this with their data, having to create a transect data frame from observation data?

Thank you for your help ,
Beth

Eric Rexstad

unread,
Mar 30, 2026, 10:57:11 AMMar 30
to Beth, distance-sampling
Beth

We don't really deal with issues associated with the unmarked package in this email list. However, the data organisational principles are similar for the Distance package. From your description, your routes are indeed your transects and you recorded habitat associated with your detections. That's all fine.

I believe the problem you identified is that you want to make inference at the level of the habitat. In a perfect world, you would have organised your survey effort taking habitat into account, thereby having sufficient effort in the habitats to be certain to make inference at the habitat level. With your data as it stands, seems you are hard-pressed to associate effort with your habitat types without grinding your way back through the shapefiles as you describe.


From: distance...@googlegroups.com <distance...@googlegroups.com> on behalf of Beth <wojci...@gmail.com>
Sent: 30 March 2026 15:19
To: distance-sampling <distance...@googlegroups.com>
Subject: {Suspected Spam} [distance-sampling] formatting data from one file into two files
 
You don't often get email from wojci...@gmail.com. Learn why this is important
--
You received this message because you are subscribed to the Google Groups "distance-sampling" group.
To unsubscribe from this group and stop receiving emails from it, send an email to distance-sampl...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/distance-sampling/bd25b841-2b7f-4f3b-8e35-bf2610316569n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages