Esempio n. 1
0
def plotfred(data, title="tmp", maxi=87654321):
    """Plot data should be it given as dataframe or fredcode."""
    #  maxi is an arbitrary maximum number of points to be plotted.
    if isinstance(data, pd.DataFrame):
        plotdf(tools.tail(data, maxi), title)
    else:
        fredcode = data
        df = getfred(fredcode)
        plotdf(tools.tail(df, maxi), title)
    return
Esempio n. 2
0
def plotfred(data, title='tmp', maxi=87654321):
    '''Plot data should be it given as dataframe or fredcode.'''
    #  maxi is an arbitrary maximum number of points to be plotted.
    if isinstance(data, pd.DataFrame):
        plotdf(tools.tail(data, maxi), title)
    else:
        fredcode = data
        df = getfred(fredcode)
        plotdf(tools.tail(df, maxi), title)
    return
Esempio n. 3
0
def plotqdl(data, title='tmp', maxi=87654321):
    '''Plot data should be it given as dataframe or quandlcode.'''
    #  maxi is an arbitrary maximum number of points to be plotted.
    #  Single column dot notation: e.g. 'NSE/OIL.4'
    #                              grabs the 4th column of NSE/OIL.
    if isinstance(data, pd.DataFrame):
        fred.plotdf(tools.tail(data, maxi), title)
    else:
        quandlcode = data
        df = getqdl(quandlcode)
        fred.plotdf(tools.tail(df, maxi), title)
    return
Esempio n. 4
0
def plotqdl( data, title='tmp', maxi=87654321 ):
     '''Plot data should be it given as dataframe or quandlcode.'''
     #  maxi is an arbitrary maximum number of points to be plotted.
     #  Single column dot notation: e.g. 'NSE/OIL.4'
     #                              grabs the 4th column of NSE/OIL.
     if isinstance( data, pd.DataFrame ):
          fred.plotdf( tools.tail( data, maxi ), title )
     else:
          quandlcode = data
          df = getqdl( quandlcode )
          fred.plotdf( tools.tail( df,   maxi ), title )
     return