8000 Calculating area of window densities · Issue #30 · kr-colab/locator · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Calculating area of window densities #30
Open
@Imogen-D

Description

@Imogen-D

Hi,

This is a little of an out-the-box question, but I'm wondering if you have a method in mind to be able to calculate the area of the window estimates (at the three % densities). I'm hoping to use this as a way of comparing different model accuracies.

I've been looking at attempting to convert the kd object from the density estimates in the plot_locator script into a contour object using contourlines and then calculating the area from IRTFM's answer here https://stackoverflow.com/questions/8406507/how-can-i-calculate-the-area-within-a-contour-in-r , however this is not spatially relevant and seems to output spurious results.

I then attempted to convert this to a SpatialLinesDataFrame with ContourLines2SLDF().
However, I am then stuck on two aspects;

  1. which levels were used by the contour() plotting function per probability, as the calculation of probabilities as per https://stackoverflow.com/questions/16225530/contours-of-percentiles-on-level-plot is a little unclear as to its inner workings.
    And 2) how to convert this lines object into closed polygons from which I can then calculate the area.

I'll keep working on it, but was just wondering whether you can provide any ideas.

I've attached (your) plotting script with my current edits for extracting the area as per lines 198-242 (plot_locator2.txt), as well as some example metadata (unknown and known for error calculations) and 20 predlocs from 1 sample. Please excuse the ugly way of attaching these, I'm still fairly new to coding!

Looking forward to hearing from you, let me know if you need any other information from me

plot_locator2.txt

knownmetadata.txt
metadata.txt

A1_1.ALminmac200_7931566_locindv_predlocs.txt.gz
A1_1.ALminmac200_991410_locindv_predlocs.txt.gz
A1_1.ALminmac200_1092513_locindv_predlocs.txt.gz
A1_1.ALminmac200_1483743_locindv_predlocs.txt.gz
A1_1.ALminmac200_1548919_locindv_predlocs.txt.gz
A1_1.ALminmac200_2045261_locindv_predlocs.txt.gz
A1_1.ALminmac200_2171080_locindv_predlocs.txt.gz
A1_1.ALminmac200_2349043_locindv_predlocs.txt.gz
A1_1.ALminmac200_3038660_locindv_predlocs.txt.gz
A1_1.ALminmac200_3238820_locindv_predlocs.txt.gz
A1_1.ALminmac200_3484727_locindv_predlocs.txt.gz
A1_1.ALminmac200_3749675_locindv_predlocs.txt.gz
A1_1.ALminmac200_5333187_locindv_predlocs.txt.gz
A1_1.ALminmac200_5808436_locindv_predlocs.txt.gz
A1_1.ALminmac200_6034974_locindv_predlocs.txt.gz
A1_1.ALminmac200_6115573_locindv_predlocs.txt.gz
A1_1.ALminmac200_6381378_locindv_predlocs.txt.gz
A1_1.ALminmac200_6477477_locindv_predlocs.txt.gz
A1_1.ALminmac200_6993546_locindv_predlocs.txt.gz
A1_1.ALminmac200_7022405_locindv_predlocs.txt.gz

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0