region: Census region (1-4)

region title image

Description

region is the Census geographic region code (1-4) of the household. See also division.

Availability

Sample Years
Basic 1978 - present
ORG 1979 - present

Values

Value Label
1 Northeast
2 Midwest
3 South
4 West
Variable creation
********************************************************************************
* region
********************************************************************************
* See statefips for coding
lab var region "Census region (1-4)"
notes region: derived from statefips
Figure creation
sum year
keep if year == r(max)
gegen tag = tag(statefips)
keep if tag == 1
keep statefips region

local color1 123 50 148
local color2 194 165 207
local color3 166 219 160
local color4 0 136 55

forvalues i = 1 / 4 {
  local regionname`i': label region `i'
}

maptile region, geo(state) geoid(statefips) ///
  fcolor(""`color1'" "`color2'" "`color3'" "`color4'"") ///
  twopt( ///
    graphregion(color(white)) plotregion(color(white)) ///
    legend( ///
      order(2 3 4 5) ///
      lab(2 "`regionname1'") ///
      lab(3 "`regionname2'") ///
      lab(4 "`regionname3'") ///
      lab(5 "`regionname4'") ///
    ) ///
  )

graph export ${variableimages}region_titleimage.svg, replace