Top 10 posts of 2014

It's time to revisit the top blog posts of last year. Quite a few of the top posts were about using JMP to analyze and visualize data relating to real-world questions: How am I doing with my diet and fitness? What kinds of music and which artists dominate my Apple® iTunes library? What's the best method for hard-cooking eggs that are also easy to peel? Maybe you missed these and other popular posts last year while you were on vacation or too busy to read blogs, and maybe you'll find something useful now.

The top post was a collection of quotes about teaching statistics with JMP -- in the academic world as well as the corporate world. This post also generated lots of discussion in comments.

The second most popular post was part of an effort by our data visualization expert to reduce the number of pie charts in the world. He cleverly used Pi Day (3/14) as the day to debut his campaign. I wouldn't be surprised if #OneLessPie makes a reappearance this year on Pi Day.

Also making the list was a post about interactive HTML in JMP 11. There's lots more information about interactive HTML to come this year as part of our blogging about JMP 12. (In fact, we've already started our Coming in JMP 12 blog series, in which the very people who create the software give you a look at what's in the new version. And once the new version is out in March, those same developers will show you how to use the new features and capabilities.)

Without further ado, here are the top 10 posts of the previous year, as determined by pageviews in WordPress:

  1. Fun and effective: Teaching statistics with JMP by Anne Milley
  2. #OneLessPie chart on Pi Day by Xan Gregg
  3. Why spreadsheets can lead to error - part 1 by Charles Pirrello
  4. An eggciting designed eggsperiment by Ryan Lekivetz
  5. Determining chemical concentration with standard addition: An application of linear regression in JMP by Eric Cai
  6. How it works: Interactive HTML in JMP 11 by Heman Robinson
  7. The eggciting results of my designed eggsperiment by Ryan Lekivetz
  8. Digging into my diet and fitness data by Shannon Conners
  9. Music library visualizations by Louis Valente
  10. JMP Pro for linear mixed models - part 1 by Jian Cao

Our readers love technical content. We can definitely see that reflected in this list. You can look forward to plenty of technical blog posts in 2015. Thanks for reading!

Post a Comment

The science behind word of mouth

Some things just catch on. The $100 cheesesteak. Gangnam style. Six Sigma management strategy. A blender commercial. All became popular – went viral, so to speak. But how?

JMP-DiscoverySummit2014S_50B6009Jonah Berger, James G. Campbell Associate Professor of Marketing at The Wharton School of Business, wondered the same thing. He went to college to become an environmental engineer, but quickly found himself thinking about how he could apply the scientific method to social influence and interpersonal communication – and perhaps find an answer to what drives word of mouth.

For the past decade, Berger has studied the science of social transmission. His New York Times best-seller, Contagious, uses groundbreaking research and compelling stories to explain why some products, ideas and behaviors succeed while others fail.

In an upcoming Analytically Speaking webcast, he outlines several of his six principles behind social contagion: social currency, triggers, emotion, public, practical value and stories. You can watch the webcast, Wednesday, Jan. 28, at 1 p.m. ET.

No matter what you do – scientist, engineer, consultant, marketer, academic, analyst, the list goes on – you need to understand how to make your products and ideas catch on. Berger will leave you with specific techniques for spreading information and generating buzz.

Berger’s talk was recorded at JMP Discovery Summit 2014.

Post a Comment

Dual-scaled jobs chart deconstructed, part 2

In my previous post, I examined how the dual scales on this jobs chart are sending an inaccurate message. But my efforts to remake alternate graphs from the raw data revealed another source of message corruption.

c0

Reading the graph text closely, you see that the red line is really an aggregate of three measures obtained from the Federal Reserve Economic Data (FRED) site. That is, the red Less Than Bachelor's line is the sum of the education levels Less Than High School Only, High School and Some College. The chart suggests the Less Than Bachelor's group was ascending with the Bachelor's or Higher group and took a sharp turn for the worse after the 2008 recession.

Here's a graph of all four individual measures (on the same scale!).

jobs4a

Figure 1: Jobs by Education Level

 

