kaitlyngaynor / gorongosa-mesocarnivores

2 stars 0 forks source link

distance to pan #136

Closed kaitlyngaynor closed 1 year ago

kaitlyngaynor commented 1 year ago

Moving this to a GitHub issue...

From Katie:

For water, we'd discussed on the doc switching to a general "distance to water" variable, which would be the minimum distance to either the lake, a river or a pan. Looking at the available data, I think that would be determining the minimum value among the "pans_dist", "river_dist" and "urema_dist" columns - does that sound right? I know you also mentioned large pans on the document, but that variable is "pans_large_250m: Percent of area in 250 meter radius that is covered by large pans (pan layer created manually by K Gaynor and J Daskin)." As such, I don't see as easy a way to combine the different water variables if we use the percent value for pans.

The pan layer includes a lot of TINY watering holes that definitely don’t have water any time near the study period, hmm. I’m hesitant to use it… you’re right that there’s no easy way to combine the density layer and distance layers, though.

I did find the raw shape file for “conservative/large pans,” which I defined as a pan >1km2 in size. These retain water for a lot more of the year. I found a script (from 2018) that calculated distance from each camera to largest pan, but it's using R packages that no longer work and input files that I no longer have... it would probably be pretty fast in QGIS/ArcGIS, but if this isn't in your wheelhouse @klg-2016 I can figure this out in R using packages that actually work! Let me know.

Here's the shape file: Pan_largerthan1km2.zip

klg-2016 commented 1 year ago

I have only done a single tutorial in QGIS to make a map for my mangrove work, so it's not something I think I'd be able to figure out in a reasonable time frame using that. If it's okay and you have time, could you see what you can figure out in R?

kaitlyngaynor commented 1 year ago

Sure thing. I just did this in this script here, using the st_distance() function in the sf package. It was pretty easy—take a look!

Here's the output (units are meters): camera-pan-dist.csv

klg-2016 commented 1 year ago

Awesome, thank you! I'll check it out.

Is your thinking now to use this and still calculate closest "water" using distance to river, pans and lake?

kaitlyngaynor commented 1 year ago

Yeah I think so?

klg-2016 commented 1 year ago

Sounds good, I'll work with that!

klg-2016 commented 1 year ago

Update on single species covariate exploration:

to try:

When I run this as a Type 1 (no interactions model), it beats null by 1.7 AIC points. I feel like I've read (or you've told me) that delta 2 is enough to consider models sufficiently different. What do you think?

kaitlyngaynor commented 1 year ago

closing distance to pan issue