<?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: How to plot some events over latitude and longitude data in Graphics Programming</title>
    <link>https://communities.sas.com/t5/Graphics-Programming/How-to-plot-some-events-over-latitude-and-longitude-data/m-p/291858#M10292</link>
    <description>Map may not be necessary, but will be great if, we can have it. Yes, they are in degrees as you specified</description>
    <pubDate>Tue, 16 Aug 2016 11:53:17 GMT</pubDate>
    <dc:creator>munitech4u</dc:creator>
    <dc:date>2016-08-16T11:53:17Z</dc:date>
    <item>
      <title>How to plot some events over latitude and longitude data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-plot-some-events-over-latitude-and-longitude-data/m-p/291841#M10290</link>
      <description>&lt;P&gt;I have 3 columns in a dataset:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Latitude &amp;nbsp; &amp;nbsp;Logitude &amp;nbsp; &amp;nbsp;Phone&lt;/P&gt;
&lt;P&gt;-89.2132&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;179.9323&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;A&lt;/P&gt;
&lt;P&gt;34.1231 &amp;nbsp; &amp;nbsp; &amp;nbsp; -85.123 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;B&lt;/P&gt;
&lt;P&gt;23.45 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -34.23 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; A&lt;/P&gt;
&lt;P&gt;.....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is a customer level data, where phone category can be A or B, I want to plot these categories over the Latitude and Logitude data in SAS, where A and B can take 2 different colors.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 11:54:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-plot-some-events-over-latitude-and-longitude-data/m-p/291841#M10290</guid>
      <dc:creator>munitech4u</dc:creator>
      <dc:date>2016-08-16T11:54:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot some events over latitude and longitude data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-plot-some-events-over-latitude-and-longitude-data/m-p/291856#M10291</link>
      <description>&lt;P&gt;Is there supposed to be a map involved?&lt;/P&gt;
&lt;P&gt;What units are those latitude and longititude values supposed to be in? Latitude typically uses degrees with a range of -90 to 90 and longitude -180 to 180 degrees.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 11:49:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-plot-some-events-over-latitude-and-longitude-data/m-p/291856#M10291</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-08-16T11:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot some events over latitude and longitude data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-plot-some-events-over-latitude-and-longitude-data/m-p/291858#M10292</link>
      <description>Map may not be necessary, but will be great if, we can have it. Yes, they are in degrees as you specified</description>
      <pubDate>Tue, 16 Aug 2016 11:53:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-plot-some-events-over-latitude-and-longitude-data/m-p/291858#M10292</guid>
      <dc:creator>munitech4u</dc:creator>
      <dc:date>2016-08-16T11:53:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot some events over latitude and longitude data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-plot-some-events-over-latitude-and-longitude-data/m-p/291859#M10293</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;with SAS/GRAPH you will get libraries named MAPS and MAPSGFK using the provided data and ODS GRAPHICS you can create maps. See the attachment for the example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is an example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*
 * create the map data
 * use the resolution var to have less data points
 * create a new ID var for drawing the map
 */ 
data map_data;
  length id_c $ 32;
  set mapsgfk.europe;
  where
    resolution &amp;lt;= 3
  ;
  id_c = catx("_", id, segment);
run;

/*
 * create the data for locations
 * NOTE: use a different name for the latitude and longitude variables
 */
data locations;
  infile cards;
  input
    lat2
    Long2
    Phone $
  ;
cards;
50.598726 9.450487 A
52.201658 -1.730536 B
;

/*
 * concat the two data sets
 */
data plotdata;
  set map_data locations;
run;
 

/*
 * draw the map using SGPLOT
 * the POLYGON will draw the map
 * the SCATTER will plot data points
 */
ods graphics / width=1600 height=1200 ;

