Personally, “ Athletes who are more memorable than their records ” I like him because he has a heroic quality that cannot be expressed in numbers, but this time's topic is: ” remain in the record, not the memory ” Let me tell you the importance. When I entered the workforce, I was taught that whenever I was called by my boss for new employee training, I should always bring a note with me and record what was said.
In data analysis work, data processing is often time-consuming. JMP I'm thankful that it has a lot of processing functions, but when I open the processed data after a while, I can't see what kind of data processing was done. Memory There may not be any left. At times like these, you can take notes on the entire processing flow. record I regret that I should have done that.
JMP 16 So, action recorder This new feature allows you to keep a record of a series of operations on a data table, such as changing column names, changing scale, and deleting columns and rows. *
An analysis example using this function is shown below.
In mid-February this year, vaccinations for the new coronavirus began in Japan. The Ministry of Health, Labor and Welfare's website has data on vaccination results. ( https://www.mhlw.go.jp/stf/seisakunitsuite/bunya/vaccine_sesshujisseki.html )
JMP The purpose is to read the data on this page and create a bar graph and line graph showing the cumulative number of vaccinations and number of facilities for each date.
*Note: There are some data table operations that cannot be kept as records.
Loading data and recording data table operations
JMP So, [ open from internet ] From the menu, URL You can read data by specifying . The figure below is an example of loading using this function. (Note: This example actually runs the script with the column name row and data start row changed.)

The data has been loaded, but the desired graph cannot be drawn as it is. To create data for graphing, perform the following operations on the data table.
- Column “Number of facilities (*) ” column name to “Number of facilities” and change it to a continuous scale.
- The last total row (in this example twenty three line).
- Column “ 1 th time”, “ 2 ``Number of vaccinations'' is data on the number of vaccinations for that day, so a new column is created that shows the cumulative number of vaccinations.
- Displays values in continuous columns as comma-separated values.
JMP 16 Now, when you perform an operation on the data table above, the script for that operation is automatically output to the log. The log shown below records opening data and operations on data tables.

"Change column information: Number of facilities" selected in the above figure changes the column "Number of facilities" (*) This is the record when changing the column name of `` to ``Number of Facilities'' and changing to continuous scale. The script for this operation is displayed at the bottom of the window.
Through a series of operations, I was able to create a data table for graphing as shown below.

Record analysis results and run scripts
From the created data table, you can use the graph builder to create a graph of the cumulative number of vaccinations and number of facilities for each day. Both vaccination facilities and the number of vaccinations have increased significantly, but considering Japan's overall population, it feels like there is still a long way to go.

When you close the Graph Builder report window, a script related to the Graph Builder will be added to the log.
Select all the logs created so far, By selecting Run Script from the red triangle button in the upper left, you can rerun a series of analysis operations such as loading data, creating data, and creating graphs.

Also, By selecting [Save Script] > [To Script Window] from the red triangle button at the top left of the log, you can export the automatically created script to the Script Window as shown below.

this file JMP Script format (extension *.jsl ), even if the data becomes new, you can create analysis results using the new data by running this script. That's surprising!
Make some changes to the created script to make it more versatile.
However, there are cases where the created script cannot be used as is for new data. New vaccination data will be added daily. The sequence of operations involves removing the last "total" row, but referring to the script below, twenty three It is recorded as deleting the line.

already 1 If the daily data increases, click here. twenty four It must be the first row, or more generally, the script must delete the last row of the data table. In that case, the analyst must modify the script to make it more versatile.
At the end of this blog, we created a script that was created using a series of operations, modified it slightly, and made it more versatile.
We definitely recommend that there is an “action recorder” function that can record everything from data loading to data creation and analysis. Memory to operate JMP. record please try.
// ワクチン接種データからグラフを作成するスクリプト
//: HTMLデータの読み込み */
dt = Open(
"https://www.mhlw.go.jp/stf/seisakunitsuite/bunya/vaccine_sesshujisseki.html",
HTML Table( 1, Column Names( 1 ), Data Starts( 2 ) )
);
// 列情報の変更: 施設数
dt:"施設数(*)"n << Data Type( Numeric ) <<
Set Name( "施設数" ) << Set Modeling Type( "Continuous" ) << Set Field Width( 12 );
// 選択されている行を削除
// Data Table( "vaccine_sesshujisseki.html" ) << Clear Select << Select Rows( [23] )
// << Delete Rows;
dt << Delete Row(Nrow(dt));
// 計算式列の新規作成
dt <<
New Column( "累積[内1回目]",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( Col Cumulative Sum( :内1回目 ) )
) << New Column( "累積[内2回目]",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( Col Cumulative Sum( :内2回目 ) )
) << Move Selected Columns( {:"累積[内1回目]"n, :"累積[内2回目]"n}, after( :内2回目 ) );
// 列属性の一括設定
Local( {old dt = Current Data Table()},
Current Data Table( dt );
For Each( {col, index}, {:接種回数, :内1回目, :内2回目, :"累積[内1回目]"n, :"累積[内2回目]"n, :施設数},
col << Format( "Best", Use thousands separator( 1 ), 13 )
);
Current Data Table( old dt );
);
// レポートのスナップショット: vaccine_sesshujisseki.html - グラフビルダー
dt <<
Graph Builder(
Size( 846, 555 ),
Show Control Panel( 0 ),
Show Title( 0 ),
Variables(
X( :日付 ),
Y( :"累積[内1回目]"n ),
Y( :"累積[内2回目]"n, Position( 1 ) ),
Y( :施設数 )
),
Elements(
Position( 1, 1 ),
Bar( X, Y( 1 ), Y( 2 ), Legend( 4 ), Bar Style( "Stacked" ) )
),
Elements( Position( 1, 2 ), Line( X, Y, Legend( 6 ) ) ),
SendToReport(
Dispatch(
{},
"Graph Builder",
OutlineBox,
{Set Title( "日本の新型コロナワクチン接種実績" ), Image Export Display( 通常 )}
),
Dispatch(
{},
"累積[内1回目]",
ScaleBox,
{Format( "Best", Use thousands separator( 1 ), 12 )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
6,
Properties( 0, {Line Color( 70 )}, Item ID( "施設数", 1 ) )
)}
),
Dispatch( {}, "Y title", TextEditBox, {Set Text( "累積接種回数" )} ),
Dispatch( {}, "Y 1 title", TextEditBox, {Rotate Text( "Left" )} )
)
);