Skip to content

Add a function to compute 'nearest neighbor' for TEMPEST grid? #27

@bpbond

Description

@bpbond

From an exchange with @kendalynnm -

a script that relates soil sensor id to tree id in the TEMPEST

In other words, for a given sap flux tree, what TEROS sensor IDs are within X grid squares?

We did this as part of Kathryn Jung's 2024 research project:

https://github.com/JGCRISummer2024/TEMPESTData/blob/30bdd063994a887cc7e589d54eb29a8ce055dcab/example-file.R#L67

The code linked above

  • Defines a makebox function that, for a given grid location, returns the 3x3 grid cells around it
  • Builds a data frame of the grid squares needed for each sapflux tree (lines 84-88) and then
  • Uses that information to left_join nearby TEROS data to each sapflux tree's data (101-115)

It seems like this will be a fairly commonly-needed function...should we put it into compasstools (or elsewhere)?

Thoughts welcome. @stephpenn1 @peterregier @robertapeixoto ?

Metadata

Metadata

Assignees

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