micromapGDefaults {micromapST}R Documentation

micromapGDefaults data.frame structure

Description

The micromapGDefaults data.frame provides all of the detailed structure, colors, sizing, font sizes, separation distances, line weights and types, spacing, etc. required to physically construct the requested micromapST graphic in portrait or landscape modes from a letter size (8.5 x 11) up to a tabloid (11 x 17) page. The data.frame is mainly used internal to micromapST, but a copy can be obtained by a user when a large number of changes are required. This is not recommended. The primary purpose of this section is to provide a list and description of many of the variables in the details list that can be used to enable or disable functions of micromapST and its glyphs. These internal variable are identified by a "*" after the variable name. These are the only variables that generally safe to be modified by the user.

Details

The data.frame contains two lists: colors and details.

colors

The colors vector is the name of a color palette or a vector of 12 or 24 color names or values ("#xxxxxx" or name). The first twelve (12) colors are used to link the areas to the glyphs. The second 12 colors are used with the Time Series glyphs when transparent colors are required for the confidence band. The vector defines the 12 colors and their transparent equal are:

  • The 6 colors in each group for the states/areas and symbols in the glyphcs. One color per row (area). The 6th color is not used at this time.

  • 1 color for the median state and glyphics and is generally black,

  • 1 foreground color for highlighted states in the map. This is used to highlight states already referenced previously or have meaning depend on the type of map requested. The usage is as follows:

            "map"       - not used.
            "mapcum"    - highlight states previously 
                          referenced above (a previous 
                          group/row).
            "maptail"   - highlight states previously 
                          referenced above the median row 
                          and highlight remaining states not 
                          featured below the median row.
            "mapmedian" - highlight all states not featured 
                          above the median in maps above the 
                          median row and highlight all states 
                          not featured below the median in maps 
                          below the median row.
           
  • 2 colors to represent non-featured areas above the median row and below the median row.

  • 1 color to fill in non-referenced areas on the map. These are areas in the border group, but the user has not provided any data row in the statsDFrame supplied in the micromapST function call.

  • 1 color to fill in non-active area. That is an area that in not referenced in the name table and can't be matched to any user data.

The additional 12 colors are the same colors defined above but modified 20% tranparency to provide a set of "transparent" colors for confidence graphs like the time series. This is done via the adjustcolors(colors,0.2) function. Only the first 6 of the transparency colors are used. The other 6 colors are reserved for future requipments.

If colors parameter can also be set to a single value to enable black and white color schemes. The acceptable values are; "greys" or "grays" or "bw". When specified, the entire plot will be done using the packages standard black/white/gray shades designed to support b&w duplication, color blindness and non-color publication.

Additional color palettes may be supported in future releases.

The package default 24 colors will be used:

  • 5 state colors: "red", "orange", "green", "greenish blue", "lavender", "magenta",

  • 1 median state color: "black",

  • 1 highlighted area: "light yellow",

  • 2 above and below median highlighted areas: light red, light blue,

  • 1 color for non refernce (used) areas in the data,

  • 1 color for non-active areas in the border group,

  • 12 translucent colors using the above colors at 20%.

It is strongly recommended to use the default. When changing the colors list, then the entire list must be specified.

details

is a list structure that contains the internal variables and values used by micromapST to create the graphics structure layout and guide the operations of the micromapST function. The details internal variables provide a way to tune the look of the created link micromap and its glyphs. These internal variables are divided into two groups: General and Advanced. The general variable don't affect how the panels are constructed, but allow you to change the looks of the graphics: dot, shapes, colors, line weights, etc. The advanced variable affect the structure of the panels and how areas are presented. The following internal variable accessible through the details named list are grouped by general usage and their glyph types.

