Try
Summary: Runs the color-coding of age cells in a data table, utilizing the Color Cells() function.
Code:
dt = Open("data_table.jmp");
Try( :age << Color Cells() );
Code Explanation:
- Open data table.
- Attempt to color age cells.
Try using Create Directory
Summary: Process of importing and converting ESRI shapefiles (.shp) and database files (.dbf) to JMP format, allowing for further analysis and visualization.
Code:
Names Default To Here (1);
//workflow:
//1. open .shp file, , save as file-XY.jmp
//2. open .dbf file, 1st col = map role(shape name definition), save as file-Name.jmp
//copy esri files to desktop
try(Create Directory ("$DESKTOP/Louisiana Parishes"));
try(Copy File ("$SAMPLE_IMPORT_DATA/parishes.dbf", "$DESKTOP/Louisiana Parishes/Parishes.dbf"));
try(Copy File ("$SAMPLE_IMPORT_DATA/parishes.shp", "$DESKTOP/Louisiana Parishes/Parishes.shp"));
// create jmp files w/ properties
dt = open ("$DESKTOP/Louisiana Parishes/Parishes.dbf");
// Change column property: PARISH
dt:PARISH << Set Property(
"Map Role",
Map Role( Shape Name Definition )
);
dt << save as ("$DESKTOP/Louisiana Parishes/Parishes-Name.jmp");
close (dt, no save);
dt = open ("$DESKTOP/Louisiana Parishes/Parishes.shp");
dt << save as ("$DESKTOP/Louisiana Parishes/Parishes-XY.jmp");
close (dt, no save);
web("$DESKTOP/Louisiana Parishes");
Code Explanation:
- Create directory on desktop.
- Copy .dbf file to desktop.
- Copy .shp file to desktop.
- Open .dbf file.
- Set "PARISH" column as map role.
- Save .dbf file as JMP.
- Close .dbf file.
- Open .shp file.
- Save .shp file as JMP.
- Close .shp file.