ll2webdata: Download online data for spatial locations that are needed...

View source: R/loc_onlineinfo.R

ll2webdataR Documentation

Download online data for spatial locations that are needed for particular models.

Description

Downloads required data for spatial locations in order to run model.

Usage

ll2webdata(coords, years, model = "7_4")

ll2worldclim(coords)

ll2woodybuffer(coords, years, buffer = 500, maxattempts = 5, epsgrect = 8058)

Arguments

coords

An sf object with coordinates.

years

Years of woody cover to use.

model

A character code providing the model for which data to acquire

buffer

is radius to average woody vegetation in metres.

epsgrect

The numerical ID of a coordinate reference system to temporarily use for rectangular operations like distances. Must have units of metres. Default of 8058 is the GDA2020 / NSW Lambert coordinate system.

Value

A dataframe with columns of woody500m each year, and climatic information.

Functions

  • ll2worldclim: Get worldclim data

  • ll2woodybuffer: Compute woody buffer information for a list of coordinates

Examples

locations <- read.csv("./private/data/clean/site_locations_cleaned.csv")
locs <- sf::st_as_sf(locations, coords = c("MeanLON", "MeanLAT"), crs = 4326)
coords <- locs[ locs$StudyCode == "Nanangroe Natural Experiment", ]
fromwebdata <- ll2webdata(coords, 2017:2019)

sustainablefarms/sflddata documentation built on April 19, 2022, 11:19 a.m.