简体   繁体   English

R OECD package 未下载数据集

[英]R OECD package not downloading dataset

I am facing a similar problem to what janelyuip was in this post: How to download data from OECD by using R package but the answers in that post are not working for me sadly!我在这篇文章中遇到了与 janelyuip 类似的问题: How to download data from OECD by using R package但遗憾的是,该帖子中的答案对我不起作用!

I am using the OECD package, loaded from github rather than CRAN我正在使用经合组织 package,从 github 而不是 CRAN 加载

I am able to run the example included in the CRAN documentation without any problem我可以毫无问题地运行 CRAN 文档中包含的示例

df <- get_dataset("EPL_OV")

But when I do the same with any of the datasets that I actually want to download:但是,当我对我真正想要下载的任何数据集执行相同操作时:

library (OECD)
library(tidyverse)

ANBERD_REV4 <- get_dataset("ANBERD_REV4")

BIBLIO <- get_dataset("BIBLIO")

I get the following error messages:我收到以下错误消息:

Error in download.file(path, destfile, method, quiet, mode, ...): download from 'https://stats.oecd.org/restsdmx/sdmx.ashx/GetData/ANBERD_REV4/all/all' failed In addition: Warning message: In download.file(path, destfile, method, quiet, mode, ...): URL 'https://stats.oecd.org/restsdmx/sdmx.ashx/GetData/ANBERD_REV4/all/all': Timeout of 60 seconds was reached download.file 中的错误(路径、目标文件、方法、安静、模式...):从“https://stats.oecd.org/restsdmx/sdmx.ashx/GetData/ANBERD_REV4/all/all”下载失败另外:警告消息:在download.file(路径,目标文件,方法,安静,模式,...):URL'https://stats.oecd.org/restsdmx/sdmx.ashx/GetData/ANBERD_REV4/all/all ':已达到 60 秒超时

Error in download.file(path, destfile, method, quiet, mode, ...): download from 'https://stats.oecd.org/restsdmx/sdmx.ashx/GetData/BIBLIO/all/all' failed In addition: Warning message: In download.file(path, destfile, method, quiet, mode, ...): URL 'https://stats.oecd.org/restsdmx/sdmx.ashx/GetData/BIBLIO/all/all': Timeout of 60 seconds was reached download.file 中的错误(路径、目标文件、方法、安静、模式...):从“https://stats.oecd.org/restsdmx/sdmx.ashx/GetData/BIBLIO/all/all”下载失败另外:警告消息:在download.file(路径,目标文件,方法,安静,模式,...):URL'https://stats.oecd.org/restsdmx/sdmx.ashx/GetData/BIBLIO/all/all ':已达到 60 秒超时

Would love some advice please!请给一些建议!

In my case have solved the issue by limiting the data volume by filtering:在我的情况下,通过过滤限制数据量解决了这个问题:

 ANBERD_REV4 <- get_dataset("ANBERD_REV4",
                             filter = "DEU+CHE.MA.NATCUR.DTOTAL",
                             start_time = 2012,
                             end_time = 2020,
                             pre_formatted = T)

For details on OECD data, search for your dataset at https://stats.oecd.org/ , click on Export then SDMX (XML).有关 OECD 数据的详细信息,请在https://stats.oecd.org/中搜索您的数据集,单击导出,然后单击 SDMX (XML)。 There you will find all possible shortcuts for the filter of your dataset.在那里,您将找到数据集filter的所有可能快捷方式。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM