plot_populations: Plotting the locations of a 'population'

View source: R/plot_populations.R

plot_populationsR Documentation

Plotting the locations of a 'population'

Description

Plots a data frame if that data frame has names indicated by the passed arguments stratum, Longitude, and Latitude. Otherwise it passes the object on to plot.default()

Usage

plot_populations(
  x,
  stratum = "Population",
  longitude = "Longitude",
  latitude = "Latitude",
  map.source = "google",
  map.type = "terrain",
  color = "black",
  zoom = NA,
  ...
)

Arguments

x

An object of type data.frame that has Longitude, Latitude, and Stratum variables.

stratum

The stratum to plot (default='Population').

longitude

Name of the column to be used as a decimal longitude

latitude

Name of the column to be used as decimal latitude

map.source

Where the map should be retrieved from. Common options include

google

Get the map from Google Maps (this is the default)

osm

Open Streat Map derived

map.type

What kind of map to use. Current types include:

sattelite

A satellite image of the area.

terrain

A stylized topological map (this is the default).

road

The default google road map.

hybrid

Mix of road and terrain maps.

color

The color of the markers to be plot.

zoom

The default zoom level when using google maps (default NA). If omitted the code will attempt to define the map by the bounding box defined by the coords

...

Ignored

Value

A ggplot object that will be plotted by default.

Author(s)

Rodney J. Dyer rjdyer@vcu.edu


dyerlab/gstudio documentation built on Feb. 2, 2024, 8:24 p.m.