Hey R gurus,
I'm bringing together multiple layers of remote sensing and gridded data to make maps in high latitude locations. I'm not having success with using projections within ggplot2 and at this point am thoroughly confused so figured it's time to post here ....
I think I'm misunderstanding how this all fits together and probably need to reproject the data or use more specific parameters.
For this example I just used "volcano" as a fake dataset in the approximate geographic area I'm making maps for (northern Canada).
library(ggplot2) library(reshape2) v <- melt(volcano) # Altering volcano data to have approx lat and lon range of my data v$Var1 <- (v$Var1 /10) - 130 v$Var2 <- (v$Var2 /10) + 65 colnames(v) <- c("long","lat","topo") # This works ggplot() + geom_tile(data = v, aes(x = long, y = lat, fill = topo)) + labs(fill = "Elevation (m)") + xlab(NULL) + ylab(NULL) + coord_quickmap(xlim = c(-129.9, -121.3), ylim = c(65.1, 71.1)) # Now trying to map with some projection g <- ggplot() + geom_tile(data = v, aes(x = long, y = lat, fill = topo)) + labs(fill = "Elevation (m)") + xlab(NULL) + ylab(NULL) # Anything I try seems to freeze and not plot... g + # coord_map("orthographic") # coord_map("ortho", orientation = c(90, 0, 0)) coord_map("conic", lat0 = 65)