BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Jim_Ogilvie
Obsidian | Level 7

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

1 ACCEPTED SOLUTION
9 REPLIES 9
ChrisHemedinger
Community Manager

Check out this example for PROC SGPLOT.  If your data are prepped properly, this might work for you.

 

Network_Curved_Resp-277x300.png

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
Jim_Ogilvie
Obsidian | Level 7

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?

 

 

ChrisHemedinger
Community Manager

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.

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
Jim_Ogilvie
Obsidian | Level 7

Many thanks Chris.

 

 

Awaiting input from others in anticipation...... Smiley Happy

ChrisNZ
Tourmaline | Level 20

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]

GraphGuy
Meteorite | Level 14

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

 

nuclear_distance.png

I'll see if I can convert it to Proc SGmap (so users who don't have SAS/Graph can create something similar).

 

GraphGuy
Meteorite | Level 14

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:

nuclear_distance_sgmap.png

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 9 replies
  • 904 views
  • 5 likes
  • 4 in conversation