To change the values of items in the details list, only the variable(s) requiring change need to be specified as a list for the details=list() parameter in the call. In general, the beginning of the variable names indicates the glyph or glyph group the variable is associated, in most cases.

               Arrow.    -> arrow glyph
               Bar.      -> bar glyph
               BoxP      -> boxplot glyph
               CBar      -> ctrbar glyph
               CSNBar    -> ctrbar, segbar and normbar glyphs. 
               Dot.      -> dot, dotconf, and dotse glyphs
               Dot.conf. -> dotconf glyph
               Dot.Signf -> dot with significance overlay.
               Grid      -> grid elements of all glyphs
               Id.       -> id glyph
               Map.      -> map glyphs
               Panel     -> general glyph panel
               Rank      -> area ranking glyphs.
               Ref       -> Reference text and line
               SCD.      -> scatter dot glyph
               SNBar     -> segbar and normbar glyphs
               Title     -> page and column labels and titles
               TS        -> ts and tsconf glyph
               TSconf    -> tsconf glyph
              

For example: to turn off the midpoint dot in the segmented bar glyphics, all that is required is:

          details = list(SNBar.Middle.Dot=FALSE)
       
General Variables:

The following are the internal variables for the XAxis, Grid, Panels, Reference Line, and the Glyphs.

X-Axis variables:
XAxis.Sp.mcex

= 0.2 Size used for XAxis space between lines of labels

XAxis.indent

= 10 in 1000th of an inch. First and Last label indents from edge.

XAxis.nGridpIn

= 3.4 labels per inch in XAxis - initial objective.

XAxis.gapPC

= 0.75 (*100 for precentage). Percentage of the width of a space used to determine label overlaps.

Y-Axis variables:
YAxis.width

= 0.2 inches. Extra column gap size required to support drawing an Y-Axis for TS and ScatDot glyphics

Grid and Panel Variables:
Grid.Line.col

= "white" Grid line color

Grid.Line.lwd

= 1, Grid line width


Panel.Fill.col

= "#676767FF", defaults to light gray

Panel.Outline.col

= "black", color of panel outlines

Reference Line and Text:

The following variable related to the reference text and line feature.

Ref.Val.lty

= "dashed", set reference value line to dashed

Ref.Val.lwd

= 1.5, line width of reference line

Ref.Val.col

= "midgreen", color of reference line when color is used.

Ref.Val.BW.col

= "black", color of reference line when grays are used.


Ref.Text.col

= "black", color of reference line text when color is used.

Ref.Text.BW.col

= "black", color of reference line text when grays are used.

Arrow Glyph:

The following variables are used by the arrow glyph.

Arrow.lwd

= 2.5, line width of arrow.

Arrow.cex

= 0.08, size of arrow ( not implemented )

Arrow.Head.length

= 0.08, length of arrow.


Arrow.Dot.pch

= 21, arrow-dot symbol 19-25.

Arrow.Dot.pch.size

= 0.9 cex, arrow-dot size.

Arrow.Dot.pch.lwd

= 0.5, line weight used on filled arrow-dot symbols.


Arrow.Dot.Outline

= FALSE, include dot outline when filled. FALSE=NO, TRUE=YES

Arrow.Dot.Outline.col

= "black", color used for arrow-dot outline.

Arrow.Dot.Outline.lwd

= 0.5, line weight for arrow-dot outline.

Bar Glyph:

The following variables are used by the bar glyph.

Bar.barht

= 2/3, fraction of line height for bar. Should never be > .90. Usable range is 0.333 to 0.90

Bar.Outline.col

= "black", color of bar outline.

Bar.Outline.lwd

= 0.5, line width for bar outline

Bar.Outline.lty

= "solid", line type for bar outline

Boxplot Glyph:

The following variables are used by the boxplot glyph.

BoxP.thin

= 0.2, line width of box.

BoxP.thick

= 0.6, thick line width.

BoxP.Use.Black

= FALSE, whether to outline the outlier points.


BoxP.Median.col

= "black", color of median box

BoxP.Median.Line

= 0.80, line width of median line.


BoxP.Median.Dot.lwd

= 2, line width for median.


BoxP.Outlier.lwd

= 0.4, line width of outlier outlines.

BoxP.Outlier.cex

= 0.7, size of outlier dots.

BoxP.Outlier.BW.col

= "#4c4c4cFF" color of outliner lines when greys used.

Dot, Dotconf, and DotSE glyphs:

The following variables are used by the dot, dotconf, dotsignif, and dotse glyphs.

Dot.pch

= 21, solid circle (S compatible).

Dot.pch.size

= 0.9 cex, size of dot.

Dot.pch.lwd

