Viewpoints

Viewpoints[labeleddata, fields]
Viewpoints creates hierarchical pivot analysis for fields from labeled data.
  • Data for examples. To view data SpreadsheetViewMXL[data] is recommended.
Click for copyable input
Out[46]//TableForm=
  • Viewpoints is designed to summarize data by using categorical fields and to represent the results in graphical form. Some examples are shown next.
  • The required arguments of Viewpoints are the data to be analyzed (data) and the pivot column ("Sales"). Thus, the simplest form of Viewpoints is just a bar indicating the total for the variable analyzed or Pivot Column.
Click for copyable input
Out[1096]=
  • The output of Viewpoints contains six elements: LeavesPlot which is the hierarchical analysis presented as bars, StemsPlot which presents the analysis one level below the LeavesPlot, Stems%Plot contains the information of StemsPlot in percentages. The other 3 tabs are the data generated as part of the analysis.the graphical output as the first element, and the data used to create the graphic as the second element.
  • The per-country sales can be calculated by grouping using the "By" option as shown below. Note that the six output elements are now freely displayed. The TreePlot shows the underlying tree for the LeavesPlot and the %TreePlot shows the same information in percentages.
Click for copyable input
Out[98]=
  • In this example the per-Country sales are shown along with its per product distribution by adding "Product" in the "By" option. "SumupFunction" is an optional parameter with default value of Total. Thus, the option "SumupFunction"→Total is not required but has been included just to show that any other function could have been used; like "SumupFunction"→Mean or "SumupFunction"→Length.
Click for copyable input
Out[103]=
  • This is the previous example modified by adding a second target analysis field and by specifying a new layout for the output.
Click for copyable input
Out[105]=