Create data set CBSTATES. This data set includes a variable, DIVISION, that contains the number of the U.S. Bureau of the Census division for the state. This data step converts letter codes to numeric FIPS codes that match those in the STATE variable of MAPS.US.
data cbstates; length state 8 stcode $ 2 division 4; input stcode division @@; state=stfips(stcode); drop stcode; datalines; CT 1 MA 1 ME 1 NH 1 RI 1 VT 1 PA 2 NJ 2 NY 2 IL 3 IN 3 MI 3 OH 3 WI 3 IA 4 KS 4 MN 4 MO 4 ND 4 NE 4 SD 4 DC 5 DE 5 FL 5 GA 5 MD 5 NC 5 PR 5 SC 5 VA 5 WV 5 AL 6 KY 6 MS 6 TN 6 AR 7 LA 7 OK 7 TX 7 AZ 8 CO 8 ID 8 MT 8 NM 8 NV 8 UT 8 WY 8 AK 9 CA 9 HI 9 OR 9 WA 9 ;