I personally “ A player who is more memorable than the record ” I like it because it has a heroic character that cannot be expressed in numbers, but this time the topic is ” Not memorable, but memorable ” I will talk about the importance. When I became a member of society, whenever my boss called me for new employee training, I was educated to take notes and record what I was told.
In data analysis work, the work of data processing is often time-consuming. JMP I am grateful that the processing functions are substantial, but after a while, when I opened the processed data, what kind of data processing was done? Memory It may not remain in. In such a case, even if you make a note of the flow of processing Record I regret that I should have kept it.
JMP 16 Then Action recorder You can keep a record of a series of operations on a data table, such as renaming columns, changing scales, and deleting columns and rows. *
Here is an example of analysis using this function.
Inoculation of the new corona vaccine started in Japan from mid-February this year. The Ministry of Health, Labor and Welfare website has data on inoculation performance. ( 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 inoculations and the number of facilities for each date.
*caution: There are some data table operations that cannot be recorded.
Read data and record data table operations
JMP Then [ Open from internet ] From the menu URL You can specify to read the data. The figure below is an example when reading using this function. (Note: In this example, we are actually running a script that changes the column name row and the data start row.)

The data has been read, but the target graph cannot be drawn as it is. To make the data for graphing, perform the following operations on the data table.
- Column "Number of facilities (*) Change the column name of "" to "Number of facilities" and change it to a continuous scale.
- Last total line (in this example twenty three Line) is deleted.
- Column " 1 "Time", " 2 "Round" creates a new column showing these cumulative vaccinations for the data of the number of vaccinations for the day.
- Separate the display format of column values on a continuous scale with commas.
JMP 16 Then, when you perform an operation on the above data table, the script for that operation is automatically output to the log. In the log shown below, the data is opened and the operation on the data table is recorded.

The "Change column information: Number of facilities" selected in the above figure is the column "Number of facilities". (*) It is a record when the column name of "" is changed to "Number of facilities" and the operation is changed to continuous scale. At the bottom of the window is a script for this operation.
Through a series of operations, we were able to create the following data table for graph creation.

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 inoculations and the number of facilities per day. Both the inoculation facility and the number of inoculations have increased significantly, but considering the population of Japan as a whole, it seems that it is still in the future.

When you close the Graph Builder report window, a script about Graph Builder will be added to the previous log.
Select all the logs created so far and select From the red triangle button in the upper left, select Run Script to rerun a series of analysis operations such as loading data, creating data, and creating a graph.

Also, You can export the automatically created script to the script window by selecting Save script> To Script Window from the red triangle button at the top left of the log, as follows:

This file JMP Script format (extension * .jsl If you save it with), even if the data is new, you can create the analysis result with the new data by executing this script. It's a surprise!
Make a few changes to the created script to make it more versatile
However, there are some cases where the created script cannot be used as it is for new data. Data will be added daily to this vaccination data. Some of the operations remove the last "total" line, but if you look at the script below, twenty three It is recorded as deleting the line.

Already 1 If the daily data increases, here twenty four It has to be on the line, and more generally, it has to be a script that deletes the last row in the data table. In that case, the analyst must modify the script to make it more versatile.
The script created by a series of operations is slightly modified to make it a versatile script, which is shown at the end of this blog.
By all means, there is a function of "action recorder" that can record from data reading to data creation and analysis. Memory Please do the operation of 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" )} )
)
);