CENSUS FIPS COUNTY CODES TO MEPS CONVERSION

I am not sure how useful this information would be to the general public, but if you are interested in mapping variables to geographical borders of the United States Military Entrance Processing Command (MEPS), there seems to be no ready-made cartographic boundary files available to researchers.

 

battalion_map_for_web_2011
United States Military Entrance Processing Command. 2011. Battalions MEPS Map.

 

First, you will need to download cartographic boundary shapefiles from the U.S. Census website. For my purpose, I used the 2010 Census county boundary file (gz_2010_us_050_00_20m.zip) and referred to the 2010 FIPS codes for matching counties and county equivalent entities to the 65 MEPS in the U.S and Puerto Rico. Our data contained 7 missing MEPS, so I coded corresponding MEPS values as missings. Please update those MEPS values to whatever values you would need for your purpose. And one last thing; please be sure to specify your file locations using the macro – graph.

Here is the Stata code to convert Census FIPS county codes to 65 MEPS:

*********************************
***** CREATE MEPS SHAPEFILE *****
*********************************
cd `graph’
shp2dta using `graph’US2010.shp, data(“usdb.dta”) coor(“uscd.dta”) ///
genid(id) replace
use `graph’usdb, clear

describe
drop GEO_ID LSAD CENSUSAREA
so STATE COUNTY

***************************
***** LABEL VARIABLES *****
***************************
egen ST=group(STATE)
order ST, b(STATE)
lab var ST “State”
#delimit ;
la de st_l 01 “AL” ;
la de st_l 02 “AK”, add ; la de st_l 03 “AZ”, add ; la de st_l 04 “AR”, add ;
la de st_l 05 “CA”, add ; la de st_l 06 “CO”, add ; la de st_l 07 “CT”, add ;
la de st_l 08 “DE”, add ; la de st_l 09 “DC”, add ; la de st_l 10 “FL”, add ;
la de st_l 11 “GA”, add ; la de st_l 12 “HI”, add ; la de st_l 13 “ID”, add ;
la de st_l 14 “IL”, add ; la de st_l 15 “IN”, add ; la de st_l 16 “IA”, add ;
la de st_l 17 “KS”, add ; la de st_l 18 “KY”, add ; la de st_l 19 “LA”, add ;
la de st_l 20 “ME”, add ; la de st_l 21 “MD”, add ; la de st_l 22 “MA”, add ;
la de st_l 23 “MI”, add ; la de st_l 24 “MN”, add ; la de st_l 25 “MS”, add ;
la de st_l 26 “MO”, add ; la de st_l 27 “MT”, add ; la de st_l 28 “NE”, add ;
la de st_l 29 “NV”, add ; la de st_l 30 “NH”, add ; la de st_l 31 “NJ”, add ;
la de st_l 32 “NM”, add ; la de st_l 33 “NY”, add ; la de st_l 34 “NC”, add ;
la de st_l 35 “ND”, add ; la de st_l 36 “OH”, add ; la de st_l 37 “OK”, add ;
la de st_l 38 “OR”, add ; la de st_l 39 “PA”, add ; la de st_l 40 “RI”, add ;
la de st_l 41 “SC”, add ; la de st_l 42 “SD”, add ; la de st_l 43 “TN”, add ;
la de st_l 44 “TX”, add ; la de st_l 45 “UT”, add ; la de st_l 46 “VT”, add ;
la de st_l 47 “VA”, add ; la de st_l 48 “WA”, add ; la de st_l 49 “WV”, add ;
la de st_l 50 “WI”, add ; la de st_l 51 “WY”, add ; la de st_l 52 “PR”, add ;
#delimit cr
la val ST st_l
tab ST
drop STATE

********************
***** DESTRING *****
********************
drop if ST==52
gen CT = real(COUNTY)
order CT, b(COUNTY)
drop COUNTY

************************************
***** MATCH COUNTY WITH MEPSID *****
************************************
gen MEPS = 0
order MEPS, b(ST)
* MEPSID|   ST|CITY *******************************************************
* 01|A01|33|NY|Albany *****************************************************
* Rutland, Addison, Chittenden VT overlap in MEPCOM map A01/A13; included
* under A01 because Albany testing station is Colchester in Chittenden county
replace MEPS=1 if ST==33 & inlist(CT,19,33,31,41,113,115,91,35,57,93,83,1, ///
95,77,25,39,21,27,111,71,105)
replace MEPS=1 if ST==46 & inlist(CT,13,11,3,21,1,7)
* 02|A02|21|MD|Baltimore **************************************************
* Baltimore supposed to cover 10 counties in VA but MEPCOM map shows 11 and
* includes 6 independent cities:
replace MEPS=2 if ST==8 & inlist(CT,1,5)
replace MEPS=2 if ST==9
replace MEPS=2 if ST==21
replace MEPS=2 if ST==47 & inlist(CT,69,171,187,43,107,61,153,59,13,1,131, ///
510,600,610,683,685,840)
replace MEPS=2 if ST==49 & inlist(CT,65,3,37)
* 03|A03|22|MA|Boston *****************************************************
* Rockingham NH overlaps in MEPCOM map A12/A03; included under A03
replace MEPS=3 if ST==22 & inlist(CT,17,9,25,21,23,5,1,7,19)
replace MEPS=3 if ST==30 & inlist(CT,9,1,13,15,11)
replace MEPS=3 if ST==40
* 04|A04|33|NY|Buffalo ****************************************************
replace MEPS=4 if ST==33 & inlist(CT,13,63,29,9,73,37,121,3,55,51,101)
replace MEPS=4 if ST==39 & inlist(CT,49,123,83)
* 05|A05|33|NY|New York ***************************************************
* New York supposed to cover 7 counties in NJ but MEPCOM map unclear
* Included Monmouth NJ as the 7th county
replace MEPS=5 if ST==31 & inlist(CT,31,3,27,13,17,39,25)
replace MEPS=5 if ST==33 & inlist(CT,79,119,87,5,61,81,47,85,59,103)
* 06|A06|39|PA|Harrisburg *************************************************
replace MEPS=6 if ST==39 & inlist(CT,105,35,27,13,9,57,61,55,1,133,71,41, ///
11,75,43,99,67,87,109,97,107,77,95,25,89,103,127,115,69,79,131,15,113, ///
37,93,119,81,117)
* 07|A10|39|PA|Philadelphia/Fort Dix **************************************
replace MEPS=7 if ST==8 & CT==3
replace MEPS=7 if ST==31 & inlist(CT,21,5,7,15,33,1,11,9)
replace MEPS=7 if ST==39 & inlist(CT,17,91,29,45,101)
* 08|A11|39|PA|Pittsburgh *************************************************
* Garrett & Allegany MD overlap in MEPCOM map A2/A11, included in A2
replace MEPS=8 if ST==39 & inlist(CT,39,85,73,7,125,59,121,19,3,53,31,5, ///
129,51,47,65,63,23,33,21,111)
replace MEPS=8 if ST==49 & !inlist(CT,65,3,37,75,101,7,21,13,87,35,53,79, ///
39,15,67,25,63,89,19,81,55,5,109,47,45,59,43,11,99,107,105,85,73)
* 09|A12|20|ME|Portland ***************************************************
* Rockingham NH overlaps in MEPCOM map A12/A03; included under A03
replace MEPS=9 if ST==20
replace MEPS=9 if ST==30 & inlist(CT,7,3,17)
* 10|A13|22|MA|Springfield ************************************************
* Hillsborough NH overlaps in MEPCOM map A03/A13; included under A03
* Sullivan NH missing im MEPCOM maps; included under A13
* Essex, Orleans, Caledonia VT missing, but Rutland, Addison, Chittenden VT
* overlap in MEPCOM map A01/A13; included under A01
replace MEPS=10 if ST==7
replace MEPS=10 if ST==22 & !inlist(CT,17,9,25,21,23,5,1,7,19)
replace MEPS=10 if ST==30 & inlist(CT,5,19)
replace MEPS=10 if ST==46 & inlist(CT,25,27,17,23,15,9,19,5)
* 11|A14|33|NY|Syracuse ***************************************************
replace MEPS=11 if ST==33 & inlist(CT,89,43,49,45,75,65,53,17,7,67,23,107, ///
15,109,97,11,99,117,69,123)
* 12|A17|10|FL|Tampa ******************************************************
replace MEPS=12 if ST==10 & inlist(CT,17,119,69,117,95,53,101,103,57,105, ///
97,81,49,55,27,115,15,43,71)
* 13|A20|11|GA|Atlanta ****************************************************
replace MEPS=13 if ST==11 & !inlist(CT,33,163,245,73,181,189,301,253,87, ///
131,275,27,185,101,65,299,49,39,127,25,99,201,7,205,71,75,19,173,3,61, ///
239,243,37,273,95,177,321,287,277,17,155,69,161,5,209,279,1,229,305, ///
191,179,29,51,183,103,251,31,165,107,43,109,267)
* 14|A21|49|WV|Beckley ****************************************************
* Beckley supposed to cover 49 counties but MEPCOM map only shows 47
replace MEPS=14 if ST==18 & inlist(CT,89,43,19,63,127,115,159,153,71,195)
replace MEPS=14 if ST==47 & inlist(CT,27,185,21,71,173,197,155,35,77,640,750)
replace MEPS=14 if ST==49 & inlist(CT,75,101,7,21,13,87,35,53,79,39,15,67, ///
25,63,89,19,81,55,5,109,47,45,59,43,11,99)
* 15|A22|34|NC|Charlotte **************************************************
* 8 counties overlap in MEPCOM map A22/A31, used border specified by A22
replace MEPS=15 if ST==34 & inlist(CT,39,43,75,173,113,99,87,175,89,21, ///
115,199,111,149,161,45,23,121,11,189,9,27,5,193,3,35,109,71,119,97, ///
171,197,59,159,25,179,7,153,167,123,57,151,67,81,169,157)
replace MEPS=15 if ST==41 & inlist(CT,91,23,57,25)
* 16|A23|10|FL|Miami ******************************************************
replace MEPS=16 if ST==10 & inlist(CT,86,87,11,21,99,51,85,111,93,61)
* 17|A24|41|SC|Fort Jackson ***********************************************
* Fort Jackson supposed to cover 42 in SC but MEPCOM map only shows 39
replace MEPS=17 if ST==11 & inlist(CT,33,163,245,73,181,189,301)
replace MEPS=17 if ST==41 & !inlist(CT,91,23,57,25,49,53,13)
* 18|A25|10|FL|Jacksonvill ************************************************
replace MEPS=18 if ST==10 & !inlist(CT,17,119,69,117,95,53,101,103,57,105, ///
97,81,49,55,27,115,15,43,71,86,87,11,21,99,51,85,111,93,61)
replace MEPS=18 if ST==11 & inlist(CT,253,87,131,275,27,185,101,65,299,49, ///
39,127,25,99,201,7,205,71,75,19,173,3,61,239,243,37,273,95,177,321, ///
287,277,17,155,69,161,5,209,279,1,229,305,191,179,29,51,183,103,251, ///
31,165,107,43,109,267)
replace MEPS=18 if ST==41 & inlist(CT,49,53,13)
* 19|A31|34|NC|Raleigh ****************************************************
* 8 counties overlap in MEPCOM map A22/A31, used border specified by A22
replace MEPS=19 if ST==34 & !inlist(CT,39,43,75,173,113,99,87,175,89,21, ///
115,199,111,149,161,45,23,121,11,189,9,27,5,193,3,35,109,71,119,97, ///
171,197,59,159,25,179,7,153,167,123,57,151,67,81,169,157)
* 20|A32|47|VA|Richmond/Fort Lee ******************************************
replace MEPS=20 if ST==47 & !inlist(CT,69,171,187,43,107,61,153,59,13,1, ///
131,510,600,610,683,685,840,27,185,21,71,173,197,155,35,77,640,750, ///
105,169,195,51,167,191,520,720)
* 21|B26|43|TN|Knoxville **************************************************
replace MEPS=21 if ST==11 & inlist(CT,83,295,47,313,213)
replace MEPS=21 if ST==18 & inlist(CT,147,235,13,95)
replace MEPS=21 if ST==43 & inlist(CT,91,19,163,179,171,59,29,73,67,57,63, ///
89,25,173,93,155,9,123,13,1,151,129,49,35,145,105,107,121,7,143,139, ///
11,65,153,115)
replace MEPS=21 if ST==47 & inlist(CT,105,169,195,51,167,191,520,720)
* 22|B27|18|KY|Louisville *************************************************
replace MEPS=22 if ST==15 & inlist(CT,129,163,173,147,123,25,61,43,19,77, ///
155,143,175,117,37,125,51,83,27,101)
replace MEPS=22 if ST==18 & !inlist(CT,89,43,19,63,127,115,159,153,71,195, ///
147,235,13,95,75,105,39,7,145,83,139,143,157,35,55,33,221,47,219,141, ///
31,227,213,3,9,169,171,57,15,117,37,77,81,191,23,201,161,69,135)
* 23|B42|25|MS|Jackson ****************************************************
replace MEPS=23 if ST==25 & !inlist(CT,33,143,27,119,137,107,161,71,93, ///
13,17,115,145,9,139,3,141,117,81,57,95,109,45,47,59)
* 24|B43|26|MO|Kansas City ************************************************
* Kansas City MEPS supposed to cover 60 in MO, but MEPCOM map shows 61
replace MEPS=24 if ST==17 & !inlist(CT,187,129,67,189,81,175,119,23,153, ///
39,181,193,179,199,109,63,71,203,171,101,75,93,55)
replace MEPS=24 if ST==26 & inlist(CT,5,87,147,3,21,165,227,75,63,49,47, ///
95,37,13,217,11,97,145,119,9,109,57,39,185,83,101,107,177,25,61,81, ///
129,79,117,33,171,197,211,1,115,121,41,175,195,89,159,53,15,141,85,29, ///
167,59,77,225,229,43,67,209,213,153)
* 25|B44| 4|AR|Little Rock ************************************************
replace MEPS=25 if ST==4 & !inlist(CT,21,55,31,93,111,37,35,123,77,107, ///
91,73,81,57,133)
replace MEPS=25 if ST==37 & inlist(CT,1,135,79)
* 26|B45|43|TN|Memphis ****************************************************
replace MEPS=26 if ST==4 & inlist(CT,21,55,31,93,111,37,35,123,77,107)
replace MEPS=26 if ST==14 & CT==127
replace MEPS=26 if ST==18 & inlist(CT,75,105,39,7,145,83,139,143,157,35)
replace MEPS=26 if ST==25 & inlist(CT,33,143,27,119,137,107,161,71,93,13, ///
17,115,145,9,139,3,141,117,81,57,95)
replace MEPS=26 if ST==26 & inlist(CT,69,155)
replace MEPS=26 if ST==43 & inlist(CT,95,131,183,79,5,17,53,45,97,33,75, ///
113,77,39,71,23,109,69,47,167,157)
* 27|B49|19|LA|Shreveport *************************************************
replace MEPS=27 if ST==4 & inlist(CT,91,73,81,57,133)
replace MEPS=27 if ST==19 & inlist(CT,17,15,119,27,111,67,123,35,65,83, ///
73,61,49,13,31,81,85,69,115,127,43,79,21,59,25,41,107,29,9)
replace MEPS=27 if ST==44 & inlist(CT,37,67,315,203,365,419,401,183)
* 28|B50|23|MI|Lansing ****************************************************
replace MEPS=28 if ST==23 & !inlist(CT,147,99,125,93,163,161,115,91,83, ///
61,131,53,13,71,103,43,109,41,3,153)
* 29|B54|14|IL|Chicago*****************************************************
replace MEPS=29 if ST==14 & inlist(CT,85,177,201,7,111,97,15,141,37,89, ///
43,31,195,103,197,91,75,53,19,41,147,39,113,179,57,187,95,143,175,11, ///
99,93,63,105,155,123,203)
replace MEPS=29 if ST==15 & inlist(CT,89,127,91,141,39,149,99)
* 30|B56|36|OH|Cleveland **************************************************
replace MEPS=30 if ST==36 & inlist(CT,171,39,125,51,69,95,173,123,143, ///
147,43,77,93,5,75,169,103,35,153,151,157,19,29,99,133,155,55,85,7)
* 31|B57|36|OH|Columbus ***************************************************
replace MEPS=31 if ST==36 & !inlist(CT,171,39,125,51,69,95,173,123,143, ///
147,43,77,93,5,75,169,103,35,153,151,157,19,29,99,133,155,55,85,7)
replace MEPS=31 if ST==49 & inlist(CT,107,105,85,73)
* 32|B58|16|IA|Des Moines *************************************************
replace MEPS=32 if ST==16 & !inlist(CT,71,129,155,85,133,145,173,137,3,29, ///
165,9,47,27,93,161,35,21,119,167,149,193,143,141,59,41)
replace MEPS=32 if ST==14 & inlist(CT,161,73,131,71)
* 33|B59|23|MI|Detroit ****************************************************
replace MEPS=33 if ST==23 & inlist(CT,147,99,125,93,163,161,115,91)
* 34|B60|35|ND|Fargo ******************************************************
replace MEPS=34 if ST==24 & inlist(CT,69,135,77,89,7,119,113,125,29,107, ///
87,27,5,57,167,111,159,155,51,41,11,149,121)
replace MEPS=34 if ST==35
* 35|B61|15|IN|Indianapoli ************************************************
replace MEPS=35 if ST==14 & inlist(CT,183,45,23,33)
replace MEPS=35 if ST==15 & !inlist(CT,89,127,91,141,39,149,99,129,163, ///
173,147,123,25,61,43,19,77,155,143,175,117,37,125,51,83,27,101)
* 36|B62|50|WI|Milwaukee **************************************************
* Milwaukee MEPS supposed to cover 46 in WI, but MEPCOM map shows 47
replace MEPS=36 if ST==23 & inlist(CT,83,61,131,53,13,71,103,43,109,41,3,153)
replace MEPS=36 if ST==50 & !inlist(CT,31,7,3,99,113,129,13,95,5,107,119, ///
17,33,109,93,91,35,19,11,121,53,81,63,123,23)
* 37|B64|28|NE|Omaha ******************************************************
* Omaha MEPS supposed to cover 71 in NE, but MEPCOM map covers whole state
* Used border specified by B65 and excluded 3 counties from Omaha
* Used border specified by C39 and excluded 20 counties from Omaha
* Revised total is 70 in NE after these adjustments
replace MEPS=37 if ST==16 & inlist(CT,71,129,155,85,133,145,173,137,3,29, ///
165,9,47,27,93,161,35,21)
replace MEPS=37 if ST==28 & !inlist(CT,27,51,43)
* 38|B65|42|SD|Sioux Falls ************************************************
replace MEPS=38 if ST==16 & inlist(CT,119,167,149,193,143,141,59,41)
replace MEPS=38 if ST==24 & inlist(CT,73,81,117,101,33,133,105,63)
replace MEPS=38 if ST==28 & inlist(CT,27,51,43)
replace MEPS=38 if ST==42
* 39|B66|26|MO|St Louis ***************************************************
* St Louis MEPS supposed to cover 55 in IL, but MEPCOM map shows 56
replace MEPS=39 if ST==14 & !inlist(CT,85,177,201,7,111,97,15,141,37,89, ///
43,31,195,103,197,91,75,53,19,41,147,39,113,179,57,187,95,143,175,11, ///
99,93,63,105,155,123,203,161,73,131,71,183,45,23,33,127)
replace MEPS=39 if ST==26 & !inlist(CT,5,87,147,3,21,165,227,75,63,49,47, ///
95,37,13,217,11,97,145,119,9,109,57,39,185,83,101,107,177,25,61,81, ///
129,79,117,33,171,197,211,1,115,121,41,175,195,89,159,53,15,141,85,29, ///
167,59,77,225,229,43,67,209,213,153,69,155)
* 40|C36|32|NM|Albuquerque ************************************************
replace MEPS=40 if ST==32 & !inlist(CT,59,37,9,41,23,17,29,51,13,35,27,5, ///
15,25)
* 41|C37|44|TX|Amarillo ***************************************************
* Kent & Stonewall TX overlap in MEPCOM map C37/C38; included under C37
replace MEPS=41 if ST==17 & inlist(CT,187,129,67,189,81,175,119)
replace MEPS=41 if ST==32 & inlist(CT,59,37,9,41)
replace MEPS=41 if ST==37 & inlist(CT,25,139,7)
replace MEPS=41 if ST==44 & inlist(CT,111,421,195,357,295,205,341,233,393, ///
211,359,375,65,179,483,117,381,11,129,87,369,69,437,45,191,75,17,279, ///
189,153,345,101,79,219,303,107,125,269,501,445,305,169,263,433,165, ///
115,33,317,227,173)
* 42|C38|44|TX|Dallas *****************************************************
* Kent & Stonewall TX overlap in MEPCOM map C37/C38; included under C37
replace MEPS=42 if ST==44 & inlist(CT,197,155,275,207,253,151,415,335,353, ///
441,431,81,399,83,59,417,447,23,487,485,9,503,429,133,49,333,93,193, ///
143,363,237,77,337,497,367,221,425,35,99,27,331,145,309,217,251,439, ///
121,97,181,85,113,139,349,293,161,1,73,213,423,257,467,231,397,147, ///
277,119,223,379,499,387,159,449,343,63,459)
* 43|C39| 6|CO|Denver *****************************************************
replace MEPS=43 if ST==6
replace MEPS=43 if ST==17 ///
& inlist(CT,23,153,39,181,193,179,199,109,63,71,203,171,101,75,93,55)
replace MEPS=43 if ST==28 & inlist(CT,165,157,7,105,45,13,123,33,161,69, ///
49,75,5,101,135,29,57,85,87,145)
replace MEPS=43 if ST==51 & inlist(CT,21,1,7,15,31,27,9,25,45,11,5,19,33, ///
43,3,17,29)
* 44|C40|44|TX|El Paso ****************************************************
replace MEPS=44 if ST==44 & inlist(CT,141,229,109,3,329,135,495,301,461, ///
103,475,371,389,243,377,43,443)
replace MEPS=44 if ST==32 & inlist(CT,23,17,29,51,13,35,27,5,15,25)
* 45|C41|44|TX|Houston ****************************************************
replace MEPS=45 if ST==44 & inlist(CT,403,405,347,225,5,351,241,457,455, ///
373,289,313,395,51,41,185,471,407,339,199,361,245,291,71,201,473,477, ///
15,149,89,481,157,39,167)
replace MEPS=45 if ST==19 & inlist(CT,11,19,23,3,53)
* 46|C47|37|OK|Oklahoma City **********************************************
* Oklahoma supposed to have 1 in AR, 23 in KS, and 11 in TX, but MEPCOM map
* only covers OK
replace MEPS=46 if ST==37 & !inlist(CT,25,139,7,1,135,79)
* 47|C48|44|TX|San Antonio ************************************************
* San Antonio supposed to have 69 counties but MEPCOM map shows 70
replace MEPS=47 if ST==44 & inlist(CT,61,489,215,261,427,47,247,505,273, ///
249,131,479,355,409,7,391,25,297,311,283,127,323,507,163,13,255,175, ///
57,469,123,493,29,325,463,271,465,105,383,235,413,435,137,385,19,265, ///
259,91,187,177,285,239,321,55,21,287,209,453,491,31,53,281,411,299, ///
171,307,319,267,327,95,451)
* 48|C70|13|ID|Boise ******************************************************
replace MEPS=48 if ST==13 & !inlist(CT,21,17,55,79,9,57,35,69,61,49)
replace MEPS=48 if ST==38 & inlist(CT,45,37,1,23,63,61)
* 49|C71|27|MT|Butte ******************************************************
* Butte suppposed to have 5 in WY but MEPCOM map only covers MT
replace MEPS=49 if ST==27
* 50|C72| 5|CA|Sacramento *************************************************
* Nye NV overlaps in MEPCOM map C72/C76; included under C76
replace MEPS=50 if ST==5 & !inlist(CT,51,27,71,79,29,83,111,37,59,15,23, ///
45,33,97,41,13,1,75,81,85,87,69,53,39,19,31,107,71,65,73,25)
replace MEPS=50 if ST==29 & inlist(CT,31,1,29,510,19,5,21)
* 51|C73|12|HI|Honolulu ***************************************************
replace MEPS=51 if ST==12
* 52|C74| 5|CA|Los Angeles ************************************************
replace MEPS=52 if ST==5 ///
& inlist(CT,51,27,71,79,29,83,111,37,59)
* 53|C75| 5|CA|Oakland/San Jose *******************************************
replace MEPS=53 if ST==5 ///
& inlist(CT,15,23,45,33,97,41,13,1,75,81,85,87,69,53,39,19,31,107)
* 54|C76| 3|AZ|Phoenix ****************************************************
* Nye NV overlaps in MEPCOM map C72/C76; included under C76
replace MEPS=54 if ST==3
replace MEPS=54 if ST==5 & CT==71
replace MEPS=54 if ST==29 & inlist(CT,23,3)
* 55|C77|38|OR|Portland ***************************************************
replace MEPS=48 if ST==38 & !inlist(CT,45,37,1,23,63,61)
replace MEPS=55 if ST==48 & inlist(CT,69,15,11,59,39)
* 56|C78|45|UT|Salt Lake City *********************************************
* Eastern ID overlaps in MEPCOM map C70/C78; included under C70
* Coconino AZ overlaps in MEPCOM map C76/C78; included under C76
replace MEPS=56 if ST==29 & inlist(CT,13,7,15,11,33,17)
replace MEPS=56 if ST==45
replace MEPS=56 if ST==51 & inlist(CT,39,35,23,37,41)
* 57|C80|48|WA|Spokane ****************************************************
replace MEPS=57 if ST==13 & inlist(CT,21,17,55,9,79,57,35,69,61,49)
replace MEPS=57 if ST==48 & inlist(CT,51,63,75,3,23,13,71,5,21,1,43,65,19, ///
47,17,25,7,37,77)
* 58|C81| 2|AK|Anchorage **************************************************
replace MEPS=58 if ST==2

************************
***** MISSING MEPS *****
************************
* MEPSID| ST|CITY *******************************************************
* |A30|52|PR|San Juan ***************************************************
* |B28| 1|AL|Montgomery
replace MEPS=. if ST==1 & !inlist(CT,77,33,59,83,79,89,103,71,95)
replace MEPS=. if ST==10 & inlist(CT,33,113,91,131,59,133,5,63,13,45)
* |B29|43|TN|Nashville **************************************************
* Nashville supposed to have 38 but MEPCOM map shows 39
replace MEPS=. if ST==1 & inlist(CT,77,33,59,83,79,89,103,71,95)
replace MEPS=. if ST==18 & inlist(CT,55,33,221,47,219,141,31,227,213,3,9, ///
169,171,57)
replace MEPS=. if ST==43 & !inlist(CT,91,19,163,179,171,59,29,73,67,57,63, ///
89,25,173,93,155,9,123,13,1,151,129,49,35,145,105,107,121,7,143,139,11, ///
65,153,115,95,131,183,79,5,17,53,45,97,33,75,113,77,39,71,23,109,69,47, ///
167,157)
* |B46|19|LA|New Orleans ************************************************
replace MEPS=. if ST==19 & !inlist(CT,17,15,119,27,111,67,123,35,65,83, ///
73,61,49,13,31,81,85,69,115,127,43,79,21,59,25,41,107,29,9)
replace MEPS=. if ST==25 & inlist(CT,109,45,47,59)
* |B63|24|MN|Minneapolis ************************************************
replace MEPS=. if ST==24 & !inlist(CT,69,135,77,89,7,119,113,125,29,107, ///
87,27,5,57,167,111,159,155,51,41,11,149,121,73,81,117,101,33,133,105,63)
replace MEPS=. if ST==50 & inlist(CT,31,7,3,99,113,129,13,95,5,107,119,17, ///
33,109,93,91,35,19,11,121,53,81,63,123,23)
* |C67| 5|CA|San Diego **************************************************
replace MEPS=. if ST==5 & inlist(CT,65,73,25)
* |C79|48|WA|Seattle ****************************************************
replace MEPS=. if ST==48 & !inlist(CT,69,15,11,59,39,51,63,75,3,23,13,71,5, ///
21,1,43,65,19,47,17,25,7,37,77)

**************************************
***** CHECK FOR DATA CONSISTENCY *****
**************************************
* These 20 counties were unable to be matched based on MEPCOM maps
list ST CT NAME if MEPS==0
drop NAME
ren MEPS MEPSID
save `graph’usdb, replace

End result looks like this:
If you are curious, this heat map shows the proportion of enlistees with moral waivers across 65 MEPS locations.

HeatMap

Advertisements