Tuesday, December 1. 2009
I'm always on the lookout for interesting data. So, when I saw that PNC Wealth Management posted the annual PNC Christmas Price Index, I had to check it out.
PNC tabulates the total current cost of a true love's gifts as enumerated in the carol The Twelve Days of Christmas. This year PNC also provides a handy Excel spreadsheet with all of the historical data back to 1984.
I, of course, didn't use Excel to examine it. A quick look at the data in Graph Builder reveals that the seven swans-a-swimming are the most volatile item in the index.
In fact, in the early years they were the most expensive too! PNC recognizes that the volatility may interfere with the index as well so they compute a "Core" index without the swans. Using the Data Filter I left the swans out of Graph Builder as well.
That makes it easier to see that the nine ladies dancing are the most expensive part of Christmas this year. Note to all school-age girls: Learn to dance. It pays much better than milking cows, and it's more fun too.
Lastly, as much as I like snowballs, I think that the lines in Graph Builder do a much better job of visualizing this data than the snowballs that PNC uses.
They might look pretty but they don't stand a snowball's chance of being used by serious analysts.
Happy holidays!
Update: Douglas Okamoto took the PNC data and did some inflationary adjustment and time series analysis. His results are available in the JMP File Exchange.
Thursday, November 19. 2009
 Last week I had the great fortune to attend the Explorer Series event, Exploring Predictive Analytics and Data Visualisation with JMP, presented by Stephen Few and my colleague Chuck Pirrello.
We had good attendance at the SAS offices in Marlow. Some people even flew in from Ireland.
As always, Stephen was fascinating. His insights into the presentation of quantitative information are thought-provoking. I learn something new every time I hear him.
For a flavor of Stephen's style and point of view, be sure to check out his two white papers: Predictive Analytics for the Eyes and Mind and Visualizing Change.
 If you missed him in the UK this time, he'll likely be back next year. Watch for announcements at our seminars page, or sign up for the JMP Newswire to have the latest JMP announcements delivered straight to your inbox.
