<?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 Replacing state abbreviations on a map with tiny &amp;quot;sparklines&amp;quot; with time trends in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/Replacing-state-abbreviations-on-a-map-with-tiny-quot-sparklines/m-p/15607#M308</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was hoping someone might have a slick/graceful/easy way to do this (maybe a macro or something)...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But since nobody has posted one up, I'll provide some info on how this could 'hypothetically' be done...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similar to how you can annotate text on a GMap (using the annotate 'label' function), you can also annotate images on a GMap (using the 'image' function) ... in this case, the images would be very small GPlots that you have created ahead of time.&amp;nbsp; The 'trick' (ie, the difficult part) is that you cannot easily center the image over the map areas like you can the text (using position='5').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With an annotated image, you must specify the bottom/left corner, and the top/right corner.&amp;nbsp; Therefore the way to "center" an image on a certain location on a GMap is to first 'move' to the center (using xsys/ysys=2), and then change to the relative % coordinate system (xsys/ysys=9) and move a slight bit to the left &amp;amp; down for the bottom/left corner of the image, and then 2-times that offset amount for the top/right corner of the image.&amp;nbsp; Here's an example (it annotates hockey team images instead of sparkline graph images)...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data logo_anno; set logo_anno (keep = x y x_offset y_offset country province city Teamname logo);&lt;BR /&gt;&amp;nbsp; length function style $8 html $1000;&lt;BR /&gt;&amp;nbsp; hsys='3'; when='a';&lt;BR /&gt;&amp;nbsp; xsys='2'; ysys='2'; function='move'; output;&lt;BR /&gt;&amp;nbsp; xsys='9'; ysys='9';&lt;BR /&gt;&amp;nbsp; x=-2.0+x_offset; y=-2.5+y_offset; function='move'; output;&lt;BR /&gt;&amp;nbsp; html='alt="'||trim(left(Teamname))||'" href="&lt;A href="http://www.google.com/search?&amp;amp;q='||trim(left(Teamname))||'&amp;amp;quot;'"&gt;http://www.google.com/search?&amp;amp;q='||trim(left(Teamname))||'"'&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; x=2.0*2; y=2.5*2; function='image'; imgpath=logo; style='fit'; output;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the output it produces:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://robslink.com/SAS/democd32/hockey.htm"&gt;http://robslink.com/SAS/democd32/hockey.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://robslink.com/SAS/democd32/hockey_info.htm"&gt;http://robslink.com/SAS/democd32/hockey_info.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An *alternative* which doesn't require annotate, and doesn't require coming up with coordinates for the bottom/left &amp;amp; top/right corner of each annotated image, might be to use javascript "popup" images for the graphs.&amp;nbsp; Here is an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://robslink.com/SAS/democd51/census_2010.htm"&gt;http://robslink.com/SAS/democd51/census_2010.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://robslink.com/SAS/democd51/census_2010_info.htm"&gt;http://robslink.com/SAS/democd51/census_2010_info.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Mar 2012 16:53:55 GMT</pubDate>
    <dc:creator>GraphGuy</dc:creator>
    <dc:date>2012-03-05T16:53:55Z</dc:date>
    <item>
      <title>Replacing state abbreviations on a map with tiny "sparklines" with time trends</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Replacing-state-abbreviations-on-a-map-with-tiny-quot-sparklines/m-p/15605#M306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does anyone have any thoughts for generating tiny line plots to center on each state (in place of or along with a state abbreviation)?&amp;nbsp; If I generated each little plot with a tiny x and y pixel size separately it seems like I could create an annotate data base that could include these just as one includes the state abbreviations - something similar to the pre and post image commands in ODS.&amp;nbsp; Alternatively, has anyone had experience annotating unicode characters on a map - I could display a trend indicator using unicode characters if nothing else.&amp;nbsp; The output will be PDF.&amp;nbsp; Thanks in advance for any suggestions!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will be trying to do a similar thing in PROC REPORT, annotating the little plots in one of the columns of the report.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers, Louise&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 19:03:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Replacing-state-abbreviations-on-a-map-with-tiny-quot-sparklines/m-p/15605#M306</guid>
      <dc:creator>louisehadden</dc:creator>
      <dc:date>2012-02-27T19:03:28Z</dc:date>
    </item>
    <item>
      <title>Replacing state abbreviations on a map with tiny "sparklines" with time trends</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Replacing-state-abbreviations-on-a-map-with-tiny-quot-sparklines/m-p/15606#M307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; You saw this paper?? &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://www2.sas.com/proceedings/forum2008/262-2008.pdf"&gt;http://www2.sas.com/proceedings/forum2008/262-2008.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2012 06:16:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Replacing-state-abbreviations-on-a-map-with-tiny-quot-sparklines/m-p/15606#M307</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2012-03-01T06:16:06Z</dc:date>
    </item>
    <item>
      <title>Replacing state abbreviations on a map with tiny "sparklines" with time trends</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/Replacing-state-abbreviations-on-a-map-with-tiny-quot-sparklines/m-p/15607#M308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was hoping someone might have a slick/graceful/easy way to do this (maybe a macro or something)...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But since nobody has posted one up, I'll provide some info on how this could 'hypothetically' be done...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similar to how you can annotate text on a GMap (using the annotate 'label' function), you can also annotate images on a GMap (using the 'image' function) ... in this case, the images would be very small GPlots that you have created ahead of time.&amp;nbsp; The 'trick' (ie, the difficult part) is that you cannot easily center the image over the map areas like you can the text (using position='5').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With an annotated image, you must specify the bottom/left corner, and the top/right corner.&amp;nbsp; Therefore the way to "center" an image on a certain location on a GMap is to first 'move' to the center (using xsys/ysys=2), and then change to the relative % coordinate system (xsys/ysys=9) and move a slight bit to the left &amp;amp; down for the bottom/left corner of the image, and then 2-times that offset amount for the top/right corner of the image.&amp;nbsp; Here's an example (it annotates hockey team images instead of sparkline graph images)...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data logo_anno; set logo_anno (keep = x y x_offset y_offset country province city Teamname logo);&lt;BR /&gt;&amp;nbsp; length function style $8 html $1000;&lt;BR /&gt;&amp;nbsp; hsys='3'; when='a';&lt;BR /&gt;&amp;nbsp; xsys='2'; ysys='2'; function='move'; output;&lt;BR /&gt;&amp;nbsp; xsys='9'; ysys='9';&lt;BR /&gt;&amp;nbsp; x=-2.0+x_offset; y=-2.5+y_offset; function='move'; output;&lt;BR /&gt;&amp;nbsp; html='alt="'||trim(left(Teamname))||'" href="&lt;A href="http://www.google.com/search?&amp;amp;q='||trim(left(Teamname))||'&amp;amp;quot;'"&gt;http://www.google.com/search?&amp;amp;q='||trim(left(Teamname))||'"'&lt;/A&gt;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; x=2.0*2; y=2.5*2; function='image'; imgpath=logo; style='fit'; output;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And the output it produces:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://robslink.com/SAS/democd32/hockey.htm"&gt;http://robslink.com/SAS/democd32/hockey.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://robslink.com/SAS/democd32/hockey_info.htm"&gt;http://robslink.com/SAS/democd32/hockey_info.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;An *alternative* which doesn't require annotate, and doesn't require coming up with coordinates for the bottom/left &amp;amp; top/right corner of each annotated image, might be to use javascript "popup" images for the graphs.&amp;nbsp; Here is an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://robslink.com/SAS/democd51/census_2010.htm"&gt;http://robslink.com/SAS/democd51/census_2010.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://robslink.com/SAS/democd51/census_2010_info.htm"&gt;http://robslink.com/SAS/democd51/census_2010_info.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Mar 2012 16:53:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/Replacing-state-abbreviations-on-a-map-with-tiny-quot-sparklines/m-p/15607#M308</guid>
      <dc:creator>GraphGuy</dc:creator>
      <dc:date>2012-03-05T16:53:55Z</dc:date>
    </item>
  </channel>
</rss>

