如何从存储的数据/月/年的表单索引中下载几个数据集。 。
我需要在每月决议和几年下下载气候数据集。数据可在此处找到: https://opendata.dwd.de/climate_environment/cdc/grids_germany/monthly/monthly/air_temperature_mean/
我可以通过单击它们并保存它们来下载唯一的文件。但是,如何下载几个数据集(例如特定年份?),或者只需在目录中下载所有文件?我相信应该使用一些FTP连接或一些R编码(在R Studio中)有一种自动方法,但找不到任何相关建议。我是Windows 10用户。拜托,从哪里开始?
I need to download climatic datasets at monthly resolutions and several years. The data is available here: https://opendata.dwd.de/climate_environment/CDC/grids_germany/monthly/air_temperature_mean/
I can download unique files by clicking on them and saving them. But how I can download several datasets (how to filter for e.g. specific years?), or simply download all of the files within a directory? I am sure there should be an automatic way using some FTP connection, or some R coding (in R studio), but can't find any relevant suggestions. I am a Windows 10 user. Please, where to start?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试以下操作:
这使我们成为第一级,
如您所见, 相同的操作:
每个文件夹都包含141-142不同的文件
:
有些是文件,有些是目录。我们可以迭代这些URL进行 结合来自文件的
urls1
(两个.pdf
文件)的那些,现在您可以根据需要过滤并下载所需的内容:
Try this:
This gets us the first level,
As you can see, some are files, some are directories. We can iterate over these URLs to do the same thing:
Each of those folders contain 141-142 different files:
(This would not be difficult to transform into a recursive search vice a fixed-2-deep search.)
These files can all be combined with those from
urls1
that were files (the two.pdf
files)And now you can filter as desired and download those that are needed:
您可以使用
rvest
软件包来取消链接,并使用这些链接以以下方式下载特定月份的文件:You can use
rvest
package for scrapping the links and use those links to download the files for a specific month in the following way: