32
UNEMPLOYMENT RATE (KDHR-Place of Residence) - 1999 Low and High Values 1.234568 6.699507 Allen Anderson Atchison Barber Barton Bourbon Brown Butler Chase Chautauqua Cherokee Cheyenne Clark Clay Cloud Coffey Comanche Cowley Crawford Decatur Dickins on Doniphan Douglas Edwards Elk Ellis Ellsworth Finney Ford Franklin Geary Gove Graham Grant Gray Greeley Greenwood Hamilt on Harper Harvey Haskell Hodgeman Jackson Jefferson Jewell Johnson Kearny Kingman Kiowa Labette Lane Leavenwor th Lincoln Linn Logan Lyon Mcpherson Marion Marshall Meade Miami Mitchell Montgomery Morris Morton Nemaha Neosho Ness Norton Osage Osborne Ottawa Pawnee Phillips Pottawatomie Pratt Rawlins Reno Republic Rice Riley Rooks Rush Russell Saline Scott Sedgwick Seward Shawnee Sheridan Sherman Smith Stafford Stanton Stevens Sumner Thomas Trego Wabaunsee Wallace Washington Wichita Wilson Woodson Wyandott Xanthippe Stevens and Larry Xanthippe Stevens and Larry Hoyle Hoyle Policy Research Institute Policy Research Institute The University of Kansas The University of Kansas Visualizing Census Visualizing Census Data Data

Visualizing Census Data

  • Upload
    xenon

  • View
    22

  • Download
    2

Embed Size (px)

DESCRIPTION

Visualizing Census Data. Xanthippe Stevens and Larry Hoyle Policy Research Institute The University of Kansas. Conveying Racial Data with PROC GPLOT. axis1 … axis2 order=(0 to &maxval. by &scale.) pattern1 color=white value=msolid; pattern2 color=blue value=msolid; - PowerPoint PPT Presentation

Citation preview

Page 1: Visualizing Census Data

UNEMPLOYMENT RATE (KDHR-Place of Residence) - 1999

Low and High Values 1.234568 6.699507

Allen

Anderson

Atchison

Barber

Barton

Bourbon

Brown

Butler

Chase

Chautauqua

Cherokee

Cheyenne

Clark

ClayCloud

Coffey

Comanche

Cowley

Crawford

Decatur

Dickinson

Doniphan

Douglas

Edwards

Elk

Ellis

Ellsworth

Finney

Ford

Franklin

GearyGove

Graham

Grant

Gray

Greeley

Greenwood

Hamilton

Harper

HarveyHaskell

Hodgeman

JacksonJefferson

Jewell

Johnson

Kearny

Kingman

Kiowa

Labette

Lane

Leavenworth

Lincoln

Linn

Logan

Lyon

Mcpherson Marion

Marshall

Meade

Miami

Mitchell

Montgomery

Morris

Morton

Nemaha

Neosho

Ness

Norton

Osage

Osborne

Ottawa

Pawnee

Phillips

Pottawatomie

Pratt

Rawlins

Reno

Republic

Rice

RileyRooks

Rush

Russell

Saline

Scott

Sedgwick

Seward

Shawnee

SheridanSherman

Smith

Stafford

Stanton

Stevens

Sumner

Thomas

Trego WabaunseeWallace

Washington

Wichita

Wilson

Woodson

Wyandott

Xanthippe Stevens and Larry HoyleXanthippe Stevens and Larry HoylePolicy Research InstitutePolicy Research InstituteThe University of KansasThe University of Kansas

Visualizing Census DataVisualizing Census Data

Page 2: Visualizing Census Data

Conveying Racial Data with PROC GPLOTConveying Racial Data with PROC GPLOT

proc sql; select max(v_value), max(v_value)/4 into :maxval, :scale from race00;quit;

axis1 …

axis2 order=(0 to

&maxval. by &scale.)

pattern1 color=white value=msolid;

pattern2 color=blue value=msolid;

proc gplot data=hilo;

plot lo*v_year

hi*v_year /

overlay

areas=2

haxis=axis1

vaxis=axis2;

run;

Page 3: Visualizing Census Data

Congressional Redistricting Data with PROC GSLIDECongressional Redistricting Data with PROC GSLIDE

