JMP Live Content
JMP Live Content using Run Script
Example 1
Summary: Process of running a Discriminant analysis on a data table, creating two live contents from the results and publishing one of them.
Code:
dt_iris = Open("data_table.jmp");
dis = dt_iris << Run Script( "Discriminant" );
content1 = New JMP Live Content( dis, Publish Data( 0 ) );
content2 = New JMP Live Content( Data( dt_iris ) );
Code Explanation:
- Open data table;
- Run Discriminant analysis.
- Create content from analysis.
- Publish data for content.
- Create content from dataset.
- End script.
Example 2
Summary: Creates and publishes interactive content for Discriminant analysis, Map visualization, and data exploration in JMP.
Code:
dt_iris = Open("data_table.jmp");
dis = dt_iris << Run Script( "Discriminant" );
content1 = New JMP Live Content( dis, Publish Data( 0 ) );
content2 = New JMP Live Content( Data( dt_iris ) );
dt_map = Open("data_table.jmp");
content3 = New JMP Live Content( Map( dt_map ) );
content4 = New JMP Live Content( Data( "$SAMPLE_DATA\Big Class.jmp" ) );
Try(
result = lc_1 << Publish( {content1, content2}, Space( spaceKey ) ),
If( Is List( exception_msg ),
exception_msg = Concat Items( exception_msg, "!n" )
);
);
Try(
result = lc_1 << Publish( {content1, content3}, Space( spaceKey ) ),
If( Is List( exception_msg ),
exception_msg = Concat Items( exception_msg, "!n" )
);
);
Try(
result = lc_1 << Publish( {content1, content2, content4}, Space( spaceKey ) ),
If( Is List( exception_msg ),
exception_msg = Concat Items( exception_msg, "!n" )
);
);
Code Explanation:
- Open data table;
- Run Discriminant analysis.
- Create content for Discriminant analysis.
- Create content for data_table dataset.
- Open data table;
- Create content for Map.
- Create content for data_table dataset.
- Try publishing content1 and content2.
- Handle exceptions if any.
- Try publishing content1 and content3.
- Handle exceptions if any.
- Try publishing content1, content2, and content4.
- Handle exceptions if any.
New JMP Live Content
Summary: Creates and publishes JMP Live content, including a map and data visualization for Big Class.jmp, with error handling for exceptions.
Code:
dt_map = Open("data_table.jmp");
content3 = New JMP Live Content( Map( dt_map ) );
content4 = New JMP Live Content( Data( "$SAMPLE_DATA\Big Class.jmp" ) );
Try(
result = lc_1 << Publish( {content1, content2}, Space( spaceKey ) ),
If( Is List( exception_msg ),
exception_msg = Concat Items( exception_msg, "!n" )
);
);
Try(
result = lc_1 << Publish( {content1, content3}, Space( spaceKey ) ),
If( Is List( exception_msg ),
exception_msg = Concat Items( exception_msg, "!n" )
);
);
Try(
result = lc_1 << Publish( {content1, content2, content4}, Space( spaceKey ) ),
If( Is List( exception_msg ),
exception_msg = Concat Items( exception_msg, "!n" )
);
);
Code Explanation:
- Open data table;
- Create new JMP Live Map content.
- Create new JMP Live Data content for Big Class.jmp.
- Attempt to publish content1 and content2.
- Check for exceptions during publishing.
- Attempt to publish content1 and content3.
- Check for exceptions during publishing.
- Attempt to publish content1, content2, and content4.
- Check for exceptions during publishing.
- Concatenate exception messages if they exist.