= 0.5, linen weight for dot outline when 0:18 dot used.


Dot.Outline

=FALSE, whether to outline the dots.

Dot.Outline.col

= "black", color of dot outline.

Dot.Outline.lwd

= 0.5, line width of dot outline.

Dotconf Glyph:

In addition to the variables listed above, the dotconf glyph also has the following variable.

Dot.Conf,pch

= 21, solid circle (S compatible).

Dot.Conf.pch.size

= 0.9 cex, size of dot.

Dot.Conf.pch.lwd

= 0.5, linen weight for dot outline when 0:18 dot used.


Dot.Conf.Outline

=FALSE, whether to outline the dots.

Dot.Conf.Outline.col

= "black", color of dot outline.

Dot.Conf.Outline.lwd

= 0.5, line width of dot outline.


Dot.Conf.lwd

= 2, line width of confidence interval lines.

Dotse Glyph:

In addition to the variable defined above for the dot, dotconf, dotsignif and dotse glyphs, the dotse glyph also has the following variable define.

Dot.SE,pch

= 21, solid circle (S compatible).

Dot.SE.pch.size

= 0.9 cex, size of dot.

Dot.SE.pch.lwd

= 0.5, linen weight for dot outline when 0:18 dot used.


Dot.SE.Outline

=FALSE, whether to outline the dots.

Dot.SE.Outline.col

= "black", color of dot outline.

Dot.SE.Outline.lwd

= 0.5, line width of dot outline.


Dot.SE

= 95, percent confidence interval

Dot.SE.lwd

= 2, line width of confidence interval lines.

dotsignif Glyph:

In addition to the variable defined above for the dot, dotconf, dotsignif and dotse glyphs, the dotsignif glyph also has the following variable define.

Dot.Signif.pch

= 4, overprint character "x" when not significance.

Dot.Signif.pch.size

= 0.9*1.2 cex size of the overprint character.

Dot.Signif.pch.lwd

= 0.5, linen weight for dot outline when 0:18 dot used.

Dot.Signif.pch.col

= "black", color of overlaid symbol on DOT.


Dot.Signif.Outline

=FALSE, whether to outline the dots.

Dot.Signif.Outline.col

= "black", color of dot outline.

Dot.Signif.Outline.lwd

= 0.5, line width of dot outline.


Dot.Signif.pvalue

= 0.05, p-value for testing significance.

Dot.Signif.range

= c(0,1), valid range for significant test data for p-value

id Glyph:

The following variables are used by the id glyph.

Id.Cex.mod

= 1, fudge adjustment for ID Text.

/cr

Id.Title.1.pos

= 0.9 inches, top panel 1st line id title placement above the first panel, used with lab1

Id.Title.2.pos

= 0.1 inches, top panel 2nd line id title placement above the first panel, used with lab2


Id.Text.cex

= 0.65, text side of ID column


Id.Dot.pch

= 22, pch symbol value to plot next to state name/abbrev.

Id.Dot.cexm

= 1.5, size of dot symbol for state ID

Id.Dot.lwd

= 0.8, size of solid dot symbol for state ID

Id.Dot.width

= 0.1 inches. With of the ID symbol (box)


Id.Space

= 0.03125, width of a space in inches.

Id.Start

= 0.055, offset from left for start of ID column.

map, mapcum, maptail, and mapmedian Glyphs:

The following variables are used by all of the "map" type glyphs.

Map.Area.Spec.cex

= 0.32, font size for state labels

Map.Bg.col

= "#262626FF", (grey(0.88)) color of background (not active) sub-areas fill in maps

Map.Bg.Line.col

= "white", background of maps

Map.Bg.Line.lwd

= 0.3, line weight for map background boundaries

Map.Fg.Line.col

= "black", foreground color of maps

Map.Fg.Line.lwd

= 0.3, line weight for map foreground boundaries

Map.L2.Line.col

= "lighter grey", color of Layer 2 outline in maps

Map.L2.Line.lwd

= 0.35. line weight for Layer 2 boundaries

Map.L3.Line.col

= "black", color of Layer 3 (national) outline in maps

Map.L3.Line.lwd

= 0.4. line weight for Layer 3 (national) boundaries

Map.Lab.Box.Width

