Skip to content

Add WorldClim extraction script under scripts/#2

Draft
sarahkanee wants to merge 1 commit intomainfrom
cursor/worldclim-script-ca2c
Draft

Add WorldClim extraction script under scripts/#2
sarahkanee wants to merge 1 commit intomainfrom
cursor/worldclim-script-ca2c

Conversation

@sarahkanee
Copy link
Copy Markdown
Owner

Summary

Adds scripts/worldclim.R, which downloads WorldClim 2.1 BioClim layers (10 arc-minute) via geodata::worldclim_global() and extracts values at NEON aquatic field sites from the standard NEON metadata CSV.

Bug fix

Current geodata no longer exports worldclim(); the correct entry point is worldclim_global() with the same var, res, and path arguments.

Usage

From the repo root (with terra and geodata installed):

Rscript scripts/worldclim.R

Outputs scripts/worldclim_neon_aquatic_sites.csv and caches rasters under scripts/worldclim_cache/ (both gitignored).

Verification

Ran Rscript scripts/worldclim.R successfully; produced 34 site rows plus header.

Open in Web Open in Cursor 

geodata renamed worldclim() to worldclim_global(); the script writes
BioClim extractions for NEON aquatic sites next to the script and
caches rasters under scripts/worldclim_cache/. Ignore local R_libs
and generated outputs.

Co-authored-by: sarahkanee <sarahkanee@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants