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

I am trying to make a choropleth map with the Tidy Tuesday data for this week, but I am getting an error: ERROR: File MAPS.US.DATA does not exist.

Below is my code. What do I need to change to make MAPS.US.DATA exist?

I am using SAS studio if it is relevant. 

 

* Get data 1;
filename test1234 url "https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2021/2021-10-05/nurses.csv";

proc import out=nurses datafile=test1234 dbms=csv replace; 
	guessingrows = max; 
run;

* Map attempt 1
Error "ERROR: File MAPS.US.DATA does not exist."
https://v8doc.sas.com/sashtml/gref/z9n04-ex.htm;

libname reflib 'SAS-data-library';
libname maps 'SAS-data-library';

proc gmap map=maps.us data=nurses;
   where Year = 2020;
   id State;
   choro 'Total Employed RN'n / coutline=gray;
run;
quit;

This is a reference of what I am attempting to make a simple version of:

Indescribled_0-1633493565346.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisNZ
Tourmaline | Level 20

Studio is just a client, it does not matter. What's on the server is what matters.

 

Does SAS complain when you run 

proc gmap; run;

?

If not, then you have SAS/GRAPH installed. If so, contact your SAS admin to know why the MAPS library is not defined.

 

Note that the latest way to draw maps is to use proc SGMAP and maps from library MAPSGFK. This does not require SAS/GRAPH.

 

 

View solution in original post

5 REPLIES 5
Indescribled
Obsidian | Level 7
I am using SAS studio so I have nothing installed.
ballardw
Super User

Have you verified that your install has a MAPS library? You typically do not have to use a LIBNAME statement to point to it as that is set up when installed. If attempting to use a different MAPS library then you may be pointing to location without the data set you attempt to use.

 

If you do not see a MAPS library in your library list you may have a MAPSGFK library with map data sets for use.

Indescribled
Obsidian | Level 7
I am using SAS studio, so there is no install. Can I get a MAPS library while using SAS studio?
ChrisNZ
Tourmaline | Level 20

Studio is just a client, it does not matter. What's on the server is what matters.

 

Does SAS complain when you run 

proc gmap; run;

?

If not, then you have SAS/GRAPH installed. If so, contact your SAS admin to know why the MAPS library is not defined.

 

Note that the latest way to draw maps is to use proc SGMAP and maps from library MAPSGFK. This does not require SAS/GRAPH.

 

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 5 replies
  • 750 views
  • 0 likes
  • 3 in conversation