我正在尝试为 Python 复制这个,但找不到任何答案:
是否可以在 Power BI 的 R Script Visual 中使用 R Plotly 库?
或者 :
https://radacad.com/interactive-map-using-r-and-power-bi-create-custom-visual-part-1
更具体一点:如何更改提供的解决方案以使用 script.py 而不是 script.R
任何帮助都受到高度赞赏。
我发现在这个文件夹中有一个名为 capabilities.json 的文件,所以我认为这是解决方案的一部分:
"script": {
"scriptProviderDefault": "R", ###I guess this needs to be changed to Py
"scriptOutputType": "html",
"source": {
"objectName": "rcv_script",# not sure about this
"propertyName": "source"
},
"provider": {
"objectName": "rcv_script",# not sure about this
"propertyName": "provider"
}
}
Run Code Online (Sandbox Code Playgroud)
而且在这个项目中删除了引用dependecies.json之后,在构建并将其导入Power BI之后,我得到了这个错误
Error Message:
An exception of type System.ArgumentException occured.
Stack Trace:
System.ArgumentException: The supplied rendering engine …Run Code Online (Sandbox Code Playgroud) 我正在尝试自定义boxplot,除了一点之外,我非常成功.我无法理解的一点是我如何使用stat_summary来显示异常值.我在一个大图中有不同的箱形图,并且输出端不显示异常值.但是,如果我修改了我的数据并且仅使用一种类型的数据输入R(仅用于单盒图),我的代码工作正常,我可以在输出中看到我们的清晰度.我感谢任何帮助.
非常感谢,
f <- function(x) {r <- c( quantile(x,probs=c(0.25))-(1.5*(quantile(x,probs=c(0.75))-quantile(x,probs=c(0.25)))) ,quantile(x, probs = c(0.25)), quantile(x, probs = c(0.5)), quantile(x, probs = c(0.75)), quantile(x,probs=c(0.75))+(1.5*(quantile(x,probs=c(0.75))-quantile(x,probs=c(0.25)))) );names(r) <- c('ymin', 'lower', 'middle', 'upper', 'ymax'); r}
o <-function(x) { print(x); if (length(x) > 7) { pp = subset(x, x < (quantile(x, probs = c(0.25)) - (1.5 * (quantile(x, probs = c(0.75)) - quantile(x, probs = c(0.25))))) | x > (quantile(x, probs = c(0.75)) + (1.5 * (quantile(x, probs = c(0.75)) - quantile(x, probs = c(0.25)))))); return …Run Code Online (Sandbox Code Playgroud)