/* data source: gapminder */ /* values were collected from 3 separate data sheets for the year 2008 */ data population; input country $1-15 pop_growth_rate life_expectancy gdp; label life_expectancy="Life Expectancy" gdp="Income per person (GDP/capita)"; informat gdp Dollar9.2; format gdp Dollar9.2; datalines; Bangladesh 1.414719001 68.007 $1,441.34 China 0.512386932 73.09 $6,679.20 Germany -0.190142845 80.06 $32,785.53 Hungary -0.175097367 73.48 $18,068.58 India 1.34038184 64.38 $2,621.81 Japan -0.052255655 82.81 $31,275.13 Nigeria 2.335343922 50.49 $2,100.11 Romania -0.154438571 73.27 $11,662.14 Russia -0.105615218 67.89 $14,730.02 South Africa 1.732630716 51.37 $9,428.79 Spain 1.49673505 80.935 $28,159.21 Sri Lanka 0.728 74.456 $4,142.53 Ukraine -0.541462211 68.306 $6,716.38 United Kingdom 0.66811514 79.5 $32,875.34 United States 0.915179428 77.8 $42,656.49 . 0 . . ; run; proc template; define statgraph bplot1; begingraph / designheight=480 designwidth=640; entrytitle 'Bubble Plot of Human Development Indicators and Population Growth Rates in 2008'; layout overlay; bubbleplot x=gdp y=life_expectancy size=eval(abs(pop_growth_rate)) / bubbleradiusmin=0 group=eval(ifc(pop_growth_rate<0,'Negative','Positive','Missing')) dataskin=matte name="bubble" datalabelattrs=(size=8) datalabel=country datalabelposition=bottom; discretelegend "bubble" / title="Population Growth Rate" pad=5; endlayout; entryfootnote halign=left 'Data source: Gapminder'; endgraph; end; run; proc sgrender data=population template=bplot1; run;