cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Enthusiastic
Level II

Filtering tabulate data with a local data filter in interactive html

How do I add a Tabulate table to interactive html which re-calculates when the local data filter is updated?

Here is an example:

savePath = Pick Directory( "Where should the report be saved?" );

dt = Open( "$SAMPLE_dATA/Big Class.jmp" );

genders = {};
Insert Into( genders, "F" );
Insert Into( genders, "M" );

webreport = New Web Report();
dtTitle = dt << get window title;
webreport << Index( title( dtTitle ), style( "Smalllist" ) );
windows = {};

For( i = 1, i <= N Items( genders ), i++,
	lub1 = Lineup Box( N Col( 2 ) );
	lub1 << append(
		dt << data filter(
			local,
			add filter(
				columns( :column( dt, "age" ), :column( dt, "height" ), :column( dt, "weight" ) ),
				where( :name( "sex" ) == genders[i] )
			),
			Mode( Include( 0 ) )
		)
	);
	lub2 = Lineup Box( N Col( 2 ) );
	lub2 << append(
		Tabulate(
			Title( "Summary" ),
			Show Control Panel( 0 ),
			Add Table(
				Column Table(
					Statistics( Min, Max, Median, Mean, Std Dev ),
					Analysis Columns( :column( dt, "height" ) )
				),
				Row Table( Grouping Columns( :age ) )
			)
		)
	);
	lub3 = Lineup Box( N Col( 2 ) );
	lub3 << append(
		Graph Builder(
			Title( "age vs height" ),
			Size( 290, 270 ),
			Show control Panel( 0 ),
			Variables( X( :column( dt, "age" ) ), Y( :column( dt, "height" ) ) ),
			Elements( Points( X, Y ) ),
			show title( 0 ),
			show footer( 0 )
		)
	);
	lub3 << append(
		Graph Builder(
			Title( "age vs weight" ),
			Size( 290, 270 ),
			Show control Panel( 0 ),
			Variables( X( :column( dt, "age" ) ), Y( :column( dt, "weight" ) ) ),
			Elements( Points( X, Y ) ),
			show title( 0 ),
			show footer( 0 )
		)
	);
	lub3 << horizontalalignment( Left );
	lub2 << append( lub3 );
	lub2 << verticalalignment( top );
	lub1 << append( lub2 );
	lub1 << horizontalalignment( Left );
	dfcb = Data Filter Context Box( lub1 );
	win = New Window( genders[i], dfcb );
	//dfcb << report;
	webreport << add report( dfcb, Title( genders[i] ) );
	Insert Into( windows, win );
);

webreport << save( savePath || "Report for Big Class" );

For( j = 1, j <= N Items( windows ), j++,
	windows[j] << close window
);

This code generates interactive html. Each page has a local data filter (LDF), a Tabulate table (called "Summary"), and two graphs.

The graphs update their content when the LDF is changed. The Summary does not. This is identical to the behavior in JMP.

If I change the mode of the LDF to 

Mode( Include( 1 ) )

Then the Summary updates with changes to the LDF in JMP, but the LDF is completely disabled in the interactive html.

Tabulate also has the option of including its own local data filter. This filter is also disabled in the interactive html.

I am using JMP 16.0.0.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Filtering tabulate data with a local data filter in interactive html

Hi, This is by design.

 

Interactive HTML allows you to select points using an LDF, but is incapable of re-running analyses using an LDF, since a connection to JMP is not present.

 

To interactively update analyses displayed on webpages, JMP Live is needed.

 

Cheers,

Brady

View solution in original post

1 REPLY 1

Re: Filtering tabulate data with a local data filter in interactive html

Hi, This is by design.

 

Interactive HTML allows you to select points using an LDF, but is incapable of re-running analyses using an LDF, since a connection to JMP is not present.

 

To interactively update analyses displayed on webpages, JMP Live is needed.

 

Cheers,

Brady