この記事は Linux とは関係ありません。 JMP を使用して通貨換算データをダウンロードすることについてです。
最近、Linux 電卓の通貨ボタンが気になりました。
Calculator showing the currency conversion buttonsCalculator showing the currency conversion buttonsCalculator showing the currency conversion buttonsCalculator showing the currency conversion buttons通貨換算ボタンが表示された電卓
彼らはどのようにして最新の変換係数を取得していますか? Google が私を連れて行ってくれましたここ、私を連れて行きましたここ、私を連れて行ったこの欧州中央銀行のページレートと、PDF、CSV、および XML ダウンロードへのリンクが含まれています。 XML リンクをクリックすると、ブラウザはおそらく次のように開きます。
screenshot of FireFox showing an XML file of exchange ratesscreenshot of FireFox showing an XML file of exchange ratesscreenshot of FireFox showing an XML file of exchange ratesscreenshot of FireFox showing an XML file of exchange rates為替レートの XML ファイルを表示する FireFox のスクリーンショット
ざっと見てみると、これらのレートはすべてユーロに基づいていることがわかります。これは、ユーロが表示されておらず、テーブルに 1.0000 係数がないためです。 それはまた、参照ページが言ったことです:
based on the eurobased on the eurobased on the eurobased on the euroユーロベース
XML をデータ テーブルに読み込みましょう。 JMP 15 の XML ウィザードは、これを行うための JSL を構築するのに役立ちます。 まず、XML をブラウザからマシンに保存し、[ファイル] -> [開く] を使用して、XML 拡張子を選択し、ファイルを選択して、ウィザードで開きます。
Choose the XML extension to see the downloaded fileChoose the XML extension to see the downloaded fileChoose the XML extension to see the downloaded fileChoose the XML extension to see the downloaded fileダウンロードしたファイルを表示するには、XML 拡張子を選択してください
XML ウィザードが開き、関心のある列と行を決定します。 統計列を開いて反復データがどのキーの下にあるかを確認し、名前列を閉じて表示を画面に合わせます。
opening the XML file with the wizardopening the XML file with the wizardopening the XML file with the wizardopening the XML file with the wizardウィザードで XML ファイルを開く
また、Tall Guess を使用して同じことを取得することもできます。 Tall Guess は、32 個の繰り返しエントリに気付き、そのキーを選択して行を作成し、すべて (両方) のサブキーを選択して列を作成します。 Sampler データを使用して、サブキーが数値データまたは文字データを作成する必要があるかどうかを判断します。
ここで、Stat Cols をオフにして列の名前を変更し、Name Cols をオンに戻します。 他にもいくつか手を加えて、通貨のモデリング タイプを公称にします。 時間、名前、件名は写真の後に記載されています...
Changing column names, adding some meta dataChanging column names, adding some meta dataChanging column names, adding some meta dataChanging column names, adding some meta data列名の変更、メタデータの追加
メタデータには他に 3 つの列があります: 時刻、名前、件名です。 時間が最も役立つようです。すべての行で時間を守りましょう。 名前と件名は、テーブル変数としてのみ保持する必要があります。 OK の後に表示されます。
The source script and the two table variables are part of the imported tableThe source script and the two table variables are part of the imported tableThe source script and the two table variables are part of the imported tableThe source script and the two table variables are part of the imported tableソース スクリプトと 2 つのテーブル変数は、インポートされたテーブルの一部です
テーブル変数をクリックして、テーブルがどこから来たかを確認します。
来週の現在のデータでこのインポートを再現するには、ソース スクリプトを取得して URL を編集します。
Open(
//"E:\eurofxref-daily.xml",
"https://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml",
XML Settings( Stack( 0 ),
Row( "/gesmes:Envelope/Cube/Cube/Cube" ),
Col("/gesmes:Envelope/gesmes:subject",
Column Name( "gesmes:subject" ), Fill( "Use Forever" ),
Type( "Table Variable" ), Format( {"Best"} ), Modeling Type( "Continuous" ) ),
Col("/gesmes:Envelope/gesmes:Sender/gesmes:name",
Column Name( "gesmes:name" ), Fill( "Use Forever" ),
Type( "Table Variable" ), Format( {"Best"} ), Modeling Type( "Continuous" ) ),
Col("/gesmes:Envelope/Cube/Cube/@time",
Column Name( "time" ), Fill( "Use Forever" ),
Type( "Numeric" ), Format( {"yyyy-mm-dd", 10} ), Modeling Type( "Continuous" ) ),
Col("/gesmes:Envelope/Cube/Cube/Cube/@currency",
Column Name( "currency" ), Fill( "Use Once" ),
Type( "Character" ), Format( {"Best"} ), Modeling Type( "Nominal" ) ),
Col("/gesmes:Envelope/Cube/Cube/Cube/@rate",
Column Name( "rate" ), Fill( "Use Once" ),
Type( "Numeric" ), Format( {"Best"} ), Modeling Type( "Continuous" ) )
),
XML Wizard( 0 )
);