12-16-2010 12:38 PM
12-16-2010 01:14 PM
05-16-2013 03:44 PM
Hmm ... I'm not sure exactly what you're asking.
If you want to use the north america map, without Mexico & Canada, you could just plot the areas where the 'id' (country id number) = 926 (that's the US). Here's a very small/simplified example:
proc gmap data=maps.namerica map=maps.namerica (where=(id=926));
choro id / levels=1;
If you want jus the US, and you want the state borders to show up, you could use maps.us or maps.states.
05-17-2013 10:34 AM
My apologies. Poorly worded.
I have shipment data I would like to plot in North America. I can do this
for US only already, but my company treats Canada and Mexico as basically the
51st and 52nd states so they want to include those as
well. I know how to get the NA map, but I can’t quite figure out how to remove
the territory lines so that MX and CA are treated as one area when I create a
Hopefully that makes better sense. Thanks!
05-17-2013 11:41 AM
Ahh! - Makes more sense now!
Since you don't want the internal boundaries within Canada & Mexico, you could either 'Proc Gremove' them, or you could use the country borders from maps.world. Here's an example showing one way to do the latter:
filename odsout '.';
data canada_and_mexico; set maps.world (where=(id in (595 260)));
/* Make their 'state' fips code be their country id# */
length country $20;
if id=595 then country='Mexico';
if id=260 then country='Canada';
data us; set maps.states;
length country $20;
data custom_map; set canada_and_mexico us;
proc gproject data=custom_map out=custom_map nodateline project=hammer;
ODS LISTING CLOSE;
ODS HTML path=odsout body="&name..htm" style=sasweb;
goptions border cback=white;
proc gmap data=custom_map map=custom_map;
choro country / des='' name="&name";
ODS HTML CLOSE;
05-17-2013 11:56 AM
I had been attempting the first. I was using the gremove for CA and MX then combining states with the new CA and MX. Kept running into errors with my syntax though.
Your example is perfect. I can tweak a little to get exactly what I need.
Thank you very very much!