urban_records_extract: This function takes a data frame from Ubran sources (e.g....

Description Usage Arguments Value

Description

This function takes a data frame from Ubran sources (e.g. I-naturalist), and extracts enviro values. It assumes that the urban dataframe has these columns : species, lat, lon, Country, INVENTORY, SOURCE

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
urban_records_extract(
  urban_df,
  species_list,
  thin_records,
  template_raster,
  world_raster,
  prj,
  biocl_vars,
  env_vars,
  worldclim_grids,
  save_data,
  data_path,
  save_run
)

Arguments

urban_df

Data.frame of Urban records (only used if you have urban data, e.g. I-naturalist)

species_list

Character string - List of species analysed, used to cut the dataframe down

thin_records

Do you want to thin the records out? If so, it will be 1 record per 1km*1km grid cell

template_raster

A global R Raster used to thin records to 1 record per 1km grid cell

world_raster

An global R Raster of the enviro conditions used to extract values for all records

prj

The projection system used. Currently, needs to be WGS84

biocl_vars

The variables used - eg the standard bioclim names (https://www.worldclim.org/).

env_vars

The actual anmes of the variables (e.g. bio1 = rainfall, etc.) Only needed for worldlcim

worldclim_grids

Are you using worldclim stored as long intergers? If so, divide by 10.

save_data

Do you want to save the data frame?

data_path

The file path used for saving the data frame

save_run

Character string - run name to append to the data frame (e.g. bat species, etc.). Useful for multiple runs.

Value

Data frame of all urban records, with global enviro conditions for each record location (i.e. lat/lon)


HMB3/sdmgen documentation built on April 16, 2021, 7:29 p.m.