It turns out that each of the three components has its own story. Less Than High School (orange) was flat until taking a hit before the recession and slowly declining afterwards. High School (red) was flat then became declining after the recession. Only Some College (purple) had any upward trend before the recession, and that trend slowed but continued upward after the recession.

Aggregating the three Less Than Bachelor's groups creates a single up-and-down group, though none of the subgroups showed that pattern. Those three groups do have one thing in common, which might justify the aggregation: They all keep losing ground against their pre-recession trend. To make that easier to see, I've added lines of fit (dashed) that are just based on the pre-recession data.

jobs4b

Figure 2: Jobs compared to pre-recession trends

My macroeconomics knowledge and my data are exhausted at this point, so I can't really say how fair or significant the aggregated trend really is. Possibly there are demographic factors involved, such as the increasing number of people attending college. Possibly aggregating based on some college or no college is more relevant.

jobs6

Figure 3: Jobs by aggregated education level

 

In any case, it's important to remember that a graph communicates a message, but that message is not necessarily accurate or relevant. In Part 1 of this deconstruction, we saw that the dual scales affected our perception of the trends. Here, we see that the aggregation of the data also affects the message.

Making the graph

How was Figure 2 created in Graph Builder? It's four variables and two elements (connected line and regression line). To make the regression lines only apply to the before-recession data, I added a new variable that was set to 1 before the last recession and 0 otherwise, and I put it in the Frequency role. Then I uses the element properties to turn off the Frequency variable for the connected line element, so that it only affected the regression line. For the in-graph labels, I used the annotation tool. You can right-click on an annotation to change the color and other properties. One of Edward Tufte's principles is to include labels close to the data when you can. It's not something that's easy for software to do automatically, but it's not too hard to add manually.

I've posted a JMP file with this data and some graph scripts to the JMP File Exchange as Civilian Labor Force 1991 - 2014.

Post a Comment

Coming in JMP 12: Overhauled Recode for easier data cleaning

Text data cleaning is an unglamorous but important step in statistics and analytics. Manually entered data is full of misspellings, typographical errors and inconsistencies. Even machine-generated data can cause problems if two data sources disagree on formatting. Errors must be fixed before analyzing data, because the tiniest difference makes two pieces of text appear different to the computer. A 2014 New York Times article estimated that data scientists spend between 50 and 80 percent of their time cleaning data.

We recognize that data cleaning is a critical step, so we are adding several new features in JMP 12 to make it easier. The overhauled Recode command in JMP is one of them. We expanded Recode with automatic data cleaning algorithms and an improved user interface for manual cleaning tasks.

Recode's new "Group Similar Values" command automatically corrects small data entry errors. Typos and inconsistent spellings show up as a small number of missing, extra or incorrect characters in otherwise identical text. For example, the misspelled "rhythim" can be corrected to "rhythm" by removing the 'i' character. Group Similar Values identifies such errors in the data table and groups them, outputting its best guess at the correct spelling for the group. It offers manual control over the difference threshold, as well as whitespace, punctuation and case sensitivity.

Automatic tools save significant effort, but they can't get the right answer all the time. For those cases, we redesigned the user interface for manual editing, making it easier to work with large data sets and verify that recoded values are correct.

Screenshot of JMP 12 Recode showing the results of Group Similar Values with some groups collapsed.

Screenshot of Recode showing the results of Group Similar Values with some groups collapsed.

Recode's new "Grouped Display" makes it clear when two different strings are recoded to the same string. Groups can be collapsed or filtered by a search query, making it easy to focus on areas of interest within a large data set. The right-click menu offers manual control over creating and splitting groups. Every operation is now undoable.

Finally, we added many new ways to save, load, modify and merge Recode scripts for repetitive data cleaning tasks. Scripts can now be saved to a standalone file in addition to the data table. Loading a script in the Recode dialog displays the script's effect on the current table data and allows further editing. Scripts can be merged intelligently when loading or saving.

Editor's note: This post is part of a series of previews of JMP 12 written by the people who develop the software.

Post a Comment

Dual-scaled jobs chart deconstructed, part 1

I saw this "really striking" jobs chart on Twitter recently. Can you see why the data is not as striking as it appears?

c0

Figure 1: Original tweet

 

It certainly looks striking. The red line (labor force without a bachelor's degree) and the blue line (labor force with a bachelor's degree) were moving in lock step until the 2008 US recession, and then the red line abruptly moves in the opposite direction. It's likely there is some relevant story here, but this chart doesn't tell it very accurately.

The problem is that the red line and the blue line are on very different scales. Their absolute ranges and relative ranges are different. The vertical range is 26 million persons for the blue line and only about 12 million persons for the red line even though the latter has much higher values. Here are both series on the same scale:

jobs1

Figure 2: Single Scale

That's a more accurate picture, and you can still see the divergence after the recession. But the two groups weren't quite moving on the same trajectory before the recession, after all. The red line's increase was shallower and already starting to level off before the recession, and its dip is not as dramatic, especially in relative terms.

Alternative visualizations

It's rarely a good idea to use two scales on a graph, yet it's pretty common. It seems we have a drive to put as much information as possible on a single graph. It's understandable because the result feels more efficient, and maybe we don't notice the added complexity as we construct the graph one variable at a time. But the viewer sees the whole graph at once and has a bit of mental work to do to decipher two different scales. The whole point of data visualization is to leverage the non-thinking perception we get for free from our visual systems.

Nonetheless, those lines are pretty far apart, making comparisons difficult, so it's not perfect either. Separate graphs is a natural alternative, but we would still have to figure out how to make the disparate scales comparable. So instead, let's look at ways to make dual scales more perceptually accurate.

First, a technical note: The method for making a dual-scaled graph in Graph Builder in JMP is a little below the surface since it's not a recommended technique. First, add two Y variables to the left axis and then right-click on them and choose "Move Right" for one of the variables.

One way to avoid a dual scale altogether is to transform the two variables onto some relative scale, but the downside is that you lose the original units. However, you can get that effect without losing the units by setting each scale as if it were transformed. For example, let's pretend we transform each variable to a percentage of its maximum value. That's equivalent to having the left and right scales both go from 0 to the maximum data value (plus some margin).

jobs2a

Figure 3: Dual scales at 0 to 100%

That feels truer since they're on the same scale in some sense (0 to 100%), but the bottom half of the graph is empty and feels wasted (though it is serving some purpose). We can extend the logic of Figure 3 and scale both axes to 50% of maximum to 100% of maximum.

jobs2b

Figure 4: Dual scales at 50% - 100%

Now we can see each trend in context of its own range. However, the rates of change are not comparable to each other: A vertical distance of 5 million on the left axis is about the same as 10 million on the right axis. If we wanted to compare rates of change or vertical change in general, we'd need to give both scales the same range.

jobs2c

Figure 5: Dual scale with equal ranges

 

Now we can see that the red loss is actually less than the blue gain after the recession, though the loss looked much bigger in the original (Figure 1). Notice that in this mode, with equal ranges, we can still move each entire scale vertically and make the crossover point arbitrary, which is a scary idea. The casual viewer will think the crossover point is significant, but it's not.

A completely different story

Here's one final graph to show how really dangerous dual-scaled graphs can be.

jobs2d

Figure 6: Dual scales for a custom story

With only a few scale modifications, we can tell a completely different story: The lines started out together, then the red line surged before finally coming back down to blue line levels again. The scales here are just as justified as those in  Figure 1.

For more discussion of the general issue, see Dual-Scaled Axes in Graphs by Stephen Few.

I've referred to the lines by their colors partly because the variables names are wordy but also to stress that the concepts are generic. However, the appropriateness of each scaling technique can depend on the meaning of the data, such as whether relative or absolute change is more relevant.

Now I'd like to hear from you: Given that no view is perfect, which of the six figures do you think represents this jobs data best?

Post a Comment

Coming in JMP 12: New features in DOE

The design of experiments (DOE) development group at JMP has been busy working on the upcoming version of the software, so I cannot mention every new thing in one short blog post. Here, I will cover a few important new features. Speaking of covering, the most exciting new feature supports a completely different kind of design – covering arrays.

What is a covering array, and who needs them?

Many complex systems have very little random variability. That is, once the controls are set, the system performs the same way all the time. Examples are electronic components and software programs that do not deliberately use random numbers to create variability. Testing such systems is important to both manufacturers and consumers to make sure that all the intended behavior of the system, regardless of the control settings, is correct.