= 0.09, width in inches of box symbols using in titles for maps

Map.Max.width

= 2.5 inches, maximum width of each map

Map.Min.width

= 1.5 inches, minimum width of each map

Map.Median.text

= "Median for Sorted Panel", text used in single row median panel instead of a map.

Rank Glyph:

The following variable is used by the rank glyph.

Rank.width

= 0.25 inches - column fixed width

Rank.method

= 1, rank method - to be defined.

Scatter Dot Glyph:

The following variables are used by the scatter dot glyph (scatdot).

SCD.Axis,cex

= 0.52, font size for Y axis labels for scatter dots


SCD.Bg.pch

= 21, type of point/symbol to be used for background data points (not active) - state's dots.

SCD.Bg.pch.fill

= "transparent", fill color for not selected state's dots.

SCD.Bg.pch.col

= "black", border color used for non-active data points.

SCD.Bg.pch.lwd

= 0.6, line width of outline of point/symbol used as non-active data points.

SCD.Bg.pch.size

= 0.75, size of point/symbol used as non-active data points.

SCD.Fg.pch

= 21, type of point/symbol for active data points.

SCD.Fg.pch.col

= "black", border color for foreground dots.

SCD.Fg.pch.lwd

= 0.6, Scatter dot symbol outline line weight for active data points.

SCD.Fg.pch.size

= 1, size of point/symbol for active data points in scatter dots.

SCD.Median.pch

= 21, shape of filled symbol for median value - scatter dots.

SCD.Median.pch.col

= "black", border color for median symbol - scatter dots.

SCD.Median.pch.lwd

= 0.6, line width used on the median symbol - scatter dots.

SCD.Median.pch.size

= 1, symbol size median value - scatter dots.

SCD.Median.pch.fill

= "black", color of filled symbol for median value - scatter dots.

SCD.hGrid

= FALSE, whether or not to include horizontal grid lines in panel.


SCD.xsc

= 1.08, x range multiplier to keep dots from being clipped

SCD.ysc

= 1.12, y range multiplier to keep dots from being clipped


SCD.DiagLine

= TRUE, whether or not to include x=y sloped line

SCD.DiagLine.col

= colGrid, color of sloped line, default, grid line color. SCD.DiagLine must be TRUE.

SCD.DiagLine.lwd

= 1.25, line weight of sloped line, default, grid line color. SCD.DiagLine must be TRUE.

SCD.DiagLine.lty

= "solid", line type of sloped line, default, grid line color. SCD.DiagLine must be TRUE.

Segmented Stacked Bar Glyphs:

micromapST support three types of stacked bar graphs: Centered, Segmented, and Normalized. The following section describes the internal variable used by all of these glyphs and then the unique variables used by each type.

Centered, Segmented, and Normal Stacked Bar Glyphs:

The following variables are used by all of the horizontal stacked bar glyphs (ctrbar, segbar and normbar). Any variable for a specific type of stacked bar are listed following this section. The CSN at the beginning of the name of each variable indicates they are part of this group.

CSNBar.barht

= 0.66667, fixed height of bar when variable height bars are is not used. Should never be greater than 0.90. Usable range is 0.333 to 0.90.

CSNBar.First.barht

= 0.3333, height of first bar when variable height bars are used. Must be less than SBar.Last.barht and in the range of 0.333 to 0.6667, SNBar.varht or CBar.varht must be TRUE for this option of function.

CSNBar.Last.barht

= 0.80, height of last bar when variable height bars are used. Must be greater than CSNBar.First.barht and in the range of 0.6667 to 0.90. CSNBar.varht or CBar.varht must be TRUE for this option of function.


CSNBar.Outline.col

= "black", color of stacked bar outlines.

CSNBar.Outline.lwd

= 0.75, line weight for bar segment outline in segmented bar plots.

CSNBar.Outline.lty

= "solid", line type for bar segment outline in segmented bar plots.

Centered Stacked Bar Glyph:

The following variables are only used by the ctrbar glyph.

CBar.varht

= FALSE, enables variable height bars.

CBar.two.ended

= FALSE, request two ended variable height bars be used


CBar.Center.Line.enable

= FALSE, request a line is drawn at center point.

CBar.Center.value