For a taste of his presentation, check out his Webcast from our Explorers Webcast Series.
Monday, October 26. 2009
Today is a special day for a colleague. Happens every 365 days.
A good friend here is 1388534400 today. At least that's what JMP tells me when I put her birthday in one column and today's date in another and then calculate the difference.
You see, JMP stores dates as the number of seconds since midnight on January 1, 1904. So today's date, October 26, 2009, is 3339360000 as far as JMP is concerned.
Fortunately, JMP has a host of built-in functions to help deal with dates in this format. See the whole list in the Formula Editor under the Date Time category.
One very helpful class of these functions are the In XXX() functions where XXX is a time unit. These functions return the number of seconds in the time unit specified. For example, In Minutes(1) returns 60. That is, there are 60 seconds in 1 minute.
These functions come in handy for converting JMP's seconds-based dates to something more readable, like years. You do that by dividing a number of seconds by In Years(1):
To save my friend's dignity, I'll let you use that formula to figure out how old she is.
I hope that she has a great day.
Tuesday, April 7. 2009
Now that the University of North Carolina men's basketball team has won the NCAA championship, I've updated the Bubble Plot and Profiler I posted last week using data from the final game.
Bubble Plot of Championship Game
Profiler for Championship Game
Friday, April 3. 2009
Ahhh, springtime in North Carolina, when a young man’s thoughts turn to … basketball.
Last weekend, the University of North Carolina Tar Heels advanced to the Final Four for the 18th time by beating the University of Oklahoma. As a Carolina alum, I had a passing interest in the game.
When the Heels had a big lead in the second half, I remembered Bill James’ formula for determining when the outcome of a college basketball game is no longer in doubt.
- Take the number of points one team is ahead.
- Subtract three.
- Add a half-point if the team that is ahead has the ball, and subtract a half-point if the other team has the ball. (Numbers less than zero become zero.)
- Square that.
- If the result is greater than the number of seconds left in the game, the lead is safe.
I quickly grabbed my computer and put that formula into a column of a JMP data table and ran the Profiler on it to see what the curves looked like. Suffice it to say, the lead wasn’t safe then, but eventually the boys in blue had the game in hand.
Since then, I’ve used JMP’s File>Internet Open… feature to import the play-by-play table from ESPN.com. The graph below shows that UNC got an early 7-point lead and never trailed in the game.
After a little data cleanup, I created a Bubble Plot to show the size of the lead at each scoring event and how safe the lead was at the time.
The bubbles represent each time a team scored and are colored by who had the ball after that score. For example, a blue bubble indicates that OU scored and UNC had the ball afterward. The plot is animated by the time into the game. Click the Play button to watch the game unfold.
Advance the Minutes slider to 33:48 into the game (6:12 to to go in the game), and you'll see that UNC had a 19-point lead, but it wasn’t safe yet. UNC didn’t put it away until the 37:53 mark (2:07 to go), when Wayne Ellington hit two free throws to seal the deal.
I also created a Profiler to see how close to 100% safe the Tar Heels were with 6:12 to go.
UNC had the ball and a 19-point lead at 6:12. If Tyler Hansbrough had hit one of his notorious (yet ugly) hook shots from under the basket or if Ty Lawson had drilled a jumper from the top of the key, the game would have, effectively, been over. If…if…if…I guess it doesn’t matter now. They won, after all.
By the way, the Bubble Plot and Profiler above were created using the new Save as Flash (SWF) feature in JMP 8. Now, when you find a compelling model or visualization of data over time, you too can communicate that to colleagues who don't have JMP.
If you’d like to see the data table I created with the play-by-play data, you’ll find it in the File Exchange.
Monday, March 9. 2009
A customer recently compared JMP's very rich interface to the interface in a computer game. Specifically, she said that watching me use JMP was like watching her children play Super Mario Bros. Her boys would be guiding one of the Italian plumbers along, and suddenly they would stop and direct Mario or Luigi to leap into the air and, out of nowhere, a box full of gold coins would appear above his head.
Similarly, she said that the more she uses JMP, the more gold coin boxes she finds.
We've tried to put the most commonly used features prominently in the user interface, but many valuable, more advanced options are shown only with a right-click contextual menu, or only in a secondary dialog box. This is an attempt to make JMP's interface easier for the beginning user but provide options for the experienced user who wants more control and features.
Every now and then, I'll be posting tips and tricks to help show you where the gold coin boxes are. You may have found some of them already, but, to tell the truth, I find one I didn't know about most every day.
Too Many Axes to Grind
Today's tip comes from an interaction with the customer referenced above. She had a report window with dozens of graphs in it. It was created as the result of an analysis with a by-group column. So, most of the graphs used same column for the Y axis.
By default, JMP will set the minimum and maximum values on an axis to fit the data being plotted. When you use a by-group column, this results in the various graphs having different scales on the axes they have in common.
To make comparisons among the graphs easier, the customer wanted to rescale all of these axes to have the same scale. The day before we spoke, she had spent many hours double-clicking on each axis in the report and setting the minimum and maximum values in the resulting dialog. Then she discovered that she needed to re-do the analysis because the data had changed.
That's when she called me.
"There must be a quicker way," she said.
Indeed there is. A right-click on an axis will give you the an option to "Copy Axis Settings" to the clipboard as shown below.
Then, you can go to another axis and right-click on it and choose "Paste Axis Settings." Now, the two axes will match each other.
This alone would make the process of making axes have the same scale easier, but if you combine this with one more hidden gem, you'll get some real magic.
Instead of a simple right-click on the destination axis, hold the Ctrl key down as you right-click and choose "Paste Axis Settings." When you hold the Ctrl key down as you make changes in a report window, JMP will broadcast those changes to all similar objects in the window. So, as you paste the axis settings while holding the Ctrl key down, you'll paste them to all similar axes in the window.
What could be tedious becomes a breeze.
As I explained how to do this to this customer, I could almost hear the "boo-da-ling" of a coin box in the background.
Monday, November 10. 2008
How can I use JSL to make a graph with no labels on the axes? There are a lot of reasons you might want to do this; maybe you are building a dashboard control that shows a custom picture, or maybe you have data that needs no labels.
Anyway, there are two places to look to make the labels go away – the tick mark labels (0, 10, 20, … 100) and the axis label (a variable name like Height).
Let’s use the JSL Graph Box command to create the graph like this (taken directly from the Help->Indexes->JSL Functions->Graph Box description):
New Window( "Example",
Graph Box(
Frame Size( 300, 300 ),
xaxis(show major ticks(false),show minor ticks(false),show labels(false)),
yaxis(show major ticks(false),show minor ticks(false),show labels(false)),
Marker(
Marker State( 3 ),
[11 44 77],
[75 25 50]
);
Pen Color( "Blue" );
Line( [10 30 70], [88 22 44] );
)
);
To eliminate the tick mark labels, add two commands sent to the x and y axes:
New Window( "Example",
Graph Box(
Frame Size( 300, 300 ),
xaxis(show major ticks(false),show minor ticks(false),show labels(false)),
yaxis(show major ticks(false),show minor ticks(false),show labels(false)),
Marker(
Marker State( 3 ),
[11 44 77],
[75 25 50]
);
Pen Color( "Blue" );
Line( [10 30 70], [88 22 44] );
)
);
And to eliminate the axis labels, add two more commands sent to the axes:
New Window( "Example",
g = Graph Box(
Frame Size( 300, 300 ),
xaxis(show major ticks(false),show minor ticks(false),show labels(false)),
yaxis(show major ticks(false),show minor ticks(false),show labels(false)),
Marker(
Marker State( 3 ),
[11 44 77],
[75 25 50]
);
Pen Color( "Blue" );
Line( [10 30 70], [88 22 44] );
)
);
g[axis box(1)]<<remove axis label;
g[axis box(2)] << remove axis label;
// you could remove the tick mark labels this way, especially if you are not using the Graph Box command
// g[framebox(1)] << xaxis(show major ticks(false),show minor ticks(false),show labels(false));
// g[framebox(1)] << yaxis(show major ticks(false),show minor ticks(false),show labels(false));
(Bonus) To remove the frame as well, send four commands to the frame:
New Window( "Example",
g = Graph Box(
Frame Size( 300, 300 ),
xaxis(show major ticks(false),show minor ticks(false),show labels(false)),
yaxis(show major ticks(false),show minor ticks(false),show labels(false)),
Marker(
Marker State( 3 ),
[11 44 77],
[75 25 50]
);
Pen Color( "Blue" );
Line( [10 30 70], [88 22 44] );
)
);
g[axis box(1)] << remove axis label;
g[axis box(2)] << remove axis label;
g[frame box(1)] << left(0);
g[frame box(1)] << right(0);
g[frame box(1)] << top(0);
g[frame box(1)] << bottom(0);
Here is a complete example with a slider to make it do something:
g = Graph Box(
Frame Size( 100, 20 ),
Pen Color( "Blue" );
Y Function( 50 + 50*Sin( x*SliderValue ), x ); // graph is a sin wave, period depends on SliderValue
);
// remove adornments from graph
g[framebox( 1 )] << xaxis( show major ticks( false ), show minor ticks( false ), show labels( false ) );
g[framebox( 1 )] << yaxis( show major ticks( false ), show minor ticks( false ), show labels( false ) );
g[axis box( 1 )] << remove axis label;
g[axis box( 2 )] << remove axis label;
// hide the inner border
g[frame box( 1 )] << Left( 0 ); // no line on left, etc
g[frame box( 1 )] << Right( 0 );
g[frame box( 1 )] << top( 0 );
g[frame box( 1 )] << bottom( 0 );
// shrink and hide the outer border too
g[Border Box( 1 )] << Left( 0 ); // no space on left, etc
g[Border Box( 1 )] << Right( 0 );
g[Border Box( 1 )] << Top( 0 );
g[Border Box( 1 )] << bottom( 0 );
g[Border Box( 1 )] << sides( 0 ); // draw no sides (1+2+4+8 would be all four sides)
s = Slider Box( 0, .5, SliderValue, SliderFunction ); // slider range 0 to .5
SliderValue = .25; // initial value, becomes current value when slider is moved
SliderFunction = Function( {}, g[frame box( 1 )] << reshow ); // reshow the graph when the slider moves
// put it all together in a window
New Window( "Example",
Border Box(
Left( 10 ), Right( 10 ), top( 10 ), bottom( 10 ),
Lineup Box( N Col( 1 ), g, s )
)
);

