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

It has been many years since I've used GMAP and I've never used the uscity data set.  I want to display a count of providers per city in a particular state.  I don't get errors and I can see the legend but the map does not appear.  I'm sure there is some basic thing I'm missing.  This is my code...

 

proc gmap data=PERFS

MAP=MAPS.uscity ALL;

WHERE STATECODE = 'CA';

ID STATE PLACE;

CHORO PERFS/COUTLINE=BLACK;

RUN;

QUIT;

 

My data set called perfs contains 5 variables.

 

City = name of the city

Statecode = 2 alphas for the state (e.g. CA for California)

perfs = number of perfs in the city

state = numeric fips code for state (e.g. 1 for Alabama) 

place = place variable merged in from maps.uscity based on state and city

 

Any direction is much appreciated.  If helpful, I'm using SAS v9.3 in the windows environment.  Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Maps.UScity is a feature data set. It does not contain state boundaries. So that may be part of the issue. The values (counts) associated with cities would be in an annotate data set.

 

On this page, http://robslink.com/SAS/democd44/aaaindex.htm , there is a link to Example 12. Cities that shows placing total values for a few cities on a US map.

View solution in original post

4 REPLIES 4
ChrisBrooks
Ammonite | Level 13

It's a bit difficult to be certain without seeing some data from PERFS but I suspect the problem might lie with your where clause - try this

 

proc gmap data=PERFS
MAP=MAPS.uscity(WHERE STATECODE = 'CA') ALL;
ID STATE PLACE;
CHORO PERFS/COUTLINE=BLACK;
RUN;
QUIT;
Char
Obsidian | Level 7

That didn't seem to do it.  Here is an example of what my data in perfs looks like...

 

sample.jpg

 

This is completely made up - the place values don't match anything in CA - at least I don't believe so. 

 

ballardw
Super User

Maps.UScity is a feature data set. It does not contain state boundaries. So that may be part of the issue. The values (counts) associated with cities would be in an annotate data set.

 

On this page, http://robslink.com/SAS/democd44/aaaindex.htm , there is a link to Example 12. Cities that shows placing total values for a few cities on a US map.

Char
Obsidian | Level 7

Ah - I did not know that.  Thanks, that is exactly what I was looking for!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 4 replies
  • 1288 views
  • 0 likes
  • 3 in conversation