Climate matching by drawing a buffer around occurrence points

Open
#12 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
r
Domain
data

Research direction

No files, tests, or entry points are named. Start by locating the code that processes occurrence coordinates, coordinate uncertainty, and climate-zone layers, then trace how climate matches are currently calculated. Done means assigning each record's buffer-area overlap fraction to climate zones, excluding marine overlap and keeping overlapping point buffers separate.

Written by the indexing model from the issue text.

Description

At the moment, we keep points with every coordinate uncertainty level and also those that are close to the border with a different climate zone. To minimize bias related to this, draw a buffer around each occurrence point with the radius being equal to the coordinate uncertainty (i.e., records with a higher uncertainty will get a higher buffer around them). Then, calculate the amount of overlap between this buffer and the climate zone layer of the time period in which the observation was made. Based on this % overlap, calculate the presence of the point in each climate zone as follows: 60% overlap of occurrence record buffer with zone A and 40% with zone B = 0.6 occurrence records in zone A and 0.4 in zone B.

In other words: n_climate (zone A) = Area of buffer in climate zone A / Total area of buffer (and this for all occurrence records of the species of interest)

Special attention for the following situations:

  • If a buffer overlaps with the marine environment, keep only the terrestrial overlap, recalculate the buffer surface ...
  • If a buffer overlaps with the buffer of another point: chances will be lower due to thinning but this may still occur when coordinateUncertainties are large, in that case don't merge buffers, calculate it separately for each point as if the other weren't there.
Dominant language
R
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from inbo/ClimateCastR

All issues in inbo/ClimateCastR

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.