SAS is a very powerful application for understanding and analyzing data. I'm a big fan of SAS, I spent much of my career using it.
So there you have it, a simple way to chart and share with SAS and Swivel.
While SAS is a great tool for many problems, it's not stellar with sharing results. Creating a good looking chart with PROC GPLOT takes patience, and once you have the chart that you want to share, there's not a great place to put that chart to collect feedback.
Swivel, on the other hand, is designed for sharing. And it's easy to create a Swivel chart with SAS. Simply issue the following commands from SAS/BASE:
proc export
data=tograph
outfile='/tmp/tograph.csv'
dbms=csv
replace;
run;
x "curl -X POST -u 'YOUR_EMAIL_ADDRESS:YOUR_PASSWORD' -F 'data=</tmp/tograph.csv' -k https://api.swivel.com/v1/charts.xml"
Once you've created the chart in Swivel, you can manually adjust the format as you see fit, and then share it with others by publishing it to a group.
If you need to update the chart's data, you can easily do that using SAS.
x "curl -X PUT -u 'YOUR_EMAIL_ADDRESS:YOUR_PASSWORD' -F 'data=</tmp/newdata_tograph.csv' -k https://api.swivel.com/v1/charts/123456789.xml"
Where 123456789 is the id of the chart that you created. You can find this id in the chart's URL, as highlighted in the below image:
Swivel, on the other hand, is designed for sharing. And it's easy to create a Swivel chart with SAS. Simply issue the following commands from SAS/BASE:
proc export
data=tograph
outfile='/tmp/tograph.csv'
dbms=csv
replace;
run;
x "curl -X POST -u 'YOUR_EMAIL_ADDRESS:YOUR_PASSWORD' -F 'data=</tmp/tograph.csv' -k https://api.swivel.com/v1/charts.xml"
Once you've created the chart in Swivel, you can manually adjust the format as you see fit, and then share it with others by publishing it to a group.
If you need to update the chart's data, you can easily do that using SAS.
x "curl -X PUT -u 'YOUR_EMAIL_ADDRESS:YOUR_PASSWORD' -F 'data=</tmp/newdata_tograph.csv' -k https://api.swivel.com/v1/charts/123456789.xml"
Where 123456789 is the id of the chart that you created. You can find this id in the chart's URL, as highlighted in the below image:
So there you have it, a simple way to chart and share with SAS and Swivel.
Find out more in the Swivel developer corner, and get started with Swivel today.
Comments