Monday, April 16. 2007
You'd think that in 18 years of employment at SAS I'd have been to SAS Global Forum (nee SUGI) more than twice, but you'd be wrong. I'm a second-timer this year. My first SUGI was also in Orlando at the Dolphin, so as far as I'm concerned, this is the only place they ever have them.
There were lots of highlights in the opening session, but here are a few that stuck out.
- SAS CEO Dr. Jim Goodnight highlighted SAS Visual BI, powered by JMP 7. It was the first product mentioned by name in his remarks. JMP and SAS can provide so much benefit to our customers when used together. We're excited that JMP is a part of the broad and deep family of software that is SAS BI.
- Guy Kawasaki, author of many books and a blog that I enjoy, spoke on The Art of Innovation. He used the story of ice harvesters and the ice factories (his #8 Hindsight) to illustrate the danger in staying on a single technology curve. I wish that he'd had more than seven minutes; he's a great storyteller.
- John Kerr, Global Quality Director at Whirlpool, gave JMP its second mention of the night. When Dr. Goodnight asked about Whirlpool’s history with SAS, John was proud to say that it started over 10 years ago with JMP and now has progressed up to the SAS Warranty Analysis solution. This is a great example of how JMP can be a foothold that grows into strategic account for SAS.
- sasCommunity.org looks like it's going to be a great place for SAS users to share the knowledge collected over the last 30+ years. I wonder who'll create the JMP page?
- G-Force was part of the closing entertainment. Pretty amazing. Maybe, at the booth tomorrow, John Sall, John Weisz, John Leary and I will try that human jump rope thing they did. Seems fitting. Maybe we'll call it a human JMP rope, though.
Scott Adams (author of another excellent blog) is speaking tomorrow. Something to look forward to.
|