[R] New data source - now how do we build an R interface?
Gabor Grothendieck
ggrothendieck at gmail.com
Wed Mar 5 20:03:26 CET 2008
Try to download something in IE and look at the bottom of your browser
where the URL is displayed or look at the Javascript in:
http://data.un.org/_Scripts/SeriesActions.js
and its apparent that the format is as follows:
http://data.un.org/Handlers/DownloadHandler.ashx?DataFilter=srID:1000&dataMartId=CDB&&Format=csv&c=2,3,4
It also accepts Format=xml, scsv (semicolon separated) and psv (pipe separated)
formats and there is a sort field (s=...) allowed which I omitted
since it appears
to work without it. You will have to experiment to find the possible
values of the
other fields.
The result of entering the above URL in your browser is to download a zip
file containing the indicated data in csv format.
On Wed, Mar 5, 2008 at 1:16 PM, Ajay Shah <ajayshah at mayin.org> wrote:
> Folks,
>
> A nice new data resource has come up -- http://data.un.org/
> I thought it would be wonderful to setup an R function like
> tseries::get.hist.quote() which would be able to pull in some or all
> of this data.
>
> I walked around a bit of it and I'm not able to map the resources to
> predictable URLs which can then be wget. There's some javascript going
> on that I'm not understanding. Perhaps someone on the mailing list can
> think about this?
>
> --
> Ajay Shah http://www.mayin.org/ajayshah
> ajayshah at mayin.org http://ajayshahblog.blogspot.com
> <*(:-? - wizard who doesn't know the answer.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
More information about the R-help
mailing list