python - Download/read GovData with R -
i stumbled on following site , wanted download data digital elevation model waterways.
https://www.govdata.de/web/guest/daten/-/details/1c669080-c804-11e4-8731-1681e6b88ec1bkg
now, have following problem, not understand how can download data.
anybody knows how download data, e.g. using programming language r or python.
you need on webpage data stored, not webpage links data. depending on format data in need change (sep='\t') fit needs,
ex. csv (sep=',')
you need fine tune formatting.
library(rcurl) urlcontent<- geturl('https://www.govdata.de/web/guest/daten/-/details/1c669080-c804-11e4- 8731-1681e6b88ec1bkg') data<- read.table(textconnection(urlcontent), header=t, sep = '\t')
note read.table function may work tsv type page, need fine tune reading of page based on formatting.
edit:
using link address url able grab url, problem though access error, not have access download data. may error in code, or actual credential problem on website side.
library(rcurl) urlcontent<- geturl('https://www.govdata.de/ckan/api/rest/dataset/1c669080-c804-11e4- 8731-1681e6b88ec1bkg') data<- read.table(textconnection(urlcontent), header=t, sep = '\t')
error:you don't have permission access server
Comments
Post a Comment