为网络带来与客户习惯的相同的交互性联合管理计划,数据必须与代码一起导出,才能在交互式 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 示例页面。