Hello ,
attached are two datasets, first one(Baltimore city) contains longitude and latitude for a city in Baltimore, and in second one are few data points with location information which i need to place on map and color by tower Cell.
I am able to do it in R but not in SAS.
Thank you.
Many of us will not download Excel files as they are security threats. The best way to provide data is via SAS data step code (and not in any other format). Instructions
But also, show us what you have tried. Have you looked at the PROC SGMAP documentation?
As others have suggested, start with the doc. Here is an example that overlays points and lines on a map:
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/grmapref/n0x9p71lic5q5an15063k0qjo8er.htm
You should also look at the dozens of examples in the SAS blogs. For example, Google quickly located this one:
As PaigeMiller mentioned, it would be interesting to see what you've tried.
That being said, here is one solution ...
proc import datafile="/home/u59782200/datapoints.xlsx" out=datapoints dbms=xlsx;
run;
proc import datafile="/home/u59782200/balt_city.xlsx" out=balt_city dbms=xlsx;
run;
proc sgmap mapdata=balt_city plotdata=datapoints;
openstreetmap;
choromap / mapid=subregion lineattrs=(color=red thickness=2px);
scatter x=long y=lat / group=tower
markerattrs=(symbol=circlefilled size=12px)
/* More current versions let you specify colors via colormodel=(cxd7191c yellow) */
;
run;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: