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

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.

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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

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