vis_location_biome: Plot a diagram of biomes with sites as dots

Description Usage Arguments Value See Also Examples

Description

vis_location_biome produces a ggplot object showing the biomes as colored areas according to mean annual temperature (MAT) and mean annual precipitation (MAP), using the function vis_biome, and adds the sites on it according to their values of MAT and MAP, obtained using the function gd_get_biome if not provided.

Usage

1
2
vis_location_biome(data, si_lat, si_long, si_mat, si_map, point_labels,
  col_fill = "white", merge_deserts = FALSE)

Arguments

data

Data frame including either geographical coordinates (latitude and longitude) or climatic data (MAT and MAP).

si_lat

Character, name of the column containing latitude values in decimal degrees or, alternatively, if data not provided, a numeric value of latitude.

si_long

Character, name of the column containing longitude values in decimal degrees or, alternatively, if data not provided, a numeric value of longitude.

si_mat

Character, name of the column containing mean annual temperature values in degrees Celsius or, alternatively, if data not provided, a numeric value of MAT.

si_map

Character, name of the column containing mean annual precipitation values in millimeters or alternatively, if data not provided, a numeric value of MAP.

point_labels

A character vector the same length of the number of sites to be plotted, indicating site labels. If missing, no labels are plotted.

col_fill

A character vector the same length of the number of sites to be plotted, indicating the fill color for site points, or alternatively a character vector of length one indicating a single fill color for all sites. The default is white.

merge_deserts

Logical indicating if desert biomes should be merged in a single biome. By default, deserts are not merged.

Value

A ggplot object showing the biomes and sites.

See Also

Other Visualization.Functions: vis_biome

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Create a data frame with coordinates
sites <- data.frame(site = c("A", "B"), lat = c(69.49, 41.43),
                    long = c(27.23, 2.07))

# Create a ggplot diagram of the biomes with sites
vis_location_biome(sites, si_lat = "lat", si_long = "long",
                   point_labels = sites$site)

# Alternatively, for one site
vis_location_biome(si_mat = 15.8, si_map = 622, col_fill = 'red')

guillembagaria/ggbiome documentation built on May 17, 2019, 9:26 a.m.