Show the code
library(plotly)
It is not necessary to understand the code here. But I learned a lot from: https://plotly.com/r/#maps.
plotly
LibraryThis part is admittedly a little complicated, mostly because I added options to get the map to look exactly the way that I wanted.
mymap <- plot_geo() %>%
layout(title = "Demonstration Map",
geo = list(showland = TRUE, # show land
landcolor = toRGB("darkgrey"), # land color
showcountries = TRUE, # show countries
showocean = FALSE, # show ocean
oceancolor = "lightblue", # ocean color
lataxis = list(showgrid = TRUE, # latitude options
gridcolor = toRGB("grey")),
lonaxis = list(showgrid = TRUE, # longitude options
gridcolor = toRGB("grey"))))
mymap # replay
Perpendicular latitude and longitude. Can be helpful in some kinds of navigation, but areas are distorted, especially as one approaches the poles.
An equal area projection.
An attempt to compromise between equal areas and a natural looking map.