micromapSTDefaults data.frame structure

Description

The micromapSTDefaults 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 for an 8.5 inches by 11 inches page in portrait format with 1/2 inch margines. 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 it's glyphics. This variable are identified by a "*" after the variable name. These are the only variables that generally safe to be modified by the user.

Format

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

colors

The colors vector is the name of a color palette or a vector of 7 or 14 color names or values ("#xxxxxx"). The vector defines the colors used for:

  • The 5 colors in each group for the states and symbols in the glyphcs. One color per row (state).

  • 1 color for the median state and glyphics,

  • 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.
            "maptail"   - highlight states previously referenced
                          above the median row and highlight 
                          remaining states below the median row.
            "mapmedian" - highlight all states above the median 
                          in maps above the median row and highlight 
                          all states below the median in maps 
                          below the median row.
            
  • When 7 additional colors are specified, they are used as the translucent colors in the time series glyphics bands. If only 7 colors are provided, the additional 7 translucent colors are generated from the original colors as a 20% transparent version of the original color e.g., adjustcolors(colors,0.2)

If colors = "greys" or "grays" or "bw", the entire plot will be done using the packages standard black/white/gray shades. Additional color palettes may be supported in future releases.

If a colors vector is not provided, the package default colors will be used:

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

  • 1 median state color: "black"

  • 1 highlighed states: "light yellow" and

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

The colors parameter is optional and should only be used when the colors are to be overridden for a set of linked micromaps.

details

is a list structure that contains the variables and values for the detailed layout and operation of micromapST. The list of variables is:

ne

= 5, items (rows) per group.

ng

= 11, groups of states. The one state median row counts as 1.


ib

= c(1,6,11,16,21,26,27,32,37,42,47), index for first items in each of the 11 groups

ie

= c(5,10,15,20,25,26,31,36,41,46,51), index for last items in each of the 11 groups


The ib and ie variables are used to index into the sorted list of states to pull out the states for a particular group/row.

topMar

= 0.95, top margin in inches

botMar

= 0.5, bottom margin in inches

botMarLegend

= 0.5, bottom margin for legend

botMardif

= 0.2, bottom margin difference

leftMarAxis

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


rowSep

= c(0,0,0,0,0,0.1,0.1,0.0.0.0.0), location of row separations in each column of panels (0.1 around the median row, 0 for others). (inches)

rowSize

= c(7,7,7,7,7,1.6,7,7,7,7,7), size of rows in each panel (1.6 row units for median row, 7 row units for the 5 item groups)

groupedRowSize

= c(35, 1.65, 35), size of panels (1.65 row units for median panel, 35 row units for the 5 item groups.)

groupedRowSep

= c(0,0.1,0.1,0), separation between panels (0.1 inches for median panel, 0 for others)

Map.Width

= 1.4 inches, width of each map

Id.Width

= c(0.9, 0.3), width of id columns (full name (0.9) and abbreviated (0.2)) inches


sc

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

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


Title.Line1

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

Title.Line2

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

Title.Line3

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

Title.Line4

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

Title.Line5

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

Title.cex

= 1.0, text size of title, used with title

lineTiclab

= 0.2 inches, lowest line for map legend text, used with map glyph for footer label


Grid.col

= "white" * Grid line color

Grid.lwd

= 1, Grid line width


mgpTop

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

mgpBottom

= c(2,0,0), Bottom margin line for "X" axis labels and axis line.

padjBottom

= -0.7, Axis tick label placement adjustment

mgpLeft

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


Panel.Fill.col

= "#EBEBEB", * defaults to light gray

Panel.Outline.col

= "black", * color of panel outlines


Text.cex

= 0.7, general text size

The following variable relate to the reference text and line features:

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.cex

= 0.7, * size of reference line text

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.

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.Shadow.lwd

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

Arrow;Shadow.col

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

The following variables are used by the bar glyph:

Bar.barht

= 2/3, * fraction of line height for. 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

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.Line

= 0.80, * line width of median line.

BoxP.Median.Dot.col

= "white", * color of median dot.

BoxP.Median.Dot.pch

= 19, * solid circle symbol.

BoxP.Median.Dot.cex

= 0.95, * size of circles.

BoxP.Median.Dot.lwd

= 2, * line width for median.

BoxP.Median.col

= "black", * color of median box


BoxP.Outline.col

= "#262626FF", * boxplot outline color


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.

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

Dot.pch

= 21, * solid circle (S compatible).

Dot.pch.cex

= 0.9, * size of dot.

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.

The following variables are used by the dotconf glyph:

Dot.conf

= 95, percent confidence interval

Dot.conf.lwd

= 2, * line width of confidence interval lines.

Dot.conf.cex

= 0.55, * size of confidence interval

The following variables are used by the id glyph:

Id.Text.cex

= 0.9, text side of ID column

Id.Text.adj

= .1/3, offset to align state names

Id.Dot.pch

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

Id.Dot.cex

= 0.6, * size of dot symbol for state ID

Id.Dot.Outline.col

= "dark gray", * outlines of ID

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

Map.Bg.col

= "#262626FF", * color of state fill in maps

Map.Bg.Line.col

= "white", * background of maps

Map.Bg.Line.lwd

= 1, * line weight for map background boundaries

Map.Fg.Line.col

= "black", * foreground color of maps

Map.Fg.Line.lwd

= 1, * line weight for map foreground boundaries

Map.Nation.Line.col

= "black", * color of national outline in maps

Map.Nation.Line.lwd

= 1. * line weight for national boundaries

Map.State.Spec.cex

= 0.32, * font size for state labels

The following variables are used by the ctrbar glyph:

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

CBar.varht

= FALSE, * enables variable height bars.

CBar.two.ended

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

The following variables are used by all of the horizontal stacked bar glyphs (ctrbar, segbar and normbar):

CSNBar.Outline.col

= "#262626FF", * very dark gray, color of bar segment outline in segmented bar plots.

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.

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.

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

SNBar.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.

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.col

="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.

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

SCD.Bg.pch

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

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.Bg.pch.fill

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

SCD.Fg.pch

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

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 dot

SCD.Median.pch

= 21, * shape of filled symbol for median value - 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.Axis,cex

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

SCD.xsc

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

SCD.ysc

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

SCD.hGrid

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


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, * 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.

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.49, * font size for Y axis labels

TS.hGrid

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

When changing the colors list, then the entire list must be specified. 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= parmater in the call. In general, the beginning of the variable names indicates the glyph 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
       Grid      -> grid elements of all glyphs
       Id.       -> id glyph
       Map.      -> map glyphs
       Panel     -> general glyph panel
       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
       
      

The remaining variables deal with page and glyph layout and spacing and should not be adjusted.
For example: to turn off the midpoint dot in the segmented bar glyphics, all that is required is:

      details = list(SNBar.Middle.Dot=FALSE)
    

Details

The micromapSTDefaults data.frame is built by the micromapSTSetDefaults 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 micromapST via the details parameter in the call. To do large scale customization, call the micromapSTSetDefaults 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 James B Pearson and Linda Pickle of StatNet Consulting, LLC, Gaithersburg, MD

See Also

micromapSTSetDefaults, micromapST