Description Usage Value Examples
to_wgs84 is a convenience function that transforms the CRS of an sp class object to the WGS 1984 (EPSG:4326) coordinate system.
1 | to_wgs84(x)
|
An sp class object.
1 2 3 4 5 6 7 8 | ## Not run:
# plot 2015 homicides on web contextual layer
h2015 <- subset(crimes.munged, OFFENSE1 == "HOMICIDE" & year == "2015")
h2015 <- to_wgs84(h2015) # projection used for webmaps
m <- data.frame(slot(h2015, "coords"), slot(h2015, "data"))
names(m)[1:2] <- c("lon", "lat")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.