Rlang(4)GIS-More Reading

本文介绍了使用R语言进行GIS应用的实践案例,包括下载地图数据、安装相关包、准备数据集、绘制热力图等步骤,并提供了详细代码示例。此外,还推荐了一些R语言GIS资源和链接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值