plot_map: Plot Map

plot_mapR Documentation

Plot Map

Description

Creates a ggplot2 object with a polygon of British Columbia. If any columns are required for additional layers in the plot or facetting then they should be specified in the keep argument.

Usage

plot_map(
  data,
  x = "Long",
  y = "Lat",
  size = 3,
  shape = 21,
  fill = 10,
  keep = NULL,
  input_proj = NULL
)

Arguments

data

A data.frame with spatial information to map.

x

A string of the column in data to plot on the x axis.

y

A string of the column in data to plot on the y axis.

size

A number of the point size or a string of the column in data to represent by the size of points.

shape

An integer of the point shape (permitted values are 21 to 25) or a string of the column in data to represent by the shape of points.

fill

An integer of the point fill colour or a string of the column in data to represent by the fill colour of points.

keep

An optional character vector indicating which columns in addition to x and y to keep before dropping duplicated rows to avoid overplotting.

input_proj

An optional valid proj4string. Defaults to ("+proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs").

See Also

plot_map_wqis

Examples

library(ggplot2)
library(sp)
library(rgdal)
library(wqbc)

data(fraser)
plot_map(fraser)

## Not run: 
 demo(fraser)

## End(Not run)

bcgov/wqindex documentation built on Feb. 17, 2024, 9:23 a.m.