// 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", "", "", "", ""}; xhtm=Concat Items(tmp_htm,"\!N") ; //concatenate commands with newline Save Text File(eval(webpath || "PYPR_ Trends.htm"),xhtm); //----Start collecting weblinks on the left, one link for each view -------------------------------------------------- tmp_htm={"", "

" || np[1] || "
", "
"}; /*---put a link for the raw data varaibility graphs ---*/ Insert Into(tmp_htm, "" || "Compare Raw Site Data" || "
"); //----Create raw data variability chart to compare entity WI Unit raw data------------------------------------------- vc = dt << Variability Chart(Ignore Platform Preferences(1), Y( :Screened value ), X( :Entity, :Meas Position ), Connect Cell Means( 1 ), Std Dev Chart( 0 ), Points Jittered( 1 ), Show Box Plots( 1 ), Show Box Plot Whisker Bars( 0 ), By( :Parameter ) ); report(vc)[Framebox(1)] << {Frame Size( 559, 240 ) }; //make mean connectors wide and change color xx = vc << XPath("//CustomStreamSeg[@description='Connected Means']"); xx << {Line Color( "Medium Dark Gray" ), Line Width( 3 )} ; //make all boxplot lines thicker and black- assign all at once xx = vc << Xpath("//BoxPlotSeg"); xx << {Box Type( "Outlier" ), Line Width( 2 ), Line Color("Black") }; //Remember if you are looking for the structure run the command vc << get xml //If you are not yet up to speed on Xpath, run the script and the use Save Script for the variability chart /* report(vc)[Framebox(1)] << { DispatchSeg( Box Plot Seg( 1 ),{Box Type( "Outlier" ), Line Width( 2 )} ), DispatchSeg( Box Plot Seg( 2 ), {Box Type( "Outlier" ), Line Width( 2 )} ), DispatchSeg( Box Plot Seg( 3 ), {Box Type( "Outlier" ), Line Width( 2 )} .... //for all 21 boxplots */ report(vc)[OutlineBox(2)]<" || "Compare Trends" || "
"); crun = dtrun << Oneway( Ignore Platform Preferences(1), Y( :Run Avg ), X( :Entity ), Points( 1 ), Box Plots( 1 ), Mean Diamonds( 0 ), X Axis proportional( 0 ), Points Jittered( 1 ), SendToReport( Dispatch( {}, "1", ScaleBox, {Scale( Linear ), Format( Best ), Min( 3300 ), Max( 5000 ), Inc( 200 ), Minor Ticks( 1 )} ), Dispatch( {}, "Oneway Plot", FrameBox, Frame Size( 292, 205 ) ) ) ); report(crun)[OutlineBox(1)]<" ||ent[i]|| "
" ); obox<"); xhtm = ConcatItems(tmp_htm,"\!N"); Save Text File(eval(webpath || "pics.htm"),xhtm); //----Close out JMP stuff ----------------------------------------------------------------------------------------- cc<