Description Usage Arguments Examples
Function to generate Map 1 in hkm2014ESA poster
1 |
states |
data for states, as data.frame |
lakes |
point locations for lake samples as data.frame |
cats |
plot ts categories? |
myColor |
vector of length 3 with colors for fill, lines, and points in that order |
1 2 3 4 5 6 7 8 9 | state<-map_data('state')
lakes_alb<-data.frame(ltmData[["AlbersX"]],ltmData[["AlbersY"]])
p4s<-"+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=37.5 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"
ll<-"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
lakes_alb_sp<-SpatialPoints(coordinates(lakes_alb),proj4string=CRS(p4s))
lakes_dd<-spTransform(lakes_alb_sp,CRS=CRS(ll))
lakes_dd<-data.frame(coordinates(lakes_dd))
names(lakes_dd)<-c("long","lat")
nlaMap(state,lakes_dd)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.