economagic Import - error message

View: New views
4 Messages — Rating Filter:   Alert me  

economagic Import - error message

by stephen` :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi
 
I am getting an error message when I try to run a download using
economagicImport:
 
> # save a download to a data file
> file = 'fedfunds.csv'
> source = 'http://www.economagic.com/em-cgi/data.exe/'
> query = 'fedst1/fedfunds+2'
> # download
> economagicImport(file, source, query)
Error in download.file(url = url, destfile = file, method = method) :
        unsupported URL scheme
[1] "No Internet Access"
 
I don't get that when I use yahoo:
 
>    query = "s=^AXJO&a=1&b=1&c=1997&d=12&q=31&f=2007&z=^AXJO&x=.csv"
>    data = yahooImport(query)  
trying URL
'http://chart.yahoo.com/table.csv?s=^AXJO&a=1&b=1&c=1997&d=12&q=31&f=200
7&z=^AXJO&x=.csv'
Content type 'text/csv' length unknown
opened URL
downloaded 88Kb
 
Can anyone suggest what I am doing wrong - please ;-(
 
Stephen Choularton
0413 545 182
02 9999 2226
 
 
 

        [[alternative HTML version deleted]]

_______________________________________________
R-SIG-Finance@... mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.

Re: economagic Import - error message

by Yohan Chalabi :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

>>>> "S" == "stephen" <mail@...>
>>>> on Thu, 17 Apr 2008 11:41:40 +1000

   S> > # save a download to a data file
   S> > file = 'fedfunds.csv'
   S> > source = 'http://www.economagic.com/em-cgi/data.exe/'
   S> > query = 'fedst1/fedfunds+2'
   S> > # download
   S> > economagicImport(file, source, query)
   S> Error in download.file(url = url, destfile = file, method =
   S> method) :
   S> unsupported URL scheme
   S> [1] "No Internet Access"

there is a typo in your query. It should be
query = 'fedstl/fedfunds+2'

and your arguemnts in economagicImport are not in the correct order...
?economagicImport

regards,
Yohan

--


The 2nd International R/Rmetrics User and Developer Workshop ...
[http://www.rmetrics.org]

_______________________________________________
R-SIG-Finance@... mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.

Re: economagic Import - error message

by Diethelm Wuertz :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yohan Chalabi wrote:


Some additional information

Note, that economagicImport() requires also the input of the frequency
of the data. The default is "quarterly", alternatively you can use "monthly"
and "daily" frequency formats.

FED FUNDS data are available as monthly and weekly (in daily format)
data sets from economagic.com. Therefore you should specify
explicitely the frequency data in the argument list. Here the examples:

# I used R 2.6.2 with latest package updates
require(fImport)

# For weekly data (with daily date formats) use:
x = economagicImport(query = "fedstl/day-ff", frequency = "daily")
head(x@data) # gives you the series as a data.frame
head(as.timeSeries(x@data)) # converts it in a timeSeries object

# For monthly data use:
y = economagicImport(query = "fedstl/fedfunds+2", frequency = "monthly")
head(y@data) # gives you the series as a data.frame
head(as.timeSeries(y@data)) # converts it in a timeSeries object


Some more note: FED FUND data are also available from the St.
Louis FED data base, from where economagic.com has copied his
data. Since the FED uses ISO 8601 date records, and data are
earlier available I would recommend to download the data with
the function fredImport().


Diethelm Wuertz





>>>>> "S" == "stephen" <mail@...>
>>>>> on Thu, 17 Apr 2008 11:41:40 +1000
>>>>>          
>
>    S> > # save a download to a data file
>    S> > file = 'fedfunds.csv'
>    S> > source = 'http://www.economagic.com/em-cgi/data.exe/'
>    S> > query = 'fedst1/fedfunds+2'
>    S> > # download
>    S> > economagicImport(file, source, query)
>    S> Error in download.file(url = url, destfile = file, method =
>    S> method) :
>    S> unsupported URL scheme
>    S> [1] "No Internet Access"
>
> there is a typo in your query. It should be
> query = 'fedstl/fedfunds+2'
>
> and your arguemnts in economagicImport are not in the correct order...
> ?economagicImport
>
> regards,
> Yohan
>
>  


--

PD Dr. Diethelm Wuertz
Institute for Theoretical Physics
Swiss Federal Institute of Technology

www.itp.phys.ethz.ch
www.rmetrics.org

NOTE:
Rmetrics Workshop: http://www.rmetrics.org/meielisalp.htm
June 29th - July 3rd Meielisalp, Lake Thune, Switzerland

_______________________________________________
R-SIG-Finance@... mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.

Re: economagic Import - error message

by Jeff Ryan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

As Diethelm pointed out - the St. Louis Fed has most of the economagic series.

In addition to the Rmetrics interface there is one in quantmod.  A
list of all FRED series (19000+) is accessible from here:

http://research.stlouisfed.org/fred2/

library(quantmod)
> getSymbols("FEDFUNDS",src='FRED') # monthly
[1] "FEDFUNDS"
> head(FEDFUNDS)
           FEDFUNDS
1954-07-01     0.80
1954-08-01     1.22
1954-09-01     1.06
1954-10-01     0.85
1954-11-01     0.83
1954-12-01     1.28
> getSymbols("FF",src='FRED') #  weekly
[1] "FF"
> head(FF)
             FF
1954-07-07 1.00
1954-07-14 1.21
1954-07-21 0.57
1954-07-28 0.63
1954-08-04 0.27
1954-08-11 1.30


On Thu, Apr 17, 2008 at 3:03 AM, Diethelm Wuertz
<wuertz@...> wrote:

> Yohan Chalabi wrote:
>
>
>  Some additional information
>
>  Note, that economagicImport() requires also the input of the frequency
>  of the data. The default is "quarterly", alternatively you can use "monthly"
>  and "daily" frequency formats.
>
>  FED FUNDS data are available as monthly and weekly (in daily format)
>  data sets from economagic.com. Therefore you should specify
>  explicitely the frequency data in the argument list. Here the examples:
>
>  # I used R 2.6.2 with latest package updates
>  require(fImport)
>
>  # For weekly data (with daily date formats) use:
>  x = economagicImport(query = "fedstl/day-ff", frequency = "daily")
>  head(x@data) # gives you the series as a data.frame
>  head(as.timeSeries(x@data)) # converts it in a timeSeries object
>
>  # For monthly data use:
>  y = economagicImport(query = "fedstl/fedfunds+2", frequency = "monthly")
>  head(y@data) # gives you the series as a data.frame
>  head(as.timeSeries(y@data)) # converts it in a timeSeries object
>
>
>  Some more note: FED FUND data are also available from the St.
>  Louis FED data base, from where economagic.com has copied his
>  data. Since the FED uses ISO 8601 date records, and data are
>  earlier available I would recommend to download the data with
>  the function fredImport().
>
>
>  Diethelm Wuertz
>
>
>
>
>
>
>  >>>>> "S" == "stephen" <mail@...>
>  >>>>> on Thu, 17 Apr 2008 11:41:40 +1000
>  >>>>>
>  >
>  >    S> > # save a download to a data file
>  >    S> > file = 'fedfunds.csv'
>  >    S> > source = 'http://www.economagic.com/em-cgi/data.exe/'
>  >    S> > query = 'fedst1/fedfunds+2'
>  >    S> > # download
>  >    S> > economagicImport(file, source, query)
>  >    S> Error in download.file(url = url, destfile = file, method =
>  >    S> method) :
>  >    S> unsupported URL scheme
>  >    S> [1] "No Internet Access"
>  >
>  > there is a typo in your query. It should be
>  > query = 'fedstl/fedfunds+2'
>  >
>  > and your arguemnts in economagicImport are not in the correct order...
>  > ?economagicImport
>  >
>  > regards,
>  > Yohan
>  >
>  >
>
>
>  --
>
>  PD Dr. Diethelm Wuertz
>  Institute for Theoretical Physics
>  Swiss Federal Institute of Technology
>
>  www.itp.phys.ethz.ch
>  www.rmetrics.org
>
>  NOTE:
>  Rmetrics Workshop: http://www.rmetrics.org/meielisalp.htm
>  June 29th - July 3rd Meielisalp, Lake Thune, Switzerland
>
>
>
>  _______________________________________________
>  R-SIG-Finance@... mailing list
>  https://stat.ethz.ch/mailman/listinfo/r-sig-finance
>  -- Subscriber-posting only.
>  -- If you want to post, subscribe first.
>



--
There's a way to do it better - find it.
Thomas A. Edison

_______________________________________________
R-SIG-Finance@... mailing list
https://stat.ethz.ch/mailman/listinfo/r-sig-finance
-- Subscriber-posting only.
-- If you want to post, subscribe first.