Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Make Pareto principle adherence plots
ResourceFunction["ParetoPrinciplePlot"][vec] plots the normalized cumulative sum of the reverse-sorted list vec. |
"ParetoGridLines" | Automatic | show Pareto-specific grid lines. |
"Tooltip" | True | whether automatic Tooltip wrappers should be used |
Pareto principle plot for a numerical vector:
In[1]:= |
|
Out[2]= |
|
Pareto principle plot for a list of numerical vectors:
In[3]:= |
|
Out[4]= |
|
Plot a list of numerical vectors with tooltips:
In[5]:= |
|
Out[5]= |
|
Numerical vectors with nested Tooltip and Callout specifications can be given; "wrapped" and "plain" vectors can be mixed:
In[6]:= |
|
In[7]:= |
|
Out[8]= |
|
Plot an association with numerical values:
In[9]:= |
|
Out[10]= |
|
A data vector:
In[11]:= |
|
Pareto principle adherence plots with different Pareto grid lines specifications:
In[12]:= |
|
Out[12]= |
|
The option "ParetoGridLines" is overridden by the ListPlot option GridLines:
In[13]:= |
|
Out[13]= |
|
The option "Tooltip" takes Boolean values:
In[14]:= |
|
In[15]:= |
|
Out[15]= |
|
Get the text of Shakespeare’s play Hamlet:
In[16]:= |
|
Convert the text to lowercase and split it into words:
In[17]:= |
|
Out[18]= |
|
Plot the words' tally values:
In[19]:= |
|
Out[19]= |
|
In the preceding Pareto principle adherence plot, you can see a clear Pareto principle manifestation: ≈15% of the words correspond to ≈80% of the text.
Pareto principle manifestation for countries' GDP, showing that ≈10% of the countries correspond to ≈80% of the total GDP:
In[20]:= |
|
Out[20]= |
|
Plot together the curves of GDP changes for different countries in the same time period, demonstrating the rapid growth of China and Poland:
In[21]:= |
|
Out[22]= |
|
Gather data for lakes and make Pareto principle plots for the lakes' surface areas, volumes and fish catch:
In[23]:= |
|
In[24]:= |
|
You can see that the lakes' area data manifests an “exaggerated” Pareto principle adherence; ≈5% of the lakes correspond to ≈90% of the total lake area:
In[25]:= |
|
Out[25]= |
|
A numeric vector:
In[26]:= |
|
The Pareto principle plot data is computed using the following formula:
In[27]:= |
|
Show the corresponding plot:
In[28]:= |
|
Out[28]= |
|
Compare with the plot made by ParetoPrinciplePlot:
In[29]:= |
|
Out[29]= |
|
It is beneficial to use Pareto principle adherence plots together with data summaries and histograms:
In[30]:= |
|
Note that the summary and histograms provide complementary data distribution properties to those given by the Pareto principle adherence plot:
In[31]:= |
|
Out[31]= |
|
ParetoPrinciplePlot does not work on vectors with missing values:
In[32]:= |
|
Out[32]= |
|
Use DeleteMissing to obtain a plot:
In[33]:= |
|
Out[33]= |
|
ParetoPrinciplePlot does not work on QuantityArray objects and lists of Quantity objects:
In[34]:= |
|
Out[34]= |
|
In[35]:= |
|
Out[35]= |
|
Use DeleteMissing and QuantityMagnitude to obtain a plot:
In[36]:= |
|
Out[36]= |
|
Pareto principle adherence plots for word tallies for different translations of the United Nations’ "Universal Declaration of Human Rights" official document:
In[37]:= |
|
Out[43]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License