population_map: Retrieve a map for a set of populations.

View source: R/population_map.R

population_mapR Documentation

Retrieve a map for a set of populations.

Description

This function uses the ggmap package to grab a map of the area where the samples in the , are located.

Usage

population_map(coords, map.source = "google", map.type = "terrain", zoom = NA)

Arguments

coords

A data.frame that has Strata, Latitude, and Longitude

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.

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

Value

A map raster

Note

This is a bit of a rough attempt and should be used only sparingly. I have found that the ability to get Google Maps that cover all the sites is a bit difficult unless you play around with the zoom option. Google has fixed zoom levels so you may need to try this a few times before getting what you want.

Author(s)

Rodney J. Dyer rjdyer@vcu.edu


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