if first.segment then do row=line; line=1; xsys = "2"; ysys = "2"; function="poly"; when= 'A'; style="msolid"; output; end;else do row=line; function = "polycont"; when= 'A'; xsys = "2"; ysys = "2"; line = 1; style="msolid"; output; end; run;

data annoplace;length function color $8;set city (keep=x y line type tlid placer segment); by placer segment;

Page 4: Visualizing Census Data

Congressional Redistricting Data with PROC GSLIDECongressional Redistricting Data with PROC GSLIDE

data anno;/*concatenate annotated county and city data*/ set annocnty annoplace;run;

goptions reset=all gunit=pct border device=gif gsfname=dist3map ftext=swissb htitle=6 htext=3;

proc gslide annotate=anno;run;quit;

Page 5: Visualizing Census Data

Congressional Redistricting Data with PROC GMAPCongressional Redistricting Data with PROC GMAP

proc gmap map=mapset

data=dist3;

id cousubr;

choro popvar/levels=6

coutline=black;

run;

Page 6: Visualizing Census Data

Population Data with PROC GMAPPopulation Data with PROC GMAP

data anno;length function style color$8;set city (keep=x y city value); xsys='2'; ysys='2'; hsys="1"; style='pempty'; position='5'; color='blue'; x=x; y=y; function='pie'; angle = 0; rotate= 360; valrange=&maxval-&minval;size=.5+(value/valrange)*5; line=0; when='A'; output;run;

Page 7: Visualizing Census Data

Population Data with PROC GMAPPopulation Data with PROC GMAP

goptions reset=global gunit=pct border cback=white device=gif570 gsfname=giffile ctext=black ftext=swiss htitle=6 htext=3;

title1 'Kansas Cities, Population 2000';

footnote1 j=r 'Source: U.S. Census Bureau ';

proc gmap map=countymap data=blanks; id county; choro cfill/discrete

nolegend coutline=cxCCCCCC

annotate=anno;

run;

quit;

Page 8: Visualizing Census Data

Data with PROC GMAP and ACTIVEXData with PROC GMAP and ACTIVEX

data mapset; set maps.uscounty; where state=20;length fips 8;fips=county+20000;run;

goptions reset=global device=activex transparency;

ods html body=”&varname..html” path=ODSOUT;

proc gmap map=mapset data=ksdata; id fips; prism &varname./ discrete nolegend coutline=black;run;quit;

ods html close;

Page 9: Visualizing Census Data

Drill-down Maps using PROC GMAP and JAVADrill-down Maps using PROC GMAP and JAVA

ods listing close;ods html file="&geo..html" path=ODSOUT archive='http://www.ku.edu/pri/ ksdata/sashttp/java/mapapp.jar'

parameters=("DRILLDOWNMODE"= "HTML")

parameters=("DRILLPATTERN"='http://www.ku.edu/cgiwrap/ ippbrwww/city.pl?cityfips= {&txtplace}')

parameters=("BACKCOLOR"= "FFFFFF");

Page 10: Visualizing Census Data

proc gmap map=temp data=temp;id idvar;choro txtplace/discrete nolegend coutline=black;run;

ods html close;ods listing;

quit;

Drill-down Maps using PROC GMAP and JAVADrill-down Maps using PROC GMAP and JAVA

Page 11: Visualizing Census Data

Proportional Shading Using Data Step and PROC GMAPProportional Shading Using Data Step and PROC GMAP

Page 12: Visualizing Census Data

Proportional Shading Using Data Step and PROC GMAPProportional Shading Using Data Step and PROC GMAP

value shade__________________

1 CXF1F1FF4 CXEBEBFF9 CXE0E0FF16 CXD1D1FF25 CXBEBEFF36 CXA7A7FF49 CX8C8CFF64 CX6C6CFF81 CX4848FF100 CX2020FF

Page 13: Visualizing Census Data

Proportional Shading Using Data Step and PROC GMAPProportional Shading Using Data Step and PROC GMAP

goptions colors=(CXF1F1FFCXEBEBFFCXE0E0FFCXD1D1FFCXBEBEFFCXA7A7FFCX8C8CFFCX6C6CFFCX4848FFCX2020FF);

Page 14: Visualizing Census Data