proc sgplot data=plotdata  ;
  styleattrs
    datasymbols=(diamondFilled squareFilled)
  ; 
  polygon x=long y=lat id=id_c / group=id fill  outline name="map";

  scatter x=long2 y=lat2 / group=Phone markerattrs=(size=15) name="loc";
  keylegend "loc";
  xaxis display=none;
  yaxis display=none;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Bruno&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12851iA7D6A70890991B23/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="map.png" title="map.png" /&gt;</description>
      <pubDate>Tue, 16 Aug 2016 11:57:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-plot-some-events-over-latitude-and-longitude-data/m-p/291859#M10293</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2016-08-16T11:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot some events over latitude and longitude data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-plot-some-events-over-latitude-and-longitude-data/m-p/291867#M10294</link>
      <description>I have about 1 million observation, how can i make it more visible friendly?</description>
      <pubDate>Tue, 16 Aug 2016 12:20:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-plot-some-events-over-latitude-and-longitude-data/m-p/291867#M10294</guid>
      <dc:creator>munitech4u</dc:creator>
      <dc:date>2016-08-16T12:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot some events over latitude and longitude data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-plot-some-events-over-latitude-and-longitude-data/m-p/291888#M10295</link>
      <description>&lt;P&gt;If you have overplotting, you can&lt;A href="http://blogs.sas.com/content/iml/2011/03/04/how-to-use-transparency-to-overcome-overplotting.html" target="_self"&gt; use transparency to attempt to reduce overplotting&lt;/A&gt;:&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;scatter x&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;long2 y&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;lat2 &lt;SPAN class="token operator"&gt;/&lt;/SPAN&gt; &lt;SPAN class="token keyword"&gt;group&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;Phone name&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token string"&gt;"loc" transparency=0.9&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;If you have millions of points, you might also consider plotting the density of the data, rather than individual markers. You can use PROC KDE or &lt;A href="http://blogs.sas.com/content/iml/2014/09/02/hexagonal-bin-plot.html" target="_self"&gt;check out the hexagonal binning macro that can create a density map.&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Aug 2016 13:23:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-plot-some-events-over-latitude-and-longitude-data/m-p/291888#M10295</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2016-08-16T13:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot some events over latitude and longitude data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-plot-some-events-over-latitude-and-longitude-data/m-p/292096#M10302</link>
      <description>&lt;P&gt;I tried the transparency option as well. But the graph looks really bad.&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/12852i607E16165E66AFC9/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="map.jpg" title="map.jpg" /&gt;</description>
      <pubDate>Wed, 17 Aug 2016 08:35:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-plot-some-events-over-latitude-and-longitude-data/m-p/292096#M10302</guid>
      <dc:creator>munitech4u</dc:creator>
      <dc:date>2016-08-17T08:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot some events over latitude and longitude data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-plot-some-events-over-latitude-and-longitude-data/m-p/292105#M10303</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would make the marker size smaller.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Some questions:&lt;/P&gt;
&lt;P&gt;Please explain, what the viewer of the graph should be able to read out of this graph?&lt;/P&gt;
&lt;P&gt;Do many points have the same coordinates, for instance based on the ZIP code?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bruno&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2016 09:05:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-plot-some-events-over-latitude-and-longitude-data/m-p/292105#M10303</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2016-08-17T09:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to plot some events over latitude and longitude data</title>
      <link>https://communities.sas.com/t5/Graphics-Programming/How-to-plot-some-events-over-latitude-and-longitude-data/m-p/292109#M10304</link>
      <description>I tried reducing the marker size, but I am not able to distinguish the 2 cases. How can I make the 2 cases visible and more bigger? I am fine, even if i don't include the map, just the scales of latitude and longitude&lt;BR /&gt;&lt;BR /&gt;For your questions:&lt;BR /&gt;1. I want to see the density of both the cases across the longitude and latitude. &lt;BR /&gt;2. About the 95% of the points have different coordinates. 5% might be same.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Aug 2016 09:47:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Graphics-Programming/How-to-plot-some-events-over-latitude-and-longitude-data/m-p/292109#M10304</guid>
      <dc:creator>munitech4u</dc:creator>
      <dc:date>2016-08-17T09:47:38Z</dc:date>
    </item>
  </channel>
</rss>

