Hi dear, I was trying to download a Google TS data directly onto R from this link : google.com/finance?q=NSE:LIQUIDBEES&ei=xlGnVuiPJ9eDuQSZ05OICw Used following function, however R generates error.> library(quantmod) > getSymbols(Symbols = "LIQUIDBEES", src = "google")Error in download.file(paste(google.URL, "q=", Symbols.name, "&startdate=", : cannot open URL 'finance.google.com/finance/historical?q=LIQUIDBEES&startdate=Jan+01,+2007&enddate=Jan+26,+2016&output=csv' In addition: Warning message: In download.file(paste(google.URL, "q=", Symbols.name, "&startdate=", : cannot open: HTTP status was '404 Not Found' Could you please guide me how can I download that data directly to R? I have also tried with Yahoo finance data, but got the same error. Thanks for your help.
On Tue, Jan 26, 2016 at 6:16 AM, Christofer Bogaso <bogaso.christofer at gmail.com> wrote:> Hi dear, > > I was trying to download a Google TS data directly onto R from this link : > > google.com/finance?q=NSE:LIQUIDBEES&ei=xlGnVuiPJ9eDuQSZ05OICw > > Used following function, however R generates error. > >> library(quantmod) >> getSymbols(Symbols = "LIQUIDBEES", src = "google") > Error in download.file(paste(google.URL, "q=", Symbols.name, "&startdate=", : > cannot open URL > 'finance.google.com/finance/historical?q=LIQUIDBEES&startdate=Jan+01,+2007&enddate=Jan+26,+2016&output=csv' > In addition: Warning message: > In download.file(paste(google.URL, "q=", Symbols.name, "&startdate=", : > cannot open: HTTP status was '404 Not Found' > > Could you please guide me how can I download that data directly to R? > I have also tried with Yahoo finance data, but got the same error. >There's no data available for download. Compare with: google.com/finance/historical?q=NYSEARCA:SPY That page has a "Download to spreadsheet" link. The page for LIQUIDBEES does not. So you have to scrape the data from the HTML.> Thanks for your help. > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-- Joshua Ulrich | about.me/joshuaulrich FOSS Trading | fosstrading.com R/Finance 2016 | rinfinance.com
On 26/01/2016 7:16 AM, Christofer Bogaso wrote:> Hi dear, > > I was trying to download a Google TS data directly onto R from this link : > > google.com/finance?q=NSE:LIQUIDBEES&ei=xlGnVuiPJ9eDuQSZ05OICw > > Used following function, however R generates error. > >> library(quantmod) >> getSymbols(Symbols = "LIQUIDBEES", src = "google") > Error in download.file(paste(google.URL, "q=", Symbols.name, "&startdate=", : > cannot open URL > 'finance.google.com/finance/historical?q=LIQUIDBEES&startdate=Jan+01,+2007&enddate=Jan+26,+2016&output=csv' > In addition: Warning message: > In download.file(paste(google.URL, "q=", Symbols.name, "&startdate=", : > cannot open: HTTP status was '404 Not Found' > > Could you please guide me how can I download that data directly to R? > I have also tried with Yahoo finance data, but got the same error.That symbol should be "LIQUIDBEES.BO" on Yahoo. Google appears to have changed its interface, so src = "google" doesn't work. You will probably have to manually download the Google history, or debug and fix getSymbols.google in quantmod. Duncan Murdoch
On Tue, Jan 26, 2016 at 6:36 AM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote:> On 26/01/2016 7:16 AM, Christofer Bogaso wrote: >> >> Hi dear, >> >> I was trying to download a Google TS data directly onto R from this link : >> >> >> google.com/finance?q=NSE:LIQUIDBEES&ei=xlGnVuiPJ9eDuQSZ05OICw >> >> Used following function, however R generates error. >> >>> library(quantmod) >>> getSymbols(Symbols = "LIQUIDBEES", src = "google") >> >> Error in download.file(paste(google.URL, "q=", Symbols.name, >> "&startdate=", : >> cannot open URL >> >> 'finance.google.com/finance/historical?q=LIQUIDBEES&startdate=Jan+01,+2007&enddate=Jan+26,+2016&output=csv' >> In addition: Warning message: >> In download.file(paste(google.URL, "q=", Symbols.name, "&startdate=", : >> cannot open: HTTP status was '404 Not Found' >> >> Could you please guide me how can I download that data directly to R? >> I have also tried with Yahoo finance data, but got the same error. > > > That symbol should be "LIQUIDBEES.BO" on Yahoo. Google appears to have > changed its interface, so src = "google" doesn't work. You will probably > have to manually download the Google history, or debug and fix > getSymbols.google in quantmod. >Nice job finding the correct symbol for Yahoo Finance. That should give Christofer what he wants. I don't think Google changed its interface, because quantmod::getSymbols.google *does* work for instruments where Google provides a download link. For example: getSymbols("SPY", src="google") As I said in my prior response, Google does not make data for LIQUIDBEES available for download.> Duncan Murdoch > > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-- Joshua Ulrich | about.me/joshuaulrich FOSS Trading | fosstrading.com R/Finance 2016 | rinfinance.com