USDmapCount {BSTZINB} | R Documentation |
Creates a map of any given quantity (at a selected time or averaged over time) for regions in the US specified by state and county
USDmapCount(state.sel,dat,scol,tcol=NULL,tsel=NULL,cname,uplim=NULL)
state.sel |
character vector giving the selected states |
dat |
data frame having named components: y - the necessary quantity (numeric), sid - the region indices, tid - the time indices |
scol |
column index of the spatial regions |
tcol |
(optional) column index of the time points |
tsel |
(optional) selected time point |
cname |
character vector of county names, must match those in USAcities |
uplim |
(optional) numeric, upper limit for the given quantity |
spatial map of the required quantity over the specified region
data(simdat)
data(county.adjacency)
data(USAcities)
IAcities <- subset(USAcities,state_id=="IA")
countyname <- unique(IAcities$county_name)
USDmapCount(state.sel="IA",dat=simdat,scol=1,tcol=2,tsel=150,cname=countyname)