Rlang(4)GIS-More Reading
1. GIS
Try to download the map data according to the documents.
https://onedrive.live.com/?id=5D2057381AF5B443%215970&cid=5D2057381AF5B443&group=0&parId=5D2057381AF5B443%215991&action=locate
Install the GIS package
install.packages("rgdal")
Install the Diagram Package
> install.packages("plotrix")
Load that package
require(rgdal)
require(plotrix)
Prepare Data
Sys.setlocale("LC_CTYPE","Chinese")
Sys.setlocale("LC_CTYPE", "en_RU.UTF-8")
cm <- readOGR("/opt/data/chinamap", "bou2_4p",
encoding = "UTF-8")
summary(cm)
levels(cm$NAME)
Hope we can get Data
pm <- c(100, 141, 80, 174, 99, 72, 104, 30, 175, 107, 121, 133, 135, 98, 120,
100, 135, 116, 132, 139, 149, 172, 136, 97, 118, NA, 133, 65, NA, 127, 86,
119, 147)
pm.col <- cm.colors(diff(c(30, 180)) + 1)[(pm - min(pm, na.rm = TRUE)) + 1]
cm$col <- cm$NAME
levels(cm$col) <- pm.col
plot(cm, col = as.character(factor(cm$col)))
color.legend(120, 20, 123, 2, c(expression("180 " * mu * "g m"^"-3"),
expression("120 " * mu * "g m"^"-3"),
expression(" 30 " * mu * "g m"^"-3")),
rev(cm.colors(diff(c(30,100)) + 1)), align = "rb", gradient = "y")
axis(1)
axis(2)
box()
2. Flash
…snip...
3. More Reading
A Beginner’s Guide to R.pdf
25. Recipes.for.Getting.Started.with.R.pdf
The.R.Book.pdf
The-R-Book—Second Edition.pdf
References:
http://dapengde.com/r4dummies
http://dapengde.com/archives/14905
http://dapengde.com/archives/14907
http://dapengde.com/archives/14909
GIS links
https://cran.r-project.org/web/views/Spatial.html
http://spatial-analyst.net/wiki/index.php?title=Main_Page
http://www.amazon.com/Applied-Spatial-Data-Analysis-Use/dp/0387781706