Hi all,
I would like to do some sales analysis based on despatching depot and customer delivery location (destination), displayed on a map with the depots and destinations linked.
I have a measure for volume sold for each customer, lat/longs for each customer and lat/longs for each depot.
Is it possible to use PROC GMAP to create a network diagram on a map?
Thanks in advance
Jim
Check out this example for PROC SGPLOT. If your data are prepped properly, this might work for you.
Thanks Chris.
I can see how I could get my data into a shape to construct this, but after that step, what how could this be presented on a map?
Annotate perhaps?
There is another SAS procedure called SGMAP that can bring in maps (Esri and OpenStreet). We have plenty of examples on our support.sas.com site and in the Graphically Speaking blog.
Now, how to overlay the network arcs? That's beyond me, but maybe others (like @GraphGuy) can chime in.
Many thanks Chris.
Awaiting input from others in anticipation......
Proc GMAP allows you to do what you want using annotate data sets.
Proc SGMAP will probably look better, but I don't think it allows superposition of arrows.
You can fool it into drawing connecting lines by using the SERIES statement.
[Edit: That's what Robert does below]
@ChrisHemedinger Much better presented. Thanks!
Here's an example using SAS/Graph's Proc Gmap and annotate:
Description:
https://blogs.sas.com/content/sastraining/2016/08/25/how-close-are-you-to-a-nuclear-plant/
SAS code:
http://robslink.com/SAS/democd88/nuclear_distance.sas
I'll see if I can convert it to Proc SGmap (so users who don't have SAS/Graph can create something similar).
Here's a similar map created with Proc SGmap (which is in Base SAS). You should be able to do all the graphical stuff with 9.4m6, but if you want the custom mouse-over text and drilldown capability you'll need the very recently-released Viya 3.5.
Map with mouse-over text and drilldowns:
http://robslink.com/SAS/ods10/nuclear_distance.htm
SAS Code:
http://robslink.com/SAS/ods10/nuclear_distance.sas
PNG Image:
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.