x cd /pub/data/georef/Tools; %let pgm=mopumas; filename pgm "&pgm..sas"; /*--Create georef.mopumas00 with each of the 40 or so PUMAs with names, counties and places and a link to the page on the super puma base map. We also generate the mopumas.pdf reference page. J. Blodgett, OSEDA, Feb, 2007 -- */ title "georef.mopumas00"; libname georef '/pub/data/georef'; proc format; value $superp 29100='North' 29200='Mid Missouri' 29300='KC suburban' 29400='KC city' 29500='West S Central/Lake Ozarks' 29600='St. Louis Metro West' 29701='Central & South St Louis County' 29702='St Louis city & North St L County' 29800='Southeast' 29900='Southwest'; run; ***proc sql; *** select distinct puma1 from georef.pumas_counties_places where state='29'; /* =======================Begin comment================ data georef.mopumas00; length PUMA SuperPUMA $5 Region $40 Nickname $64 MapPage 3 Counties Places $400; set georef.pumas_counties_places(rename=(puma1=SuperPUMA puma5=PUMA)); by SuperPUMA notsorted; where state='29'; *retain MapRef "http://ftp2.census.gov/geo/maps/puma/puma2k/mo_puma5.pdf#xx"; retain mappage 2; if first.SuperPUMA then do; mappage+1; **if superpuma > '29701' then mappage=mappage+1; **substr(MapRef,58,2)=left(put(_mappage,2.)); *** retain MapRef; Region=trim(put(superpuma,superp.))||' ('||superpuma||')'; retain Region; end; **label MapRef='Link to PUMA Region Map'; Nickname=put(puma,$mopuma.); label nickname='PUMA Nickname' MapPage='Map Page' Region='Region (Super PUMA)'; ***drop _:; run; ======================End comment================== */ ods pdf file='/pub/reports/geography/mopumas.pdf' style=brick notoc; ods listing close; options nodate; proc print data=georef.mopumas00(drop=SuperPUMA) label; by Region notsorted mappage; title 'Missouri Public Use Microdata Areas (PUMAs)'; *title2 h=1 'With MCDC-Assigned Nicknames, and Counties Comprising the PUMAs'; title3 h=1 'Map Page Refers to ' C=BLUE H=1 'http://ftp2.census.gov/geo/maps/puma/puma2k/mo_puma5.pdf'; footnote h=1 color=gray "Produced by the Missouri State Census Data Center on &sysdate from georef/Tools/mopumas.sas"; footnote2 h=1 color=gray "Reference to the pdf Maps Booklet in the subtitle is a hyperlink to that document"; footnote3 h=1 color=gray "URL: https://mcdc.missouri.edu/reports/geography/mopumas.pdf"; id puma; var nickname counties; run; ods pdf close;