Hello,
I am trying to create a map of the US showing only state and MSA (metropolitan statistical area) boundaries, using county-level data (maps.uscounty). I am currently using a guide to help me, but am still having difficulty (see link below) http://www2.sas.com/proceedings/sugi29/251-29.pdf
I was able to create an MSA variable (which combines several counties) and merge it with the map file based on county ID. In concert with the GREMOVE procedure, this should remove the barriers between counties within MSAs. However, when I invoke GMAP, it looks distorted.
So then I try GPROJECT, which should correct the distortion, but then it tells me that I have data on both sides of the equator (see error message below).
NOTE: PARALLEL1 = -4.960619304. NOTE: PARALLEL2 = 8.0288480358. ERROR: Standard parallels lie on opposite sides of the equator. ERROR: Equator is too close to the median latitude of the map data set for default parallel calculation. Try specifying PARALLEL1 and PARALLEL2 values explicitly.
However, that can't be the case, because I am only using US data. Oddly, when I look at the SAS projected latitude in the SAS provided map files, there are negative latitude values. I am not sure what to think.
I am able to graph the data just fine (at the county level) before GREMOVE, but after that it all becomes distorted. Any ideas?
See code below:
proc sort data=MSA_MAP;
by msa;
run;
proc gremove
data=MSA_MAP
out=MSA_MAP_1;
by msa;
id county;
run;
proc gproject
data=MSA_MAP_1
out=MSA_MAP_2;
id msa;
run;
pattern v=e;
proc gmap
data=MSA_MAP_2
map=MSA_MAP_2
all;
id msa;
choro Phys_Den_Tot_MD / discrete coutline=black;
format Phys_Den_Tot_MD Phys_Den_Tot_MD_.;
run;
... View more