I came across a nice, informative and educational web site last week. Google’s Chrome team have produced 20 Things I Learned About Browsers and the Web. Needless to say, it two of its early topics are cloud computing and web apps. Nonetheless, it is ve…
Category: SAS
5D visualiztion: from SAS to Google Motion Chart
Three dimensions are usually regarded as the maximum for data presentation. With the opening of ODS from SAS 9.2 and its graph template language, 3D graphing is no longer a perplexing problem for SAS programmers. However, nowadays magnificent amount of data with multi-dimension structure needs more vivid and simpler way to be displayed.
The emerging of Google Motion Chart now provides a sound solution to visualize data in a more than three dimensions scenario. This web-based analytical technology originated from Dr. Hans Rosling’s innovation. Dr. Rosling and his Gapminder foundation invented a technology to demonstrate the relationship among multiple dimensions by animated bubbles. They developed a lot of bubble plots in Gapminder’s website to discover knowledge form a bulk of public information, especially for regional/national comparison. It soon attracted Google’s attention. In 2008 after an agreement between Dr. Rosling and Google’s two founders, Google launched its Motion Chart gadget. People could create motion chart by using Google Docs, an online alternative to Microsoft’s Office.
The combination between SAS and Google Motion Chart shows a handy and cheap way for up-to-five-dimension data visualization. For Motion Chart, it supports five variables all together in a plot. Commonly the data structure requires time(animation), var1(X axis), var2(Y axis), var3(color) and var4(bubble size). The correlation from var1 to var4 is expected: usually the bubbles with changing color and size tend to move along the diagonal line. Overall 5d visualization can be rendered within such a single plot. In this example, a SAS help dataset ‘SASHELP.SHOES’ is used. The data set has several regions to compare each other. Logged return money is Y-axis, while logged sale money is X-axis. A series of virtual time is given to each region, with inventory as bubble size and the store number as color. By SAS, the data structure in Motion Chart can be prepared quickly. Thus, once the CSV file is uploaded to Google Docs, a motion chart is ready to be published in any webpage. OK, it’s time to sit and discover some interesting tendency…
Reference: 1.’Show me–New ways of visualising data’. The Economist. Feb 25th 2010.
2.‘Making data dance’. The Economist. Dec 11st 2010.
3. Google Docs online help center. 2010.
*********(1) Extract data from SASHELP.SHOES***********;
proc sql;
create table test as
select region, Sales, Inventory, Returns, Stores
from sashelp.shoes
order by region , sales desc
;quit;
********(2) Create a random variable for time************;
data test1;
do i=1 by 1 until (last.region);
set test;
by region;
time=today()-i+1;
mytime=put(time, mmddyy8.);
drop i;
output;
end;
run;
********(3) Transform some variables with log**********;
proc sql;
create table test2 as
select region, mytime, log(sales) as logsales, log(returns) as logreturn, Stores as storenum, Inventory
from test1
order by region, mytime
;quit;
********(4) Export data as CSV***************;
proc export data=test2 outfile='C:\Users\Yanyi\Desktop\test.csv' replace;
run;
*******(5) Upload CSV to Google Docs************;
******(6) Create Google Motion Chart manually**********;
**********END*********TEST PASSED 12DEC2010****************************;
Proc Fcmp(4): Binomial tree vs. Black-Scholes model
The very truth is that SAS has limited financial functions. Thanks to SAS Institute, they finally added some option pricing functions in the base module of SAS 9.2, such as Black-Scholes put/call functions, Garman-Kohlhagen put/call functions, etc. Thu…
P Value Format
PVALUEw.d
Pop Quiz for Computer Science Education Week
I helped to write a quiz for the Computer Science Education Week promotions that were featured on our company intranet. Do you fancy yourself as a Comp-Sci aficionado? Let’s see how you do with these.
1. Which achievement is Charles Babbage most…
Accessing Unix server in windows explorer
There has always been a debate between using a GUI-based, windows-freindly FTP client like WinSCP and a conventional telnet client like PuTTY. One party says that its Easy to use and doesn’t need any unix knowledge to perform any operations; and t…
Quantum Football, Electron Preschoolers, and Schrodinger’s STEM
At this time of year as fans debate over the best players in college football, quantum mechanics combines with college sports to produce the Heisman uncertainty principal: you cannot know who has won the trophy until it is announced, and so you ha…
Save 30% on All SAS Publishing Titles
Still looking for that perfect holiday gift? For a limited time you can save 30% on all books from SAS Publishing. Most of these books are a little big for stocking stuffers, but they fit just fine under a tree. This offer expires Dec. 13, 2010 so …