= 0, value of the center stacked bar glyph. def=0


CBar.Zero.Line.col

= "white", centered bar zero vertical line color

CBar.Zero.Line.lwd

= 1, line width for centered bar zero vertical line

CBar.Zero.Line.lty

= "dotted", type of centered bar zero line.

SegBar, and NormBar Glyphs:

The following variables are used by the segbar and normbar glyphs:

SNBar.varht

= FALSE, enables variable height bars from SBar.First.barht to
SBar.Last.barht.

SNBar.two.ended

= FALSE, request two ended variable height bars be used (small to large to small).( Not implemented )

SNBar.Middle.Dot

=FALSE, request a dot be draw in at the mid point in the segmented bars.

SNBar.MDot.pch

=21, type of point/symbol used as the mid point dot. SNBar.Middle.Dot must be TRUE for this parameter to function.

SNBar.MDot.pch.fill

="white", color of the point/symbol used as the mid point dot. SNBar.Middle.Dot must be TRUE for this parameter to function.

SNBar.MDot.pch.size

=0.3, size of point/symbol used as the mid point dot.
SNBar.Middle.Dot must be TRUE for this parameter to function.


SNBar.MDot.pch.border.lwd

=NA, line width of outline of point/symbol used as the mid point dot.
SNBar.Middle.Dot must be TRUE for this parameter to function.

SNBar.MDot.pch.border.col

=NA, color of outline of point/symbol used as the mid point dot. SNBar.Middle.Dot must be TRUE for this parameter to function.

Time Series and Time Series with Confidence bands Glyphs:

The following variables are used by the time series glyphs (ts and tsconf):

TS.lwd

= 1.1, time series line weight

TS.Axis.cex

= 0.52, font size for Y axis labels

TS.hGrid

= FALSE, whether or not to include horizontal grid lines in panel

Advanced Internal Variables:

The advanced internal variable should not be modified unless you have lot of time. If any are modify, the operation of the package may become unpredicatable and can't be supported. However, through the use of gentle changes and experimentation, you can modify the look of the resulting micromapST output. While not recommended, the authors felt access to these internal variable will help a user in some unexpected situations.
These variables should not be modified unless absolutely necessary. IF there area modified, the outcome can not be predicted and can't be supported. Modify at your own risk:

Page and Panel Layout:
topMar

= 1.2, top margin in inches


botMar

= 0.5, bottom margin in inches

botMarLegend

= 0.75, bottom margin for legend

botMardif

= 0.2, bottom margin difference


leftMar

= 0.0, left margin in inches

leftMarAxis

= 0.2, left margin when Y axis labels and title are required

rightMar

= 0.0, right margin in inches


borderSize

= 0.5 inches. The border space between the page edges and the margins. This value is used for the top, bottom, left and right border spacing.

Margins and Axis Layout:
mgpLeft

= c(0.75, 0.1, 0), Left Y axis margin line for axis labels and axis line.

Scaling, Separation, and Padding:
pad

= 0.67, y axis padding for integer plotting locations

padex

= 0.34 inches, total panel padding (i.e., 0.17 at top and bottom of panel)

padMinus

= 0.63 inches, spacing to keep reference line off panel edge

Row and Column Parameters:
rowSepGap

= 0.075 inches. Space between panel groups at or around the median panel. There are 7 units per panel. The average unit is between 1/10 and 1/8 inches.

rowSizeMn

= 0.5 inches. Minimum panel group height.

rowSizeMx

= 1.25 inches. Maximum panel group height.


rowSizeMin

= 1.65 units. Minor panel group height in units for single area panel.

rowsizeMaj

= 7 units. Major panel group height for all panels, except single area panel.


colSepGap

= 0.75 inches. Glyphics column separator space.


colSizeMin

= 0.75 inches. Minimum Glyph column size.

colSizeMax

= 2.0 inches. Maximum Glyph column size.

Title Variables:
Title.Line.1.pos

= 1.27 inches, top panel 1st line placement above the first panel, used with lab1

Title.Line.2.pos

= 0.64 inches, top panel 2nd line placement above the first panel, used with lab2

Title.Line.2x.pos

= 0.01 inches, top panel X-Axis line placement above the first panel

