小编lio*_*ios的帖子

Plotly - 用 R 发布我的情节

我有一个 Plotly 帐户和一个 R 脚本,创建了一个我想在我的 Plotly 页面上发布的情节。在查看了 Plotly Getting Started 页面和其他一些在线建议后,我最终得到了这段代码。

library(XLConnect)
library(dplyr)
library(ggplot2)
library(devtools)
library(plotly)

##Preparing the data file
myurl <-     "http://minagric.gr/images/stories/docs/agrotis/Elia/egekrimenes_typop_monades220715.xls"
temp <- file.path(getwd(), "temp.xls")
download.file(myurl,temp)
mydata <- readWorksheetFromFile(temp, sheet=1, header = TRUE, startRow = 2)
colnames(mydata)<-c("name", "approval_code", "region", "prefecture")

plot_region <- ggplot(mydata,aes(x=region)) + 
      geom_histogram(fill="lightblue") +
      theme(plot.title = element_text(size=15, face="bold", vjust=2),     axis.text.x=element_text(angle=50, size=5, vjust=0.35)) +
      labs(title = "Olive oil plants per Region") + 
      xlab("Region") + ylab("Number of plants")
py <- plotly(username = "myusername", key = "mykey")    
response<-py$ggplotly(plot_region)
Run Code Online (Sandbox Code Playgroud)

但是,当我执行代码时会出现此错误: …

r ggplot2 plotly

5
推荐指数
1
解决办法
1837
查看次数

OpenLayers 3 - 仅为特定的bbox提供OSM底图图块

我想创建一个基于OSM底图的网络地图,但我只需要我需要分析的特定国家/地区的图块.这样做的原因是我想避免在用户拖动地图时加载更多的图块,从而增加下载的数据和加载时间.

我不是在本地寻找tile开发,而是在设置OpenLayers 3参数来限制OSM baselayer渲染.

有办法吗?

openlayers openstreetmap openlayers-3

1
推荐指数
1
解决办法
100
查看次数

标签 统计

ggplot2 ×1

openlayers ×1

openlayers-3 ×1

openstreetmap ×1

plotly ×1

r ×1