/* data source: gapminder */ /* values were collected from 3 separate data sheets for the year 2008 */ data lit; input country $1-15 literacy life_expectancy gdp; label life_expectancy="Life Expectancy" gdp="Income per person (GDP/capita)"; informat gdp Dollar9.2; format gdp Dollar9.2; format literacy f4.2; datalines; Bangladesh 53.48 68.007 $1,441.34 China 95.9 73.09 $6,679.20 Germany 99 80.06 $32,785.53 Hungary 98.89 73.48 $18,068.58 India 66.01 64.38 $2,621.81 Nigeria 72 50.49 $2,100.11 South Africa 87.99 51.37 $9,428.79 Sri Lanka 94.2 74.456 $4,142.53 Ukraine 99.7 68.306 $6,716.38 United States 99 77.8 $42,656.49 . 0 . . ; run; data literacy; set lit; lt=put(literacy, f5.2); label=trim(country) || ', ' || trim(lt) || '%'; run; /*proc print; run;*/ proc template; define statgraph bplot; begingraph / designheight=480 designwidth=640; entrytitle 'Bubble Plot of Literacy in 2008'; layout overlay; bubbleplot x=gdp y=life_expectancy size=literacy / bubbleradiusmin=0 dataskin=matte; scatterplot x=gdp y=life_expectancy / datalabel=label markerattrs=(size=0) datalabelattrs=(size=8) datalabelposition=auto; endlayout; entryfootnote halign=left 'Data source: Gapminder'; endgraph; end; run; proc sgrender data=literacy template=bplot; run;