<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can anyone reproduce this cdc chart for opioid overdose by state? in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423348#M14600</link>
    <description>&lt;P&gt;Here is sample with 3 scatter plots.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.cars(where=(type='Hybrid'));
  scatter y=model x=mpg_city / xerrorlower=mpg_city xerrorupper=mpg_highway markerattrs=(size=0);
  scatter y=model x=mpg_city / markerattrs=(symbol=circlefilled size=10 color=blue) legendlabel='City';
  scatter y=model x=mpg_highway / markerattrs=(symbol=circlefilled size=10 color=red) legendlabel='Highway';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note, values for "Prius" are reversed.&lt;/P&gt;</description>
    <pubDate>Fri, 22 Dec 2017 17:56:45 GMT</pubDate>
    <dc:creator>Jay54</dc:creator>
    <dc:date>2017-12-22T17:56:45Z</dc:date>
    <item>
      <title>Can anyone reproduce this cdc chart for opioid overdose by state?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423318#M14587</link>
      <description>I am trying to reproduce (with my own data) the chart in the CDC report (Rudd, RA et al 2016 ) below, showing change in opioid overdose rate by state. This is not the way I would have chosen to display the data, but the authors did. So In the name of replication that’s what I am going to do too. I’ve never seen change in rate displayed like this so I don’t even know where to begin with google/forum searches.&lt;BR /&gt;&lt;BR /&gt;Image: &lt;A href="https://goo.gl/images/fCm1sm" target="_blank"&gt;https://goo.gl/images/fCm1sm&lt;/A&gt;&lt;BR /&gt;Article: &lt;A href="https://www.cdc.gov/mmwr/volumes/65/wr/mm655051e1.htm" target="_blank"&gt;https://www.cdc.gov/mmwr/volumes/65/wr/mm655051e1.htm&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The main features of this would be y axis with states, x axis with rates, two obs (rate10, rate15) displayed per y value (state), both obs are connected with a line, year is the group var, color coded so that 2010 rate= open round cap , 2015 rate= Filled round cap.&lt;BR /&gt;&lt;BR /&gt;I’m not totally new to creating figures in SAS but I’m not a pro so It may help me understand an answer to have fake data so here it goes&lt;BR /&gt;&lt;BR /&gt;Data staterates;&lt;BR /&gt;Input state $ rate year;&lt;BR /&gt;Format state $2. Rate 4.2 year 4.0;&lt;BR /&gt;datalines;&lt;BR /&gt;AK 56.34 2010&lt;BR /&gt;AK 36.56 2015&lt;BR /&gt;IL 21.47 2010&lt;BR /&gt;IL 48.21 2015&lt;BR /&gt;CA 14.60 2010&lt;BR /&gt;CA 18.6 2015&lt;BR /&gt;;&lt;BR /&gt;Run;&lt;BR /&gt;&lt;BR /&gt;Thank you!</description>
      <pubDate>Fri, 22 Dec 2017 14:16:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423318#M14587</guid>
      <dc:creator>Trp1</dc:creator>
      <dc:date>2017-12-22T14:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone reproduce this cdc chart for opioid overdose by state?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423320#M14588</link>
      <description>&lt;P&gt;PROC SGPLOT could easily do this.&amp;nbsp; If you provided the full data set, someone could show you.&amp;nbsp; I might take a stab at it with some fake data.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2017 14:23:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423320#M14588</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-12-22T14:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone reproduce this cdc chart for opioid overdose by state?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423323#M14589</link>
      <description>&lt;P&gt;Had problems editing my response, so I reposted.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2017 14:46:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423323#M14589</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-12-22T14:46:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone reproduce this cdc chart for opioid overdose by state?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423324#M14590</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data states;
   deaths2010 = 25 * uniform(151);
   deaths2015 = deaths2010 + 2 + normal(151);
   input State $1-15;
   datalines;
Alabama        
Alaska         
Arizona        
Arkansas       
California     
Colorado       
Connecticut    
Delaware       
Florida        
Georgia        
Hawaii         
Idaho          
Illinois       
Indiana        
Iowa           
Kansas         
Kentucky       
Louisiana      
Maine          
Maryland       
Massachusetts  
Michigan       
Minnesota      
Mississippi    
Missouri       
Montana        
Nebraska       
Nevada         
New Hampshire  
New Jersey     
New Mexico     
New York       
North Carolina 
North Dakota   
Ohio           
Oklahoma       
Oregon         
Pennsylvania   
Rhode Island   
South Carolina 
South Dakota   
Tennessee      
Texas          
Utah           
Vermont        
Virginia       
Washington     
West Virginia  
Wisconsin      
Wyoming        
;

proc sort;
   by deaths2015;
run;

ods html body='b.html' style=htmlblue image_dpi=300;
ods graphics on / height=12in width=5in;
proc sgplot nocycleattrs noautolegend;
   title;
   highlow y=state low=deaths2010 high=deaths2015;   
   scatter y=state x=deaths2015 / markerattrs=GraphDataDefault(symbol=circlefilled)
                                  name='a' legendlabel='2015';
   scatter y=state x=deaths2010 / markerattrs=(symbol=circlefilled)
                                  filledoutlinedmarkers name='b' legendlabel='2010'
                                  markerfillattrs=(color=white)
                                  markeroutlineattrs=GraphDataDefault;
   xaxis label='Deaths per 100,000 population';
   keylegend 'a' 'b'/ location=inside across=1 position=bottomright noborder;
