Learn R Programming

micromapST (version 1.1.1)

panelDesc: micromapST panel description data.frame structure

Description

The panelDesc data.frame provides the micromapST function with the information required to process the statsFrame data and panelData data.frames and to generate the required linked micromap plot. It specifies which columns in the statsFrame data.frame contain the data for each glyph column, the column types, labels, reference values and text, and when more complex data is needed by a glyph (boxplot and time series) what the name of the data structure..
  Example
    panelDesc = data.frame(
        type=c("mapcum","id","dotconf","dotconf"),
        lab1=c("","","White Males","White Females"),
        lab2=c("","","Rate and 95% CI","Rate and 95% CI"),
        lab3=c("","","Deaths per 100,000","Deaths per 100,000"),
        col1=c(NA,NA,"Rate",9), 
        col2=c(NA,NA,4,11),
        col3=c(NA,NA,5,12),
        colSize=c(NA,NA,5,5),
        refVals=c(NA,NA,NA,wflungUS[,1]),
        refTexts=c(NA,NA,NA,"US Rate"),
        panelData=c("","","","")
     
The panelDesc data.frame (which does not have to be named "panelDesc", any name will do) provides the means of defining how many columns to create, the type of glyph per column, where the data required by the glyph is located in the statsFrame (column number or name) or the name of a supplimental data structure when the glyph is boxplots or time series (via the panelData list entry), the column titles, and the column's reference value and label for the link micromap generation. In the following description the term "AREA" represents the geographic unit being mapped and associated with data in the statsFrame. The naming used must match the border group specified. If the border group of "USStatesDF" is used, the areas are U.S. States and DC and 51 data rows must be present. If the border group of "USSeerDF" is used, the areas are U.S. Seer areas as defined by NCI and the number of data rows can be 9, 11, 13, 17 or 18. In all cases, the abbreviations and names defined in the border group dataset must be used in preparing the statsFrame and panelData structures. Glyph Types The type vector defines the type of glyph to be used for each column. The available glyphs are:

The following provides a description of each panel type:

Labels (Column Headers and Footers) micromapST supports up to 3 column labels or titles: lab1, lab2 and lab3, where lab1 and lab2 are header titles for the column. lab3 is the footer title for the column. All titles are optional. lab3 is used to indicate the unit of measure at the bottom of the columns, but is not limited to this use. For example:

     lab1=c("Col1-Title", "Col2=Title", "Col3-Title" ) # 1st title for columns
     lab2=c("Col1-Sub",   "Col2-Sub",   "Col3-Sub"   ) # 2nd title for columns
     lab3=c("Col1-Footer","Col2-Footer","Col3-Footer") # Footer title for columns
    
lab4 is used only when time series or scatter dot glyphs are used to provide a Y axis title for the column. All label-title vectors are optional and only required when an title or label is needed. Data References Depending on the type of glyphic selected for the column, 1 to 3 data values for each area may be required: The col1, col2 and col3 vectors serve as indexes to columns in the statsFrame data.frame passed in the arguments of the micromapST function call. The values can be either the numeric number of the row in statsFrame data.frame or the column name. If no index is required, the entry should be set to NA. If the glyph requires one value, then only the col1 index is used and the col2 and col3 indexes are set to NA if present . If 2 values are required, then col1 and col2 indexes are used and the col3 index is set to NA, if present. If 3 values are required, then col1, col2, and col3 indexes are used. The statsFrame column indexes can be provided as an integer or the column name. If the integer value is less than 1 or greater than the number of columns in statsFrame or a column name is used that does not exist in statsFrame, the micromapST function will stop and generate an error message.

Glyph Meaning col1 col2 col3
panelData Name
arrow Arrow
Beginning Ending Values NA NA
Values (arrow head)
bar Horizontal
Bar end NA NA NA
bar values
(length)
segbar Horizontal
Values for Values for NA NA
stacked first (left the last
bar -most) segment (right-most)
(length) bar segment
(length)
normbar
Horizontal Values for Values for NA NA
stacked first (left- last (right-
bar, nor- most) bar most,bar
malized to segment
segment total 100%
(length) (length)
ctrbar Horizontal Values for Values for NA
NA stacked first (left- last (right-
bar, cen- most) bar
most,bar tered on
segment segment
the middle (length) (length)
bar
boxplot Horizontal NA
NA NA Name of box plot
output
list from
call to
boxplot(...plot=F)
dot Dot
Values for NA NA NA
dots
dotconf
Dot with Values Values of Values for NA
confidence for dots lower limits upper limits tab
interval
line
dotse
Dot with Values for Standard NA NA
line length dots errors
+/- standard
error
dotsignf Dot Values for P value NA
NA overprinted dots associated
if not
with dot significant
scatdot Scater plot Values on Values on
NA NA of dots horizontal
vertical
(x) axis (y) axis
ts Time Series NA NA
NA Name of array (line) plot
with dimensions
of c(51,t,2),
where t = #
of time points
(max 15), x values
in [,,1], y values
in [,,2]
tsconf Time Series NA NA NA
Name of array (line) plot
with dimensions with confidence
of c(51,t,4), as ts limits
lower limit is
[,,3] amd the
upper limit is
[,,4]
Glyph Meaning
The panelData vector is only used when a glyph requires more data per area than can be provided by the statsFrame columns. Only glyphs using this vector are boxplots and time series. In the case of the boxplot glyph, the boxplot function with plot=F is used to generate the boxplot statistical details for each area. The name of the resulting list of 51 sets of boxplot statistics (one for each area) is placed in the panelData vector element for the boxplot column. For the time series and time series with confidence interval, the glyphs require a 3 dimensional array of data. The first dimension ([area,,]) represents the areas. The second dimension ([,t,]) ranges from 2 to n. There is no upper limit, but 200-250 samples is a practical limit. One for each data point. The third dimension ([,,v]) provides the values at data point vart for area st. [,,var1] is the x axis value. For time series, is usually just the value 1 to n to order the y values. [,,2] is the median y value. For time series with confidence intervals: [,,3] is the lower value y and [,,4] is the upper value y. Reference Lines Reference lines can be created in arror, bar, dot, dotconf, dotse, and segbar glyphs by specifying the reference values in the RefVal= vector. A label appearing at the bottom of the column can be specified using the RefTxt= vector in the panelDesc data.frame.

Usage

panelDesc

Arguments

Format

The parameters in the panelDesc data.frame structure are:

Details

The panelDesc data.frame is used to describe the content of the micromapST plot to the function. It contains the index of the data in the statsFrame data.frame, the types of graphics to be used in each column, titles, column headers, reference values and labels, etc.

See Also

micromapST