為網路帶來與客戶習慣的相同的互動性聯合管理計劃,資料必須與程式碼一起匯出,才能在互動式 HTML 中建立豐富的圖形。 我們警告客戶,共享互動式 HTML 報告確實會將其資料發佈到網路上,但隨著越來越多的 JMP 功能添加到輸出中,您可能沒有意識到這些檔案的大小也在持續增長。 輸出中只有一部分是數據,還需要其他內容來呈現您在螢幕上看到的表格、文字和圖像。
在 JMP 13 中,新增了圖形產生器,現在新增了JMP 14 中的資料過濾器,越來越多的資料表部分嵌入到 HTML 輸出中。 為了管理檔案大小,我們在 JMP 14.1 中引入了一些新功能:壓縮和無資料保存的能力。
壓縮數據
首先,壓縮僅應用於報告的資料。 結果因資料的類型和內容而異;重複的字串資料壓縮效果最好,隨機數字資料壓縮效果最差。 基準資料集顯示,對於某些平台,輸出大小幾乎沒有減少或沒有減少,但 Graph Builder 等平台可以看到 HTML 檔案大小最多減少 68%。 我們對檔案大小已經很小的非常小的資料集(少於 50 行)進行了例外處理。 這會自動發生,無需您設定首選項。
不公佈數據
如果您想阻止資料匯出,但仍希望以 Web 友善格式擷取一些結果,則第二個功能可能很有用。 在JMP 14 ,您可以使用以下命令發布多個互動式 HTML 報告發布文件下的選單選項。 14.1 中的新增功能是透過取消選取不發布資料的選項發布數據選擇報告對話框上的複選框:
Figure 1: By unchecking the Publish Data checkbox, no data will be exported, just static images.Figure 1: By unchecking the Publish Data checkbox, no data will be exported, just static images.Figure 1: By unchecking the Publish Data checkbox, no data will be exported, just static images.Figure 1: By unchecking the Publish Data checkbox, no data will be exported, just static images.圖 1:取消勾選「發布數據」複選框,不會匯出任何數據,僅匯出靜態影像。
這將產生具有互動式 HTML 頁面樣式的報告 - 可折疊部分、帶有懸停標籤的表格等,但所有圖表都將是靜態圖像。 這對於您想要顯示一些圖表但不希望以文字格式輸出數千行的非常大的資料集非常有用。 請注意,如果靜態圖像太多,或者它們的尺寸太大,您最終可能會得到一個很大的檔案。 這最適合非常大的數據集上的幾個小圖。
還有一些提示
我們經常被問到的另一個問題是:“如何使互動式 HTML 輸出更小?”因此,我想分享一些產生互動式圖表並最小化其大小的技巧和策略。 只需避免導出任何不需要的數據即可。
- 標記列– 在 JMP 中標記列非常有用,因為它將使該列出現在交互式 HTML 提供的工具提示中,從而允許您探索有關觀察結果的其他信息,而無需訪問完整的數據表。 但是,這意味著正在匯出一個附加列,如果未將其指派給圖表中的可視角色,則不需要該附加列。如果您不介意在工具提示中看到它,請右鍵單擊 JMP 資料表中的列名稱並選擇「標記/取消標記」以節省空間來取消標記。
Figure 2 : Height and weight columns are needed in the data section since they are Y and X respectively, but name is labelled only to make it appear in the tooltip. Unlabel it if knowing the name associated with each point is not important to your audience.Figure 2 : Height and weight columns are needed in the data section since they are Y and X respectively, but name is labelled only to make it appear in the tooltip. Unlabel it if knowing the name associated with each point is not important to your audience.Figure 2 : Height and weight columns are needed in the data section since they are Y and X respectively, but name is labelled only to make it appear in the tooltip. Unlabel it if knowing the name associated with each point is not important to your audience.Figure 2 : Height and weight columns are needed in the data section since they are Y and X respectively, but name is labelled only to make it appear in the tooltip. Unlabel it if knowing the name associated with each point is not important to your audience.圖 2:資料部分中需要身高和體重列,因為它們分別是 Y 和 X,但名稱的標記只是為了使其出現在工具提示中。 如果知道與每個點相關的名稱對您的受眾並不重要,請取消標記。
- 圖片– 影像列在工具提示中看起來令人印象深刻,特別是當它們提供價值時,但如果它是不支援影像工具提示的圖表,請忽略這些列。 從 JMP 14.1 開始,只有標記、線條、熱圖、地圖和氣泡圖支援在其工具提示中顯示影像。 取消勾選時發布數據可以使您免於匯出數據,圖表將全部變成靜態圖像,並且互動式 HTML 輸出中的圖像過多也會使文件變大。 此外,如果不受支援的功能以圖像形式出現,請考慮它是否真正為查看者帶來價值,或者是否有辦法在匯出之前透過紅色小三角選單或在 JSL 腳本中關閉報表的該部分。
Figure 3: Markers are one of only a few visual elements that will display images in their tooltips. Do not include or label image columns if you don't want to display them or the graph type doesn't support them.Figure 3: Markers are one of only a few visual elements that will display images in their tooltips. Do not include or label image columns if you don't want to display them or the graph type doesn't support them.Figure 3: Markers are one of only a few visual elements that will display images in their tooltips. Do not include or label image columns if you don't want to display them or the graph type doesn't support them.Figure 3: Markers are one of only a few visual elements that will display images in their tooltips. Do not include or label image columns if you don't want to display them or the graph type doesn't support them.圖 3:標記是少數會在工具提示中顯示影像的視覺元素之一。 如果您不想顯示圖像列或圖形類型不支援它們,請不要包含或標記圖像列。
- 資料子集– 有多種方法可以在 JMP 中分解數據,以便一次僅查看其中的一部分。 但是,如果您希望能夠過濾數據,則必須匯出整個數據集。 例如,如果您有一個包含 10,000 行的資料集並使用顯示 100 行的 where 子句建立圖表,您仍然會匯出所有 10,000 行。 如果您確實只對這 100 行感興趣,而不打算讓報表檢視者篩選或查看資料集的其餘部分,那麼最好建立資料的子集在建立圖表之前停用「連結到原始資料表」。
我們已聽取您的疑慮,並已採取措施縮小互動式 HTML 輸出的大小。 互動性和新功能之間的權衡是值得的。 探索我們支援的眾多平台互動式 HTML 範例頁面。