quit;
ods html close;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Dec 2017 14:45:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423324#M14590</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-12-22T14:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone reproduce this cdc chart for opioid overdose by state?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423331#M14591</link>
      <description>Thank you for your response. My hunch is also that this is something SAS could do easily. And your response is so great, but unfortunately not quite what I need. I should have mentioned that I turned to the forum AFTER trying a hilow plot without success. The problem is that opioid rates did not increase in every state. some 2010 points are higher than 2015. In the cases where 2010&amp;gt;2015 there is no line drawn between the end caps. Is there any way to fix this? Note if you use my 3 obs of fake data it might be helpful as 1 case has 2010&amp;gt;2015. Thanks so much for taking a stab at this.</description>
      <pubDate>Fri, 22 Dec 2017 16:41:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423331#M14591</guid>
      <dc:creator>Trp1</dc:creator>
      <dc:date>2017-12-22T16:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone reproduce this cdc chart for opioid overdose by state?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423334#M14592</link>
      <description>&lt;P&gt;This is a known issue with HIGHLOW.&amp;nbsp; High must be &amp;gt; Low.&amp;nbsp; But, you can work around this by creating two new variables, "High" and "Low", and put the lower value in "Low" and higher value in "High".&amp;nbsp; Then, use these variables in the graph.&amp;nbsp; An alternative is to not use HIGHLOW, but use the SCATTER plots own xerror bars to draw the line.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2017 16:59:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423334#M14592</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-12-22T16:59:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone reproduce this cdc chart for opioid overdose by state?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423335#M14593</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/183686"&gt;@Trp1&lt;/a&gt; wrote:&lt;BR /&gt;Thank you for your response. My hunch is also that this is something SAS could do easily. And your response is so great, but unfortunately not quite what I need. I should have mentioned that I turned to the forum AFTER trying a hilow plot without success. The problem is that opioid rates did not increase in every state. some 2010 points are higher than 2015. In the cases where 2010&amp;gt;2015 there is no line drawn between the end caps. Is there any way to fix this? Note if you use my 3 obs of fake data it might be helpful as 1 case has 2010&amp;gt;2015. Thanks so much for taking a stab at this.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Are you using different data than the example graph? Note that in the example you post the link to there are a couple of points that have the 2010 &amp;gt; 2015 but the difference is so small that the points overlap and so you do not know if there was no line drawn between the two.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is the purpose of the graph to show the connection between the years or the increase/decrease between the years? I find the lack of a line between the two quickly notice there is something different (if the majority show an increase) for those pairings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2017 17:07:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423335#M14593</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-12-22T17:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone reproduce this cdc chart for opioid overdose by state?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423345#M14597</link>
      <description>&lt;P&gt;The problem with creating variables as you’ve described above (reverse coding any lower 2015 obs as the lowvar and any higher 2010 obs as the highobs ) is hat I don’t know how to do this without losing the color coding specific to 2010 and 2015. 2015 should be dark blue regardless of where it sits on the chart. If you have a suggestion for this or can share some specific code that accomplishes the line drawing via xerror in scatter I’d be very grateful!&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2017 17:33:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423345#M14597</guid>
      <dc:creator>Trp1</dc:creator>
      <dc:date>2017-12-22T17:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone reproduce this cdc chart for opioid overdose by state?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423346#M14598</link>
      <description>&lt;P&gt;Yes I’m using different data than in the graph and I definitely have obs where the decrease is not so small that the points overlap. So this is a problem for me. I couldn’t even change the scale to get around it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I personally dont mind that the lines don’t show up for the obs where the change is negative. In fact I might prefer this without connecting lines at all. As I said, I would have displayed this data differently. &amp;nbsp;But the point is replication. So my goal is to get a chart that is formatted like cdc’s as closely as possible.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much for your thoughts.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2017 17:42:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423346#M14598</guid>
      <dc:creator>Trp1</dc:creator>
      <dc:date>2017-12-22T17:42:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone reproduce this cdc chart for opioid overdose by state?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423347#M14599</link>
      <description>&lt;P&gt;Using Warren's code as example, you could add XERRORLOWER=deaths2010 to the first scatter plot as follows.&amp;nbsp; It does not matter whether the value of deaths2010 is lower of higher than deaths2015.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token procnames"&gt;proc&lt;/SPAN&gt; &lt;SPAN class="token procnames"&gt;sgplot&lt;/SPAN&gt; nocycleattrs noautolegend&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
   &lt;SPAN class="token statement"&gt;title&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
   scatter y&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;state x&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;deaths2015 &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt; markerattrs&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;GraphDataDefault&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token statement"&gt;symbol&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;circlefilled&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
                                  name&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'a'&lt;/SPAN&gt; legendlabel&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'2015' xerrorlower=deaths2010&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
   scatter y&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;state x&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;deaths2010 &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt; markerattrs&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token statement"&gt;symbol&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;circlefilled&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
                                  filledoutlinedmarkers name&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'b'&lt;/SPAN&gt; legendlabel&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'2010'&lt;/SPAN&gt;
                                  markerfillattrs&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;color&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;white&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;
                                  markeroutlineattrs&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;GraphDataDefault&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
   &lt;SPAN class="token statement"&gt;xaxis&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;label&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;'Deaths per 100,000 population'&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
   keylegend &lt;SPAN class="token string"&gt;'a'&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;'b'&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt; location&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;inside across&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt; position&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;bottomright noborder&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For better control of the colors, you can use 3 separate SCATTER plots to display the line and the two markers.&amp;nbsp; &amp;nbsp;Use a SCATTER plot with the xErrorLower and xErrorUpper values with the two variables, and set the markerattrs(size=0) to prevent display of any marker.&amp;nbsp; Then, use the other two SCATTER plots to display the 2010 and 2015 values with the right colors.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2017 17:42:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423347#M14599</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-12-22T17:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone reproduce this cdc chart for opioid overdose by state?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423348#M14600</link>
      <description>&lt;P&gt;Here is sample with 3 scatter plots.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sgplot data=sashelp.cars(where=(type='Hybrid'));
  scatter y=model x=mpg_city / xerrorlower=mpg_city xerrorupper=mpg_highway markerattrs=(size=0);
  scatter y=model x=mpg_city / markerattrs=(symbol=circlefilled size=10 color=blue) legendlabel='City';
  scatter y=model x=mpg_highway / markerattrs=(symbol=circlefilled size=10 color=red) legendlabel='Highway';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note, values for "Prius" are reversed.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2017 17:56:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423348#M14600</guid>
      <dc:creator>Jay54</dc:creator>
      <dc:date>2017-12-22T17:56:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone reproduce this cdc chart for opioid overdose by state?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423354#M14601</link>
      <description>&lt;P&gt;Sorry.&amp;nbsp; I posted it in a bit of a hurry.&amp;nbsp;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13856"&gt;@Jay54&lt;/a&gt;&amp;nbsp;told you the easy fix.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2017 18:12:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423354#M14601</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-12-22T18:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone reproduce this cdc chart for opioid overdose by state?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423363#M14602</link>
      <description>&lt;P&gt;Thank you, &amp;nbsp;my friend! This worked excellently. I will try with the 3 scatter plots as well for better color options.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Dec 2017 18:44:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423363#M14602</guid>
      <dc:creator>Trp1</dc:creator>
      <dc:date>2017-12-22T18:44:21Z</dc:date>
    </item>
    <item>
      <title>Re: Can anyone reproduce this cdc chart for opioid overdose by state?</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423386#M14606</link>
      <description>&lt;P&gt;Here is a revised solution with a change to the artificial data to more clearly show a few points where the rate has gone down.&amp;nbsp; This one plots high/low variables instead of the original.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data states;
   deaths2010 = 25 * uniform(151);
   deaths2015 = deaths2010 + 5 * (uniform(151) &amp;gt; 0.2) + normal(151);
   low  = min(deaths2010, deaths2015);
   high = max(deaths2010, deaths2015);
   input State $1-15;
   datalines;
