通过点击global wind atlas中的地图,可以点击GWC file
选项来下载数据。
它将打开另一个网址,例如:
https://globalwindatlas.info/api/gwa/custom/Lib/?lat=52.802761&long=21.269531
然后用户可以保存数据。仅使用该链接,如何从R
进行下载?我已经尝试过类似的东西:
download.file("https://globalwindatlas.info/api/gwa/custom/Lib/?lat=52.802761&long=21.269531",destfile = "test.txt")
但是它返回错误:
trying URL 'https://globalwindatlas.info/api/gwa/custom/Lib/?lat=52.802761&long=21.269531'
Error in download.file("https://globalwindatlas.info/api/gwa/custom/Lib/?lat=52.802761&long=21.269531", :
cannot open URL 'https://globalwindatlas.info/api/gwa/custom/Lib/?lat=52.802761&long=21.269531'
In addition: Warning message:
In download.file("https://globalwindatlas.info/api/gwa/custom/Lib/?lat=52.802761&long=21.269531", :
cannot open URL 'https://globalwindatlas.info/api/gwa/custom/Lib/?lat=52.802761&long=21.269531': HTTP status was '403 Forbidden'