Now imagine a system that has 20 switches that control various system behaviors. The designer of the system would like to demonstrate that the system works as desired no matter how the switches are set. However, to test all possible combinations of the 20 switches would require more than a million trials. This could be prohibitively expensive both in time and money.

It turns out that usually an unanticipated combination of only two or three controls leads to undesirable behavior. So, if you can build a test plan where every pair (or triple) of settings is explored, then you will have covered every two-way (or three-way) combination.

A strength 2 covering array guarantees that you will test all four combinations of any pair of switches. A covering array of strength 3 ensures that all eight combinations of any triple of switches is tested. Since system testing is often time-consuming and unproductive, covering arrays with a minimum number of trials are most desirable. Surprisingly, using JMP 12, you can test all two-way combinations of 20 switches with only eight trials -- provably the smallest possible number. To test all three-way combinations requires only 18 trials. So far, no one has published a covering array for this case with fewer runs. Clearly, using a minimum size covering array can save lots of time.

The covering array tool in JMP 12 supports any number of factors with any number of levels up to strength 6. You can also specify multiple infeasible combinations of factors and the resulting covering array will avoid those combinations.

Have you added any features to definitive screening designs?

Definitive screening designs in JMP 12 now support orthogonal blocking in a way that is much more flexible than blocking standard textbook designs. For standard two-level fractional factorial designs, the number of blocks must be a power of two (i.e., 2, 4, 8, 16, etc.). Also the number of runs in each block (excluding center runs) must also be a power of two. By contrast, you can build an orthogonally blocked definitive screening design where the number of blocks can be any integer between 2 and the number of factors. So, if you want to run an experiment from Monday to Friday and you want to block on the factor Day, you can create a definitive screening design with five blocks.

Anything new in space filling designs?

There are two important new capabilities for space filling design.

First, you can now add a categorical factor to a space filling design. The resulting design is space filling for each level of the categorical factor and is also space filling ignoring the categorical factor.

Second, a new feature of the Augment designer in JMP 12 supports space filling augmentation. The augmented points are spatially separated from the original points to more fully explore the specified region of the factors.

One last thing – a GUI for specifying infeasible combinations

A couple of years ago, one of the talks at the JMP Discovery Summit conference dealt with various clever ways to specify infeasible factor setting using linear inequality constraints. Sitting in the audience, I realized that the red triangle menu item in the Custom Designer labeled Disallowed Combinations was too inaccessible to most users.

Advanced users knew about Disallowed Combinations but complained that writing a Boolean expression defining all the infeasible settings was difficult and prone to error.

 

Disallowed Combinations wizard is based on the Data Filter interface.

Disallowed Combinations wizard is based on the Data Filter interface.

The image above shows the new Disallowed Combinations Filter being used to specify that level A of X1 cannot be set along with level U of X2. This capability is available in JMP 12 for the Custom Designer, the Augment Designer, the Space Filling Designer and finally for Covering Arrays. Though my example above shows two categorical factors, you can also use the filter with continuous factors.

Editor's note: This post is part of a series of previews of JMP 12 written by the people who develop the software.

Post a Comment

Coming in JMP 12: Export to Microsoft PowerPoint presentations

As a JMP user, you’ve probably needed to incorporate graphs and tables into Microsoft PowerPoint presentations. We have heard the requests for better interoperation with PowerPoint. As part of JMP 12, we have been working on functionality to export JMP content directly to a PowerPoint file.

Prior to JMP 12, you’ve had to use the clipboard to move selected content into PowerPoint. It takes a bit of work especially using the “Paste Special” feature to pick out the rendering or formatting you’re after. PowerPoint can get confused about the content or formatting. Tables of numbers often require manual rework. The experience can certainly be improved.

With JMP 12, we have added the ability to export directly to the .pptx file format. The export will write graphs, tables, text and outline titles directly from JMP. PowerPoint will supply most of the visual styling such as table colors, fonts, title size, etc., based on the template used. JMP will ship with a default template. Once content is within PowerPoint, you can update styles, move content around and better incorporate your own content.