Alabama        
Alaska         
Arizona        
Arkansas       
California     
Colorado       
Connecticut    
Delaware       
Florida        
Georgia        
Hawaii         
Idaho          
Illinois       
Indiana        
Iowa           
Kansas         
Kentucky       
Louisiana      
Maine          
Maryland       
Massachusetts  
Michigan       
Minnesota      
Mississippi    
Missouri       
Montana        
Nebraska       
Nevada         
New Hampshire  
New Jersey     
New Mexico     
New York       
North Carolina 
North Dakota   
Ohio           
Oklahoma       
Oregon         
Pennsylvania   
Rhode Island   
South Carolina 
South Dakota   
Tennessee      
Texas          
Utah           
Vermont        
Virginia       
Washington     
West Virginia  
Wisconsin      
Wyoming        
;

proc sort; by deaths2015; run;

ods html body='b.html' style=htmlblue image_dpi=300;
ods graphics on / height=12in width=5in;
proc sgplot nocycleattrs noautolegend;
   title;
   highlow y=state low=low high=high;   
   scatter y=state x=deaths2015 / markerattrs=GraphDataDefault(symbol=circlefilled)
                                  name='a' legendlabel='2015';
   scatter y=state x=deaths2010 / markerattrs=(symbol=circlefilled)
                                  filledoutlinedmarkers name='b' legendlabel='2010'
                                  markerfillattrs=(color=white)
                                  markeroutlineattrs=GraphDataDefault;
   xaxis label='Deaths per 100,000 population';
   keylegend 'a' 'b'/ location=inside across=1 position=bottomright noborder;
quit;
ods html close;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Dec 2017 21:16:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Can-anyone-reproduce-this-cdc-chart-for-opioid-overdose-by-state/m-p/423386#M14606</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-12-22T21:16:46Z</dc:date>
    </item>
  </channel>
</rss>

