Spotfire数据可视化分析-CSDN文章分析

采用5W2H分析法,提出若干简单问题:

1. 文章是在什么时间发布的?(细化到年、月、日、时、星期)

2. 文章的阅读次数与发布时间有无关系?

3. 哪些文章阅读量最大?


源数据:


Spotfire可视化展示:

不可否认,Spotfire的确是很好用的报表工具,已经甩出Excel几条街了。

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
使用Spotfire API重新加载数据可以通过以下步骤完成: 1. 首先,需要连接到Spotfire服务器。这可以通过使用API提供的TSServerConnection类来实现。例如: ```python from Spotfire.Dxp.Data import DataManager, DataColumnSignature from Spotfire.Dxp.Data.Import import TextFileDataSource from Spotfire.Dxp.Application import Application from Spotfire.Dxp.Framework.ApplicationModel import ApplicationThread from Spotfire.Dxp.Framework.Library import LibraryManager from Spotfire.Dxp.Framework.ApplicationModel import ApplicationThread from Spotfire.Dxp.Framework.DocumentModel import DocumentManager from Spotfire.Dxp.Data.Import import DataSourcePromptMode from Spotfire.Dxp.Data import DataFlowBuilder from Spotfire.Dxp.Data.Import import TextFileDataSourceSettings from Spotfire.Dxp.Data.Import import DataSourceTypeIdentifiers from Spotfire.Dxp.Data import RowSelection server = Application.GetServerConnection() ``` 2. 然后,需要打开要重新加载数据的文档。这可以通过使用API提供的DocumentManager和LibraryManager类来实现。例如: ```python libraryManager = LibraryManager(server) documentManager = DocumentManager(server) document = documentManager.OpenDocument("path/to/document") ``` 3. 然后,需要获取要重新加载数据的数据表。这可以通过使用API提供的DataManager类来实现。例如: ```python dataManager = document.Data table = dataManager.Tables["table_name"] ``` 4. 然后,需要创建一个新的数据源,以便重新加载数据。这可以通过使用API提供的DataFlowBuilder和TextFileDataSourceSettings类来实现。例如: ```python dataSource = TextFileDataSourceSettings() dataSource.ColumnNamesLineIndex = 0 dataSource.DataStartingLineIndex = 1 dataSource.FieldSeparator = '\t' dataSource.HasHeaderRecord = True dataSource.IncludeFileShareCredentials = False dataSource.LocalFilePath = "path/to/file" dataFlowBuilder = DataFlowBuilder() dataFlowBuilder.AddImportDataSource("dataSourceName", DataSourceTypeIdentifiers.TextFile, dataSource) dataFlow = dataFlowBuilder.Build() newDataSource = dataFlow.DataSourceInfos["dataSourceName"].DataSource ``` 5. 最后,需要使用新的数据源重新加载数据。这可以通过使用API提供的DataManager和TextFileDataSource类来实现。例如: ```python textFileDataSource = TextFileDataSource(newDataSource, dataManager) textFileDataSource.ReplaceData(table, DataSourcePromptMode.Never) ``` 完成这些步骤后,数据表应该已经重新加载了新的数据。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值