¿Cómo agrego una tabla tabulada al html interactivo que vuelve a calcular cuando se actualiza el filtro de datos local?
Aquí hay un ejemplo:
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
);Este código genera HTML interactivo. Cada página tiene un filtro de datos local (LDF), una tabla tabulada (llamada "Resumen") y dos gráficos.
Los gráficos actualizan su contenido cuando se cambia el LDF. El Resumen no lo hace. Esto es idéntico al comportamiento en JMP.
Si cambio el modo del LDF a
Mode( Include( 1 ) )
Luego, el Resumen se actualiza con cambios en el LDF en JMP, pero el LDF está completamente deshabilitado en el html interactivo.
Tabulate también tiene la opción de incluir su propio filtro de datos local. Este filtro también está deshabilitado en el html interactivo.
Estoy usando JMP 16.0.0.
Hola, esto es por diseño.
HTML interactivo le permite seleccionar puntos usando un LDF, pero es incapaz de volver a ejecutar análisis usando un LDF, ya que no existe una conexión a JMP.
Para actualizar de forma interactiva los análisis que se muestran en las páginas web, JMP en vivo es necesario.
Salud,
Brady