dgDivgeomap.Rd
The density of biodiversity in geographic map.
dgDivgeomap(data, x, y, lon = c(-160, 160), lat = c(-60, 70), mapsource = "osm", mapcolor = "color", maptype = "satellite", point_color = "red", pointalpha = 0.2, pointsize, ...)
data | A data frame contains the longitute, latitude, and diversities of each location. |
---|---|
x | The longitude of the sampling location |
y | The latitude of the sampling location |
lon | The range of longitude in a map |
lat | The range of latitude in a map |
mapsource | The map sources,Google Maps ("google"), OpenStreetMap ("osm"), Stamen Maps ("stamen") |
mapcolor | color ("color") or black-and-white ("bw") |
maptype | character string providing map theme. options available are "terrain", "terrain-background", "satellite", "roadmap", and "hybrid" (google maps), "terrain", "watercolor", and "toner" (stamen maps), or a positive integer for cloudmade maps (see ?get_cloudmademap) |
point_color | The colour of diversity point |
pointalpha | The value used to plot the points. |
pointsize | The values used to indicate the relative size the points(diversity). |
... | passing to ggplot2. |
This function plots the diversity and density of the diversity map using "ggmap"and "ggplot2".
A density and diversity geographic map.
Wickham, H. (2011). ggplot2. Wiley Interdisciplinary Reviews: Computational Statistics, 3(2), 180-185.
Kahle, D., & Wickham, H. (2013). ggmap: Spatial Visualization with ggplot2. The R journal, 5(1), 144-161.
Qin, X. (2019). HierDpart: partitioning hierarchical diversity and differentiation across metrics and scales, from genes to ecosystems. R package version 0.5. 0 https://cran. r-project. org/package= HierDpart.
qinxinghu@gmail.com
data(Dprofile) dgDivgeomap(Dprofile,x=Dprofile$Longitude, y=Dprofile$Latitude,lon = c(-160, 160), lat = c(-60, 70), mapsource = "osm", mapcolor = "color", maptype="satellite", point_color="red", pointalpha = .2, pointsize=normalize(Dprofile$Dq1)*10)#>#>#>#>#>#>#>#>#>#>#>#>