If you are just a bit more adventurous, you can use JMP Scripting Language (JSL) to gain more control over the presentation creation. For example, you can reposition outline titles or turned them off entirely. Perhaps you have a corporate standard PowerPoint template or just prefer a different look to the output. Using JSL, you can instruct JMP to select a different template file from the one we ship with JMP.

Once JMP 12 is available, I will have a more detailed rundown of the capabilities and assumptions we use to create the output. I will also show some JSL used to insert slides into an existing presentation and also how you can use your own template file for even faster customization.

Here are a couple of screen captures from PowerPoint with an exported file opened. I hope that you’ll enjoy using this functionality when JMP 12 is available in March.

Graph Output shown in PowerPoint

Graph Output shown in PowerPoint

 

Screenshot of Table Output opened within PowerPoint

Table Output

Editor's note: This post is part of a series of previews of JMP 12 written by the people who develop the software.

Post a Comment

Coming in JMP 12: Query Builder

We hear frequently from JMP users that they spend a great deal of time preparing their data before they can start analyzing it. We added Query Builder to JMP 12 to streamline the process of getting data from relational databases into JMP and ready for analysis. JMP has had the Open Table feature for opening tables from relational databases for many releases, but Open Table has some notable limitations: it does not help with joins or filtering, and the queries it does produce can be difficult to share.

Query Builder has been designed to help you build much more complex database queries without having to become an expert in SQL syntax. It can automatically join database tables based on primary and foreign key relationships and help you interactively filter the data. Also, with a few clicks, you can turn the filter into a prompt that can help others use the query you built to get the data they need.

Figure 1

Selecting tables to include in a query

 

Figure 2

Query Builder example with filters

 

While building your query, you can specify the modeling types and formats that variables should have once they are in JMP, eliminating the need to do this manually or write a JSL script to do it. You can even include Recode or other cleanup scripts to be run after data is returned by the query. The result is a single, easily shareable file that delivers analysis-ready data to you or your colleagues in one step.

Query Builder also has a “Custom SQL” mode. If you get to a point building a query interactively where you need something that Query Builder does not provide, you can switch into “Custom SQL” mode and modify the SQL directly to get exactly what you need.

Look for more details on how to use Query Builder in future posts here when JMP 12 is released.

Editor's note: This post is part of a series of previews of JMP 12 written by the people who develop the software.

Post a Comment

Visualizing pregnancy and post-baby weight loss with Graph Builder

My first favorite visualization from my JMP Discovery Summit poster was a multiple-element Graph Builder creation that tracked my weight trends through pregnancy, post-baby weight loss, and two and half years of weight maintenance. This seems like an especially appropriate time of year to share this graph since  so many New Year's resolutions include weight loss goals!

While BodyMedia provides a weight graph in their software and you can export weekly or monthly summaries of calorie-related measures in PDF format, it doesn't offer a unified graphic to track long-term weight changes along with deficit and macronutrient information. Although the final graph may look complicated, it's actually pretty easy to create it in Graph Builder once you know how. Xan Gregg, lead developer of Graph Builder in JMP and head of our Data Visualization group, actually recreated my final graph during part of his "Unlocking the Power of Graph Builder" talk at Discovery Summit 2014. (If you missed the conference, you can see the recording in the JMP User Community.)

In the early version of this graph shown below, I used points for weight measurements, with multiple weight measures stacked within weeks. I added bar elements to display average weekly percentages for the various macronutrients I tracked. I added a heat map to show the number of days out of each week that I ate in a calorie surplus or deficit, with red indicating more days in a particular range and blue indicating fewer. I used a smoother on the heat map and Y axis range lines to show the deficit and surplus ranges in 500 calorie increments. An X axis reference line showed the end date of my pregnancy.

Early version of main plot

Prior to creating the final version of this graph for my poster, I met with Xan, who recommended simplifying the presentation of this graph by:

  • Lightening axis reference lines so that they did not dominate the data.
  • Superimposing macronutrient percentage values in the same section of the graph using lines rather than showing them as separate bar graphs and simplifying the tick mark display.
  • Changing the variable type for macronutrient percentages so that they were displayed as percentages and not ratios.
  • Moving X axis labels to a horizontal orientation.

