I'm trying to make a bubble plot using sgmaps with the group option as seen here: https://blogs.sas.com/content/graphicallyspeaking/2018/11/29/proc-sgmap-series-plot-importing-shapefiles-and-using-proc-gproject/
My code works fine without the group option, but is throwing the following error when I add it:
97 bubble x=x y=y size=areacodes / group=outlier_flag;
_____
22
76
ERROR 22-322: Syntax error, expecting one of the following: ;, DATALABEL, DATALABELATTRS, DATALABELPOS, FILL, FILLATTRS,
LEGENDLABEL, NAME, NOFILL, OUTLINE, TRANSPARENCY.
ERROR 76-322: Syntax error, statement will be ignored.
My full code:
data annotations;
set sashelp.zipcode(keep=zip areacodes);
where zip in (89119,00501);
outlier_flag = zip eq 89119;
run;
proc geocode method=zip data=annotations out=annotations_xy lookupcity=sashelp.zipcode nocity attributevar=(state);
run;
proc sql noprint;
select distinct state into :state_list separated by ',' from annotations_xy;
quit;
%put &=state_list;
data map_boundaries;
set maps.states;
where state in (&state_list);
x = -x * 45/atan(1);
y = y * 45/atan(1);
run;
ods graphics / reset=all imagename="map" imagefmt=png width=1024px height=768px border=off;
proc sgmap mapdata=map_boundaries plotdata=annotations_xy;
esrimap url='http://services.arcgisonline.com/arcgis/rest/services/Canvas/World_Light_Gray_Base';
choromap / mapid=state density=2;
bubble x=x y=y size=areacodes / group=outlier_flag;
run;
quit;
Setinit excerpt:
Original site validation data
Current version: 9.04.01M5P091317
Operating System: LIN X64 .
Product expiration dates:
---Base SAS Software
---SAS/STAT
---SAS/GRAPH
---SAS Integration Technologies
---SAS/Secure 168-bit
---SAS Enterprise Guide
---SAS/ACCESS Interface to PC Files
---SAS Workspace Server for Local Access
Is it possible this feature was only just added and doesn't exist in TS1M5? I couldn't find any documentation that clarifies things.
... View more