Proportional Shading Using Data Step and PROC GMAPProportional Shading Using Data Step and PROC GMAP

<TR>

<TD bgcolor="#6767FF">&nbsp;<TD><font size=2>Allen </font><TD align="char" char="."><font size=2> 47.37</font>

<TD bgcolor="#7D7DFF">&nbsp;<TD><font size=2>Doniphan </font> <TD align="char" char="."><font size=2> 41.69</font>

<TABLE BORDER><TR><TD bgcolor="#CCCCFF" colspan=15 align="center">PRECIPITATION (INCHES) - 1998

Page 15: Visualizing Census Data

Proportional Shading Using Data Step and PROC GMAPProportional Shading Using Data Step and PROC GMAP

/* print the cells */

put '<TD bgcolor="#' shade +(-1) '">&nbsp;' '<TD> <font size=2>' county cntyfmt. '</font>' '<TD align="char“ char="."> <font size=2>' value best7. '</font>';

Page 16: Visualizing Census Data

Glyph Map using PROC GMAPGlyph Map using PROC GMAP

Page 17: Visualizing Census Data

Glyph Map using PROC GMAPGlyph Map using PROC GMAP

%macro shades(var=, lablvar=, data=, loshade=0, hishade=255, midval=xmax/2-xmin/2);

Page 18: Visualizing Census Data

Shade from red to yellowShade from red to yellow

if &var < (&midval) then do;

imval=int(.499999 + &loshade +

(&var-xmin) * ( (&hishade-&loshade)/((&midval)-xmin) ));

shade = 'CX' || 'FF' || put(imval, hex2.) || '00' ;

end;

Glyph Map using PROC GMAPGlyph Map using PROC GMAP

Page 19: Visualizing Census Data

Shade from yellow to greenShade from yellow to green

else do;

imval=int(.499999 + &loshade +

(&var-(&midval)) * ( (&hishade-&loshade)/(xmax-(&midval)) ));

shade = 'CX' || put(&hishade - imval + &loshade,hex2.)|| 'FF' ||'00';

end;

Glyph Map using PROC GMAPGlyph Map using PROC GMAP

Page 20: Visualizing Census Data

Data Step Graphics InterfaceData Step Graphics Interface

/* FEMALES */

barxleft=&grwdth+

&leftmrg+

&cntrmrg;

barxright=floor(&grwdth+

&leftmrg+

&cntrmrg+

barlenF);

rc=gdraw('bar',

barxleft,

barybot,

barxright,

barytop);

Page 21: Visualizing Census Data

Custom Area SF1 Profile ReportsCustom Area SF1 Profile Reports

Page 22: Visualizing Census Data

Defining a new areaDefining a new area

Page 23: Visualizing Census Data

Defining a new areaDefining a new area

Page 24: Visualizing Census Data

Defining a new areaDefining a new area

[email protected]

AL9526952720002

******

Page 25: Visualizing Census Data

Defining a new areaDefining a new area

Page 26: Visualizing Census Data

SF1 Profile for custom areaSF1 Profile for custom area

Page 27: Visualizing Census Data

Defining an area from an addressDefining an area from an address

Page 28: Visualizing Census Data

Defining an area from an addressDefining an area from an address

Page 29: Visualizing Census Data

Defining an area from an addressDefining an area from an address

Page 30: Visualizing Census Data

Recalling or Using a Previous Defined AreaRecalling or Using a Previous Defined Area

Page 31: Visualizing Census Data

SF1 Profile for custom areaSF1 Profile for custom area

Page 32: Visualizing Census Data

SAS code for the examples in this paper can be found at SAS code for the examples in this paper can be found at http://www.ku.edu/pri/ksdata/sashttp/mwsug01.http://www.ku.edu/pri/ksdata/sashttp/mwsug01.

Larry HoyleLarry [email protected]@ku.edu

(785) 864-9110(785) 864-9110

Xan StevensXan [email protected]@ku.edu

(785) 864-9111(785) 864-9111

Policy Research InstitutePolicy Research Institute

The University of KansasThe University of Kansas

1541 Lilac Lane, Suite 6071541 Lilac Lane, Suite 607

Lawrence, Kansas 66044Lawrence, Kansas 66044

http://www.ku.edu/prihttp://www.ku.edu/pri