MSA: Selects one MSA from a given state.

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

Description

MSA allows the user to pull out the polygon and metadata of one MSA from any given state for any of three levels: tract, blockgroup, or block.

Usage

1
2
MSA(msafips = NULL, msaname = NULL, state=NULL , 
statefips=FALSE, level = c("tract", "blk", "blkgrp"), proj = NULL)

Arguments

msafips

a character string, takes a four digit MSA FIPS code (e.g. "0040" of Texas)

msaname

a character string, this can either be in conjunction with the variable state or not. Case 1: Full MSA name (state should be left NULL in this case) (e.g. "Abilene, TX MSA"); this must be exact. Case 2: takes one of the city names of the MSA and the one of the states which contain the MSA (e.g. msaname="Albany" and state= "NY").

state

a character string, this takes in a state abbreviation in capitals in conjunction with msaname, see above for more details.

statefips

logical, by default statefips=FALSE, change to TRUE when providing state with a FIPS code.

level

a character string, takes in one of three values: "tract", "blk", or "blkgrp". This defines the geographic level of data for the MSA.

proj

CRS-class, takes a CRS object (e.g. CRS("+proj=utm +zone=10 +datum=NAD83") ); This is simply a wrapper for the spTransform function in rgdal . WARNING requires rgdal package.

Value

An object of class SpatialPolygonsDataFrame.

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Not run: 
## Load the data files for MSA names and MSA FIPS codes
data(MSAnames)
data(MSAfips)

## Save the FIPS code for Abilene, TX MSA
ab.fips<-MSAfips$msa.cmsa.fips[1]

###Use the MSA FIPS code
Abilene<-MSA(msafips=ab.fips,level="tract")

###USe the MSA full name
Abilene<-MSA(msaname="Abilene, TX MSA",level="tract")

##Use the msaname alternative
portland<-MSA(msaname="Portland",state="OR",level="tract")


##Plot Portland
plot(portland)
title("Portland MSA, OR 2000")

## End(Not run)

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