SAS Viya Copilot Explained: Building Machine Learning Pipelines in Minutes, Not Hours
Recent Library Articles
SAS Viya Copilot is a set of software as a service (SaaS) features and capabilities that use large language models (LLMs) to provide users with a more intuitive and accessible way to work with SAS Viya offerings. SAS Viya Copilot is for developers, data scientists, citizen data scientists, and business analysts who are writing code, analyzing data, building machine learning model pipelines, and doing more across the data and AI life cycle.
Already a SAS Viya user? Then you know you’ve got a wealth of capabilities at your fingertips. We’ll explore those together, giving you access to all the insights you’ll need. Join us on December 10 at 11 a.m. ET.
SAS OnDemand for Academics: In the program below, the output from PROC SGMAP is empty. The ‘Results’ window from the program below only has output from PROC GPLOT but not from the two PROC SGMAP steps. --------------------------- data temp01; input latitude longitude; cards; 60 0 50 10 ; proc gplot data=temp01; plot latitude*longitude; run; proc sgmap plotdata=temp01; openstreetmap; scatter x=longitude y=latitude / markerattrs=(symbol=circlefilled size=8); run; proc sgmap plotdata=temp01; esrimap url=https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer; scatter x=longitude y=latitude / markerattrs=(symbol=circlefilled size=8); run;
... View more
Hello,
I'm working on mapping close to 9,000 latitude and longitude points on a United States map. The code below show my code to achieve plotting of these X/Y on a US map. The issue is that some states only have a couple of dots and to preserve our users anonymity I need to use choropleth in situations where the count of address points is less than 10 in that state. Is it possible to have both X/Y points and choropleth on the same map?
I based my code below on this SAS support page that works with zip codes:
https://support.sas.com/kb/42/426.html
City_Coordinates
{
ID 8
City $40
State 8
X 8
Y 8
}
data longlat;
set work.city_coordinates ;
x=atan(1)/45*longitude;
y=atan(1)/45*latitude;
x=-x;
length state 5.;
run;
data anno;
set longlat;
retain xsys ysys '2' function 'label' size .75 flag 1 when 'a';
style='special';
text='M';
color='depk';
output;
run;
data states alaska hawaii pr;
set maps.states;
select;
when (state=2) output alaska;
when (state=15) output hawaii;
when (state=72) output pr;
otherwise output states;
end;
run;
data stateszip alzip hizip przip;
set anno;
select;
when (state=2) output alzip;
when (state=15) output hizip;
when (state=72) output przip;
otherwise output stateszip;
end;
run;
data states;
set states stateszip;
run;
proc gproject data=states out=stproj;
id state;
run;
data alaska;
set alaska alzip;
run;
proc gproject data=alaska out=akproj;
id state;
run;
data hawaii;
set hawaii hizip;
run;
proc gproject data=hawaii out=hiproj;
id state;
run;
data pr;
set pr przip;
run;
proc gproject data=pr out=prproj;
id state;
run;
/* Alaska coordinates */
data akproj(drop=x y);
set akproj;
if density < 2;
newx=(x-.55)*.50;
newy=(y-.35)*.50;
run;
/* Hawaii coordinates */
data hiproj(drop=x y);
set hiproj;
newx=x-.12;
newy=y-.20;
run;
/* Puerto Rico coordinates */
data prproj(drop=x y);
set prproj;
newx=(x+.315);
newy=(y-.24);
run;
/* Combine all of the projected data sets */
data all;
set stproj akproj(rename=(newx=x newy=y))
hiproj(rename=(newx=x newy=y))
prproj(rename=(newx=x newy=y));
run;
data map dot;
set all;
if flag=1 then output dot;
else output map;
run;
pattern1 v=me c=grp r=50;
title1 "Addresses in US" ;
title2 ;
proc gmap data=longlat map=map all;
id state;
choro state / anno=dot nolegend;
run;
quit;
Would the changes I need to make happen on proc gmap?
Thank you
... View more
I inherited several sas files saved as SASEB$DATA files. I can't find anything on how to get them into SAS or convert them to a readable format. I tried using libname v6, but it wont recognize the files. I couldnt find anything on the compatibility and migration page (Compatibility and Migration : SAS Help Center). Any ideas would be appreciated.
... View more
I open SAS.
I submit a macro (just submit it, so nothing happens except it puts the macro into memory). A line in the macro points to a formats library.
I call the macro, so the guts of the macro runs.
When the macro runs it creates a dataset. After running the macro I do a PROC FREQ on that dataset. All the formats are applied correctly.
Then I call the macro again. I do not submit the macro itself again, rather I just call (run) it. I change nothing and I do nothing else. All I do is call the macro a second time.
Then I do that same PROC FREQ mentioned above and this time some...not all, but some...of the formats are not applied.
So the 1st time I run the PROC FREQ I see all words (the formatted values) instead of their underlying numbers.
And the 2nd time I run the PROC FREQ I still see mostly words (the formatted values), but for some of them I see their underlying numbers instead.
And every subsequent time I run it I see the mostly words but some underlying numbers instead.
IOW, it works properly after I open a new SAS session and run it for the first time. And it doesn't work properly every subsequent time I run it.
Any idea?
... View more
As someone who still happily uses Display Manager, I like that I can configure it to automatically open ODS results using an external application (PowerPoint, Word, Adobe reader, whatever).
Is there a feature like that in VS Code extension / VS Code? I'm running VS Code locally, and connecting to local SAS 9.
AI suggests I use an X statement to open a file, which sounds like a reasonable approach. But curious if a human knows a way to configure the output files to open automatically in an external application.
Particularly interested in getting ODS PowerPoint to automatically pop open, at the moment.
... View more