new_jersey.cdp(UScensus2000cdp)
new_jersey.cdp()所属R语言包:UScensus2000cdp
new_jersey.cdp
new_jersey.cdp
译者:生物统计家园网 机器人LoveR
描述----------Description----------
new_jersey.cdp is a SpatialPolygonsDataFrame with polygons made from the 2000 US Census tiger/line boundary files (http://www.census.gov/geo/www/tiger/) for Census Designated Places (CDP). It also contains 86 variables from the Summary File 1 (SF 1) which contains the 100-percent data (http://www.census.gov/prod/cen2000/doc/sf1.pdf).
new_jersey.cdp是一个SpatialPolygonsDataFrame从2000年美国人口普查虎/线路边界的文件(http://www.census.gov/geo/www/tiger/)政府指定的地方(CDP)的多边形。它也包含了86个变量的概要文件(SF),其中包含了100%的数据(http://www.census.gov/prod/cen2000/doc/sf1.pdf)。
All polygons are projected in CRS("+proj=longlat +datum=NAD83")
所有的多边形预计在CRS(“+ PROJ = longlat +基准= NAD83”)
用法----------Usage----------
data(new_jersey.cdp)
Details
详细信息----------Details----------
ID Variables <br>
ID变量参考
</table>
</ TABLE>
Census Variables <br>
人口普查变量参考
</table>
</ TABLE>
源----------Source----------
Census 2000 Summary File 1 [name of state1 or United States]/prepared by the U.S. Census Bureau, 2001.
2000年人口普查汇总文件名称状态1或美国/美国人口普查局2001年。
参考文献----------References----------
http://www.census.gov/ <br> http://www2.census.gov/cgi-bin/shapefiles/national-files <br> http://www.census.gov/prod/cen2000/doc/sf1.pdf <br>
实例----------Examples----------
data(new_jersey.cdp)
############################################[###########################################]
## Helper function for handling coloring of the map[#Helper功能的图着色处理]
############################################[###########################################]
color.map<- function(x,dem,y=NULL){
l.poly<-length(x@polygons)
dem.num<- cut(dem ,breaks=ceiling(quantile(dem)),dig.lab = 6)
dem.num[which(is.na(dem.num)==TRUE)]<-levels(dem.num)[1]
l.uc<-length(table(dem.num))
if(is.null(y)){
col.heat<-heat.colors(16)[c(14,8,4,1)] ##fixed set of four colors[#固定的四种颜色]
}else{
col.heat<-y
}
dem.col<-cbind(col.heat,names(table(dem.num)))
colors.dem<-vector(length=l.poly)
for(i in 1:l.uc){
colors.dem[which(dem.num==dem.col[i,2])]<-dem.col[i,1]
}
out<-list(colors=colors.dem,dem.cut=dem.col[,2],table.colors=dem.col[,1])
return(out)
}
############################################[###########################################]
## Helper function for handling coloring of the map[#Helper功能的图着色处理]
############################################[###########################################]
colors.use<-color.map(new_jersey.cdp,new_jersey.cdp$pop2000)
plot(new_jersey.cdp,col=colors.use$colors)
#text(coordinates(new_jersey.cdp),new_jersey.cdp$name,cex=.3)[的文本(坐标(new_jersey.cdp),new_jersey.cdp的名称,CEX = 0.3)]
title(main="Census Designated Places \n of New_jersey, 2000", sub="Quantiles (equal frequency)")
legend("bottomright",legend=colors.use$dem.cut,fill=colors.use$table.colors,bty="o",title="Population Count",bg="white")
###############################[##############################]
### Alternative way to do the above[##另一种方法做上述]
###############################[##############################]
## Not run: [#不运行:]
####This example requires the following additional libraries[###这个例子需要额外的库]
library(RColorBrewer)
library(classInt)
library(maps)
####This example requires the following additional libraries[###这个例子需要额外的库]
data(new_jersey.cdp)
map('state',region='new_jersey')
plotvar <- new_jersey.cdp$pop2000
nclr <- 4
#BuPu[BuPu]
plotclr <- brewer.pal(nclr,"BuPu")
class <- classIntervals(plotvar, nclr, style="quantile")
colcode <- findColours(class, plotclr)
plot(new_jersey.cdp, col=colcode, border="transparent",add=TRUE)
#transparent[透明]
title(main="Census Designated Places\n of New_jersey, 2000", sub="Quantiles (equal frequency)")
map.text("county", "new_jersey",cex=.7,add=TRUE)
map('county','new_jersey',add=TRUE)
legend("bottomright","(x,y)", legend=names(attr(colcode, "table")),fill=attr(colcode, "palette"),
cex=0.9, bty="o", title="Population Count",bg="white")
## End(Not run)[#(不执行)]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|