x cd /pub/data/acs/Tools; %let pgm=archsDataSchools; filename pgm "&pgm..sas"; *---This app extracts data for selected school districts in the St. Louis area per request from Steven Brawley, Executive Vice President Area Resources for Community & Human Services (ARCHS) . We also retrieve the comparable data items for Missouri (state totals) and the nation. The data request: The seven school districts are: Ferguson/Florissant, Hazelwood, Jennings, Normandy, Ritenour, Riverview Gardens, and St. Louis Public (City). Data we are seeking include: *** % children in poverty * % births to teen mothers *** % households headed by single mothers/parents *** Race breakout (OSEDA/Kids Count format) *** # of children under 5 * License capacity of childcare 0-5 years *** % children not attending pre-school * Mobility rate * 4th Grade reading proficiency * 8th Grade math proficiency * Four year graduation rate (The *** flag indicates a variable we are pulling from the latest ACS 5-year school district estimates). ---*; **libname user '/SAS_temp/user'; libname btabs5 '/pub/data/acs2013/btabs5yr'; libname btabs '/pub/data/acs2013/original_btabs5yr'; %libname(acs2013); libname acs (acs2013); libname temp '/pub/data2/temp' ; data temp.&pgm._all; set acs.usregdiv5yr acs.usstcnty5yr acs.usschools5yr; where sumlev='010' or (sumlev in('040','970') and state='29'); keep sumlev esriid geoid areaname TotPop age0_4 pctAge0_4 PoorUnder18 PovUniverseUnder18 PctPoorUnder18 NonHispWhite SingleMothers SingleFathers TotHHs InNursery ; keep SingleParentHHs--schldist; SingleParentHHs=SingleMothers+SingleFathers; PctSingleParentHHs=singleparentHHs*100/TotHHs; format pctsingleparenthhs 5.1; MinorityTotPop=TotPop-NonHispWhite; length Schldist $5; label InNursery='Age 3+ in preschool or nursery schl' SingleMothers='Single Mother HHs' SingleFathers='Single Father HHs' MinorityTotPop="Minority Pop (all ages)" NonHispWhite='Non hispanic white alone all ages'; if sumlev='970' then do; schldist=substr(geoid,10,5); if schldist in ('12010','13830','16290','22650','26640','26670','29280'); end; run; proc sort; by geoid; run; /*<=========================Comment out===================================== data temp.&pgm._all2; set btabs.ustabs00_075yr(keep=geoid b01001i: b01001Hi: ); where geoid in ('04000US29','01000US') or geoid=:'97000US29' ; *--US and MO state totals + all MO unified-; length Schldist $5; if geoid=:'970' then do; schldist=substr(geoid,10,5); if schldist in ('12010','13830','16290','22650','26640','26670','29280'); end; Under18NonHispWhite=sum(of b01001Hi3-b01001Hi6 b01001Hi18-b01001Hi21); Under18=sum(of b01001i3-b01001i6 b01001i27-b01001i30); Under18Minority=Under18-Under18NonHispWhite; drop b01: ; run; proc sort; by geoid; run; ===========================End commented out================================ */ data temp.&pgm; merge temp.&pgm._all2 temp.&pgm._all ; by geoid; format under18NonHispWhite--Under18Minority comma11.; run; ods html file="&pgm..html"; proc print label data=temp.&pgm(drop=esriid sumlev schldist) ; title "&pgm.: Selected Data Items Extracted from ACS 2009-2013 5-Year Period Estimates"; title2 'Data for the Nation, Missouri and Seven Selected School Districts in St. Louis City/County'; id geoid areaname; run; ods html close;