demographics: Selects a specified demographic meta-data from the sp...

Description Usage Arguments Value Warning Author(s) References See Also Examples

Description

demographics allows the user to pull out one or more demographic variables at several different geographic levels.

Usage

1
2
3
demographics(dem = "pop2000", state, statefips=FALSE, 

level = c("tract", "blk", "blkgrp", "cdp","msa","county"), msaname=NULL)

Arguments

dem

Character string or vector. Must be the actual name of the demographic variables attached to UScensus2000 objects. Default dem = "pop2000"

state

a character string, can either be the full name of a state (e.g. "oregon"), the abbreviation (e.g. "or"), or the FIPS code (e.g. "41")– note that if you are using the FIPS code you have to change statefips to TRUE. This variable is insensitive to case.

statefips

logical, by default statefips=FALSE, set to TRUE if using the state FIPS codes.

level

a character string, takes levels tract, blk, blkgrp, cdp, msa or county

msaname

logical (optional), if level="msa", allows the use of the verbose MSA placename (capitalized).

Value

An object of class matrix.

Warning

You must have the packages UScensus2000blkgrp and UScensus2000blk installed to use levels "blkgrp" and "blk" respectively.

Author(s)

Zack W. Almquist almquist@uci.edu

References

Zack W. Almquist (2010). US Census Spatial and Demographic Data in R: The UScensus2000 Suite of Packages. Journal of Statistical Software, 37(6), 1-31. http://www.jstatsoft.org/v37/i06/.

Census 2000 Summary File 1 [name of state1 or United States]/prepared by the U.S. Census Bureau, 2001.
http://www.census.gov/prod/cen2000/doc/sf1.pdf

See Also

county, MSA, city

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(UScensus2000tract)
library(UScensus2000cdp)
##MSA example
bayarea<-demographics(dem=c("pop2000","white","black"),"CA",level="msa",msaname="San Francisco")

## Print it out
bayarea
##Note that the columns are labeled by the county FIPS code.

##CDP example
ca.cdp<-demographics(dem=c("pop2000","white","black"),"CA",level="cdp")

##Print out in alphabetic order
ca.cdp[order(rownames(ca.cdp)),]

UScensus2000 documentation built on May 2, 2019, 5:13 p.m.