When we changed the macronutrient percentages to display as lines, I noticed a big problem. Connecting through the missing values for alcohol percentage gave the mistaken impression that I was drinking through my pregnancy! To fix this, Xan showed me that I could right click in the macronutrient line graph to display bars along with the lines. We then used the Variables section in the left side property pane of the Graph Builder window to adjust which graph elements were shown for each variable. I turned off the bars for protein, carbs and fat, and turned off the line for alcohol, and then adjusted the color of the alcohol bar to purple. We labeled each element with annotations from the Tools menu, right clicking to remove the annotation box outline, change its background color to white, and update the text color of the annotation to match each graph element. We also removed the bar display for total calories since it didn't add much to the overall story.

Xan also recommended choosing a continuous color theme for the heat map element to replace the divergent red to blue theme. We both thought that the count of days spent within different deficit or surplus ranges was shown much more clearly by a continuous red to yellow color theme. Red indicated more days spent in a specified deficit or surplus range, while the lighter yellow meant fewer days spent in that range. Below is the final graph we created.

Main poster graph

I’ll confess to having used one JMP 12 axis feature to create this graph. Can you spot it?

(I added a nested week variable to the X axis so that my data would be summarized by week. The JMP 12 feature I used was the ability to selectively turn off the labels so that week numbers didn’t appear in my graph. Without a doubt, you’ll hear more about these and other JMP axis settings updates when JMP 12 comes out! Check out Xan's preview of what's coming for Graph Builder in JMP 12.)

I have collected my own calorie, weight and exercise data in notebooks during past weight loss efforts, and I've used this data-driven approach to lose 45 pounds prior to my second pregnancy. The graph above reveals what I already knew: I was in a calorie surplus during most of my pregnancy, and as a result I gained more than the recommended amount of weight. This happened even though I chose healthy foods and exercised. On the plus side, my son was born at a healthy 8 pounds, I gained less than I had during my first pregnancy, and I experienced fewer discomforts this time. But when I weighed myself three weeks after my son’s birth, I had to face the fact that about half of my pregnancy weight gain was baby and water weight and the other half was extra body fat. As you can see from the graph, it took six months of consistently eating less than I burned to lose the excess and arrive in my current maintenance weight range. The percentages of carbs, fat and protein I ate while in this post-pregnancy deficit didn't vary that greatly from the percentages noted during my pregnancy.

If you have read the first post in this series, you know that I've experienced drastic weight swings in my lifetime, and I'm determined to avoid large swings going forward. Accordingly, I have examined my data on my past and present eating and activity patterns to learn what works for me to reach (and maintain) a healthy weight. First and most importantly, I have determined that I am most successful at loss and maintenance when I actively track my data. This takes less and less time as technology improves. I used to track my weight, diet and workout data all on paper , but most of my data collection has been automated by an activity monitor, food tracking app and wireless scale. I continue to track my workouts the old-fashioned way in notebooks, but the effort is minimal. I have even begun to examine my historical workout data in JMP....Stay tuned for posts on that topic in the future!

I find that tracking my diet and fitness efforts provides daily accountability as well as data. When reviewing my historical data, I found that I would usually stop tracking during holidays or stressful times when travel and/or social commitments led me to over-indulge and skip workouts. I'd feel guilty, which would lead to negative self-talk, more excuses, and eventually to weight gain. I have worked actively for the past five years to overcome these tendencies, committing myself to enjoying social events and always logging what I eat without sinking into guilt. During busy times, I may cut down on workout length, but I always make an effort to do something rather than nothing.

After monitoring my weight nearly daily for two years with a wireless scale, I have identified which factors can cause day to day fluctuations (e.g., water changes due to hydration, workouts, sodium and carbs) and which cause true long-term weight trends (e.g., eating in a surplus or deficit). This understanding has helped me to worry less about small short-term fluctuations, pay attention to the bigger picture, and maintain my weight within a small range for the past 2 ½ years. I now understand the daily eating and activity patterns that can keep me within my maintenance zone. When I see myself drifting upward in weight or calories, I can recognize the pattern relatively quickly and adjust the numbers to get back to the range where I want to be.

