I wanted to export a plot to an interactive HTML file.
The file was quite large, therefore I tried to reduce the size by generating the plot from a data view of the non-excluded rows.
Surprisingly, the file size was even bigger (this seems to depend on the plot type; for other plot types, the plot from the data view has a reduced file size compared to a plot from the original data table - but it's still quite big).
The solution was:
Remove the link between data view and the original table (alternative: generate the subset without link
.
Would it make sense that the html export is automatically generated for a temporary data set with cut link -
or alternatively: a warning could show up in the log telling the user that he could reduce the file size by cutting the link.
concerning "cutting the link" - I posted a wish to provide a single click solution to do so.
View more...dt0 = Open( "$SAMPLE_DATA/Airline Delays.jmp" );
step1= dt0 << Concatenate(dt0, dt0, dt0, dt0, dt0, dt0, dt0, dt0);
dt = step1 << Concatenate(step1,step1,step1,step1);
SubsetLinked = dt << Select Where( :Airline == "Delta" ) << Data View;
SubsetWithoutLink = SubsetLinked<< Subset( All rows, Selected columns only( 0 ) );
gb1 = dt << Graph Builder(
Summary Statistic( "Median" ),
Graph Spacing( 4 ),
Variables( X( :Airline ), Y( :Arrival Delay ) ),
Elements( Box Plot( X, Y, Legend( 4 ) ) )
);
gb2 = SubsetLinked << Graph Builder(
Summary Statistic( "Median" ),
Graph Spacing( 4 ),
Variables( X( :Airline ), Y( :Arrival Delay ) ),
Elements( Box Plot( X, Y, Legend( 4 ) ) )
);
gb3 = SubsetWithoutLink << Graph Builder(
Summary Statistic( "Median" ),
Graph Spacing( 4 ),
Variables( X( :Airline ), Y( :Arrival Delay ) ),
Elements( Box Plot( X, Y, Legend( 4 ) ) )
);
gb1 << Save Interactive HTML( "$TEMP/fullTable.html" );
gb2 << Save Interactive HTML( "$TEMP/linkedSubset.html" );
gb3 << Save Interactive HTML( "$TEMP/SubsetWithoutLink.html" );