Sam, I cannot seem to get this working, the map does not load without any error messages. I think it is because I am missing unprojected Lat and Long. According to the documentation: LONG contains the unprojected longitude value for the point specified in this region. SAS Visual Analytics uses this value for its polygons. Therefore, this value is required to be present and accurate in the final file. LAT contains the unprojected latitude value for the point specified in this region. SAS Visual Analytics uses this value for its polygons. Therefore, this value is required to be present and accurate in the final file. However, in the link to va74polygons.sas, the code just assigns the X and Y (projected) as the Lat and Long. /* Step 3: Create the final polygon data set with the required set of columns. We are going to create a new
shorter ID column here as the original ID columns are often long and unnecessarily complex. Note, we also apply
the previously created idname format to the IDNAME column.
*/
data ®ION_DATASET.;
set ®ION_DATASET.(keep=®ION_SHP_ID_COL. X Y SEGMENT DENSITY);
/* create new (shorter) ID */
length _TMP_ $60. _SID_ 8.;
if (_n_ eq 1) then
do;
_SID_ = 1;
_TMP_ = ®ION_SHP_ID_COL.;
end;
if _TMP_ ne ®ION_SHP_ID_COL. then
_SID_ = _SID_ + 1;
_TMP_ = ®ION_SHP_ID_COL.;
retain _TMP_ _SID_;
drop _TMP_ _SID_;
_RID_ = compress("®ION_PREFIX.-" || put(_SID_,8.));
IDNAME = put(®ION_SHP_ID_COL., idname.);
LONG = X;
LAT = Y;
ISO = "®ION_ISO.";
RESOLUTION = 1;
LAKE = 0;
ISOALPHA2 = "®ION_PREFIX.";
AdminType = "regions";
where density<®ION_SHP_DENSITY.;
keep _RID_ SEGMENT IDNAME LONG LAT X Y ISO DENSITY RESOLUTION LAKE ISOALPHA2 AdminType;
rename _RID_=ID;
run; David
... View more