To reproduce this graph with your own data in Graph Builder, open a data table containing a daily surplus/deficit measure (which I calculated from my data with the formula Calories Burned-Calories Consumed), macronutrient percentages, and body weight where each rows contains data from a single day. (Of course, you could also make smaller graphs containing only a few of these measures if you don't have them all.)

If your data table doesn't have Year and Month variables, you can create these from your Date variable by right-clicking on your date in the Graph Builder column chooser and adding them as new transform columns from the Date Time menu. This will extract the month from the Date column, and you can use a Value Ordering property on the Month variable to create a column of ordered short Month names. I made sure that Year and Month Name were both specified as Ordinal before adding them to the same axis.

To replicate this graph, open Graph Builder and drag:

  • Year to the X axis.
  • Month Name to the X Axis (just above Year, so the axis shows Month Name nested within Year).
  • Week to the X axis (just above Month name, so Week is nested within Month).
  • Weight to the Y axis.
  • Deficit/surplus to the Y axis below weight (so that they appear in separate sections). Drag the heat map element into the deficit/surplus section. Right-click on the color gradient element in the Graph Builder legend on the right to change the color theme to a continuous one; I chose Muted Yellow to Red.
  • Macronutrient percentage columns (e.g., fat, carbs, protein, alcohol) into the same section below the heat map element. Right-click (or drag in) to change the element type to bar and also add lines. In the right-click menu in that section of the graph, or in the left size variables tab, remove the bars for fat, carbs and protein. Remove the line for alcohol.

To complete the graph, adjust your Y-axis, graph title and axis titles if desired and add one or more annotations from the Tools menu. You can right-click on annotations to change their appearance to match your graph like I did. In upcoming posts, Xan and I will show how we created and optimized other favorite visualizations of my personal data that appeared on my poster.

Check out the first blog in this series to learn more about my interest in quantified self (QS) data analysis and my JMP Discovery Summit 2014 e-poster that explored 1,316 days of my activity and food log data in JMP. You can use my JMP add-in to import your own BodyMedia® files. It’s free to join the JMP User Community, where you can learn from JMP users all over the world! In the videos section here, you can watch a video of Xan showing how to reproduce part of this graph during his "Unlocking the Power of Graph Builder" talk at JMP Discovery Summit 2014.

Post a Comment

Coming in JMP 12: Graph Builder improvements

Ease-of-use and convenience functionality have been the focus of graphics work for JMP 12. The most prominent ease-of-use change is the drop zones in Graph Builder, which now light up whenever you're dragging something in.

Graph Builder Drop Zones

Now everyone can find the "secret" drop zone just inside the axis. It even has a hover tip when the mouse is over it.

A few of the functionality improvements are shown below.

  • Reference lines can now be reference ranges to highlight regions of a scale.
  • Line connections can be stepped or smooth.
  • Histograms can be overlaid with automatic transparency.

A few other important graphical enhancements are:

  • A new Axis Settings dialog with more options and a preview.
  • New scales for color gradients including quantiles.
  • A new squarify layout for treemaps.
  • Selection linking with legend items.

The new legend interactivity brings a couple productivity enhancements that I'll demonstrate with a sequence of Graph Builder snapshots of US state crime rates overlaid by region.

legend11

The initial graph is a bit busy, but in JMP 12, you can click on legend items to highlight each region. Alternately, if you click on a point or a line, you will highlight the corresponding item in the legend. In this case, you can see that the Pacific region has a markedly different regression line from the others.

legend12

If you want to focus on that difference for a report, you can turn all the other regions gray and partially transparent. With the JMP 12 legend selection, you can select the other regions and then change their settings with a single right-click.

 

legend13

Finally, you can make the Pacific line thicker to make it stand out even more. You might go further by removing or collapsing the other regions in the legend since they all look the same, but they can still be useful for interactive selection and highlighting.

legend14

Graph Builder experts will know that it's possible get the same result in JMP 11 with a bit more effort. By reducing the effort for such tasks in JMP 12, we hope to encourage greater exploration and discovery.

Editor's note: This post is part of a series of previews of JMP 12 written by the people who develop the software.

Post a Comment