// JSL Companion: Applications of the JMP Scripting Language
// Title: 6_CreateSimpleWeb.jsl
// Version: Windows JMP® Pro 13.2.1
// Purpose: Demonstrates using JSL and provide some HTML commands to create a simple web report viewer.
//Run the entire script and outside of JMP go to c:\temp\PYPR\PYPR_Trends.htm
//If you like the format and are new to HTML, review the code...
//There are fancier web sites, but we kept it simple for the novice. And we are not experts!
/* The steps include creating the graphs of interest and saving as a picture
writing out HTML code (often found by point & click with web creatin tools like
Front Page) and attaching the links
This example uses a simple scheme to name the graphs and identify
them. Scripter should create unique names or a different weblink
for each report or you might save over a graph with a similar name.
The HTML might look scary and strange, but much of the code is formatting for colors, fonts, etc.
The critcal statement that you wil need to change is the link. This statement is the command
to show in the "main"" area the graph stored in the /gfx directory named vc_compare_raw.png
whenever the link on the left called "Compare Raw Site Data" is selected
"" || "Compare Raw Site Data" || "
"
Of course you will be tailoring this statement for your graphs and your link names.
This program opens a file from the JSL Companion directory. The file represents process control
measurements collected on one unit per lot. There are 3 processing tools (entities) and 1 unit (wafer)
per run (lot) and 7 measurememt positions (fixed locations) per unit. T(op), R(ight), B(ottom), L(eft),
C(enter)L(eft), C(enter) and C(enter)R(ight).
This script is hardcoded for this data set. It and does a little customization of variability chart
boxplot and connecting line, using Xpath to quickly find and set properties.
This script will check for an existing directory and subdirectory /gfx.
If they do not exist, then create them.
*/
//----Setup data, web and graphics paths ------------------------------------------------------------------
/*-----user needs to change paths to meet their needs-----*/
Names Default to Here(1);
webpath = "c:/temp/pypr/";
datpath = "$JSL_Companion/";
gfxpath = webpath ||"/gfx/";
if(!directory exists( webpath ),
create directory( webpath );
create directory( gfxpath),
//else directory exists, check for subdirectory
if( !directory exists(gfxpath),
create directory( gfxpath) )
); //end if
//----Open the data and screen for outliers------------------------------------------------------------------
dt=open(eval(datpath||"Thick_Param.jmp"));
/*---perform global screening---*/
summarize(np=by(:Parameter));
//--if more than 1 parameter stop... keeping it simple
if(nitems(np)!=1, caption("Uh oh"); wait(5); throw());
summarize(q1=quantile(:Value,.25), q2=quantile(:Value,.50), q3=quantile(:Value,.75));
//--note if np=1 q1, q2, q3 are scalars if np>1 q2,q2, q3, q4 are vectors, one item for each
//-- parameter.
//Compute Asymmetric modified Lenth screening using 5 pseudo-sigma
lscr= q2 - 5*(q2-q1)/.6745;
uscr= q2+ 5*(q3-q2)/.6745;
sval= dt<PYPR Trend Report",
"