Title.Line.3x.pos

= 0.01 inches, bottom panel X-Axis line placement below the last panel

Title.Line.3.pos

= 0.64 inches, bottom panel line placement below the last panel, used with lab3

Title.Line.4.pos

= 1.27 inches, reference line legend below last panel, used with reftext

Title.Line.5.pos

= 0.35 inches, Y axis label placement (to the left of panel), used with lab4

Title.cex

= 1.0, text size of title, used with title

Debug Variable:

The following variable is reserved for package testing only and should not be used.

MST.Debug

= 0, disabled. Do not use.

Unused Variables:

The following variables are not implemented and reserved for future use.

(small to large to small).

( Not implemented )


rcRatioMin

= 0.25, minimum row size to col size ratio permited. (not implemented)

rcRatioMax

= 2, maximum row size to col size ratio permited. (not implemented)

mgpTop

= c(3.2,0.1,0), Top margin line for X axis labels and axis line.

mgpBottom

= c(3.2,0.1,0), Bottom margin line for X axis labels and axis line.

padjBottom

= -0.35, Axis tick label placement adjustment

sc

= 1.08, x axis scale expansion factor. Applied to the data range to calculate the graph\'s range.


XAxis.staggered

= TRUE, enable staggered label feature - NOT USED

XAxis.L.mcex

= 0.888889 - actually 0.6667 Size used for large XAxis labels

XAxis.M.mcex

= 0.777778 - actually 0.5833 Size used for medium XAxis labels

XAxis.S.mcex

= 0.666667 - actually 0.5 Size used for small X Axis labels For line labels - Normal = .75, space = .15 (20%), small space = .15 .5 = .075

XAxis.offset

= 0.0 inches. X Axis offset

YAxis.cex

= 0.33332 cex size of Y Axis labels

YAxis.offset

= 0.0 lines. Offset of Y Axis labels from panel edge.

YAxis.nGridpIn

= 5 labels. Number of labels per inche for Y Axis - initial goal.

YAxis.staggered

= TRUE. Enable staggered labels on Y Axis - NOT USED.

/cr

Ref.Text.cex

= 0.75, size of reference line text


Arrow.Shadow.lwd

= 4.0, line width of arrow shadow to create outline ( not implemented )

Arrow.Shadow.col

= "black", arrow shadow color ( not implemented )


BoxP.Outlier.pch

= 20, symbol for outlier - 19-25.

BoxP.Outline.col

= "#262626FF", boxplot outline color

BoxP.Median.Dot.pch

= 19, solid circle symbol.

BoxP.Median.Dot.col

= "white", color of median dot.

BoxP.Median.Dot.cex

= 0.95, size of circles.


Dot.Conf.size

= 0.55, size of confidence interval

Dot.SE.size

= 0.55, size of confidence interval


Id.Dot.Outline.col

= "dark gray", color of outlines of ID symbols

Id.Dot.Outline.lwd

= 0.8, line weight for outlines of ID symbols


Map.Bg.Line.lty

= "solid", line type for map background boundaries

Map.Fg.Line.lty

= "solid", line type for map foreground boundaries

Map.L2.Line.lty

= "solid", line type for Layer 2 boundaries

Map.L3.Line.lty

= "solid", line type for Layer 3 (national) boundaries

Map.Panel.col

= "white", background color of map panels

Map.Unu.col

= "lightest grey", color of sub-areas not referenced in maps


staggered

= FALSE. Position of last staggered label. FALSE = low, TRUE = high.

Text.cex

= 0.75 cex, general text size

The micromapGDefaults data.frame is built by the micromapGSetDefaults function when the micromapST package is called. Once built it cannot be changed. To change one or two (a few) variables, construct a list of these variables and pass it to micromapSEER via the details parameter in the call. To do large scale customization, call the micromapGSetDefaults function to get a copy of the entire data.frame and modify this copy. This is not recommended.

Author(s)

Daniel B. Carr, George Mason University, Fairfax VA, with contributions from Jim Pearson and Linda Pickle of StatNet Consulting, LLC, Gaithersburg, MD

See Also

micromapGSetDefaults, micromapGSetPanelDef


[Package micromapST version 3.0.3 Index]