Description Usage Details Source References Examples
texas.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).
All polygons are projected in CRS("+proj=longlat +datum=NAD83")
1 |
ID Variables
data field name | Full Description |
place | FIPS code |
state | State FIPS code |
name | CDP name |
designation | city/town/CDP/etc. |
Census Variables
Census SF1 Field Name | data field name | Full Description |
(P007001) | pop2000 | population 2000 |
(P007002) | white | white alone |
(P007003) | black | black or african american alone |
(P007004) | ameri.es | american indian and alaska native alone |
(P007005) | asian | asian alone |
(P007006) | hawn.pi | native hawaiian and other pacific islander alone |
(P007007) | other | some other race alone |
(P007008) | mult.race | 2 or more races |
(P011001) | hispanic | people who are hispanic or latino |
(P008002) | not.hispanic.t | Not Hispanic or Latino |
(P008003) | nh.white | White alone |
(P008004) | nh.black | Black or African American alone |
(P008005) | nh.ameri.es | American Indian and Alaska Native alone |
(P008006) | nh.asian | Asian alone |
(P008007) | nh.hawn.pi | Native Hawaiian and Other Pacific Islander alone |
(P008008) | nh.other | Some other race alone |
(P008010) | hispanic.t | Hispanic or Latino |
(P008011) | h.white | White alone |
(P008012) | h.black | Black or African American alone |
(P008013) | h.american.es | American Indian and Alaska Native alone |
(P008014) | h.asian | Asian alone |
(P008015) | h.hawn.pi | Native Hawaiian and Other Pacific Islander alone |
(P008016) | h.other | Some other race alone |
(P012002) | males | males |
(P012026) | females | females |
(P012003 + P012027) | age.under5 | male and female under 5 yrs |
(P012004-006 + P012028-030) | age.5.17 | male and female 5 to 17 yrs |
(P012007-009 + P012031-033) | age.18.21 | male and female 18 to 21 yrs |
(P012010-011 + P012034-035) | age.22.29 | male and female 22 to 29 yrs |
(P012012-013 + P012036-037) | age.30.39 | male and female 30 to 39 yrs |
(P012014-015 + P012038-039) | age.40.49 | male and female 40 to 49 yrs |
(P012016-019 + P012040-043) | age.50.64 | male and female 50 to 64 yrs |
(P012020-025 + P012044-049) | age.65.up | male and female 65 yrs and over |
(P013001) | med.age | median age, both sexes |
(P013002) | med.age.m | median age, males |
(P013003) | med.age.f | median age, females |
(P015001) | households | households |
(P017001) | ave.hh.sz | average household size |
(P018003) | hsehld.1.m | 1-person household, male householder |
(P018004) | hsehld.1.f | 1-person household, female householder |
(P018008) | marhh.chd | family households, married-couple family, w/ own children under 18 yrs |
(P018009) | marhh.no.c | family households, married-couple family, no own children under 18 yrs |
(P018012) | mhh.child | family households, other family, male householder, no wife present, w/ own children under 18 yrs |
(P018015) | fhh.child | family households, other family, female householder, no husband present, w/ own children under 18 yrs |
(H001001) | hh.units | housng units total |
(H002002) | hh.urban | urban housing units |
(H002005) | hh.rural | rural housing units |
(H003002) | hh.occupied | occupied housing units |
(H003003) | hh.vacant | vacant housing units |
(H004002) | hh.owner | owner occupied housing units |
(H004003) | hh.renter | renter occupied housing units |
(H013002) | hh.1person | 1-person household |
(H013003) | hh.2person | 2-person household |
(H013004) | hh.3person | 3-person household |
(H013005) | hh.4person | 4-person household |
(H013006) | hh.5person | 5-person household |
(H013007) | hh.6person | 6-person household |
(H013008) | hh.7person | 7-person household |
(H015I003)+(H015I011) | hh.nh.white.1p | (white only, not hispanic ) 1-person household |
(H015I004)+(H015I012) | hh.nh.white.2p | (white only, not hispanic ) 2-person household |
(H015I005)+(H015I013) | hh.nh.white.3p | (white only, not hispanic ) 3-person household |
(H015I006)+(H015I014) | hh.nh.white.4p | (white only, not hispanic ) 4-person household |
(H015I007)+(H015I015) | hh.nh.white.5p | (white only, not hispanic ) 5-person household |
(H015I008)+(H015I016) | hh.nh.white.6p | (white only, not hispanic ) 6-person household |
(H015I009)+(H015I017) | hh.nh.white.7p | (white only, not hispanic ) 7-person household |
(H015H003)+(H015H011) | hh.hisp.1p | (hispanic) 1-person household |
(H015H004)+(H015H012) | hh.hisp.2p | (hispanic) 2-person household |
(H015H005)+(H015H013) | hh.hisp.3p | (hispanic) 3-person household |
(H015H006)+(H015H014) | hh.hisp.4p | (hispanic) 4-person household |
(H015H007)+(H015H015) | hh.hisp.5p | (hispanic) 5-person household |
(H015H008)+(H015H016) | hh.hisp.6p | (hispanic) 6-person household |
(H015H009)+(H015H017) | hh.hisp.7p | (hispanic) 7-person household |
(H015B003)+(H015B011) | hh.black.1p | (black) 1-person household |
(H015B004)+(H015B012) | hh.black.2p | (black) 2-person household |
(H015B005)+(H015B013) | hh.black.3p | (black) 3-person household |
(H015B006)+(H015B014) | hh.black.4p | (black) 4-person household |
(H015B007)+(H015B015) | hh.black.5p | (black) 5-person household |
(H015B008)+(H015B016) | hh.black.6p | (black) 6-person household |
(H015B009)+(H015B017) | hh.black.7p | (black) 7-person household |
(H015D003)+(H015D011) | hh.asian.1p | (asian) 1-person household |
(H015D004)+(H015D012) | hh.asian.2p | (asian) 2-person household |
(H015D005)+(H015D013) | hh.asian.3p | (asian) 3-person household |
(H015D006)+(H015D014) | hh.asian.4p | (asian) 4-person household |
(H015D007)+(H015D015) | hh.asian.5p | (asian) 5-person household |
(H015D008)+(H015D016) | hh.asian.6p | (asian) 6-person household |
(H015D009)+(H015D017) | hh.asian.7p | (asian) 7-person household |
Census 2000 Summary File 1 [name of state1 or United States]/prepared by the U.S. Census Bureau, 2001.
http://www.census.gov/
https://www.census.gov/geo/maps-data/data/tiger-line.html
http://www.census.gov/prod/cen2000/doc/sf1.pdf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | data(texas.cdp)
############################################
## Helper function for handling coloring of the map
############################################
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
############################################
colors.use<-color.map(texas.cdp,texas.cdp$pop2000)
plot(texas.cdp,col=colors.use$colors)
#text(coordinates(texas.cdp),texas.cdp$name,cex=.3)
title(main="Census Designated Places \n of Texas, 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(texas.cdp)
map('state',region='texas')
plotvar <- texas.cdp$pop2000
nclr <- 4
#BuPu
plotclr <- brewer.pal(nclr,"BuPu")
class <- classIntervals(plotvar, nclr, style="quantile")
colcode <- findColours(class, plotclr)
plot(texas.cdp, col=colcode, border="transparent",add=TRUE)
#transparent
title(main="Census Designated Places\n of Texas, 2000",
sub="Quantiles (equal frequency)")
map.text("county", "texas",cex=.7,add=TRUE)
map('county','texas',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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.