ó
áp7]c           @   sb   d  Z  d d l m Z d Z d Z e  Z d Z d Z e Z	 d Z
 d   Z d d	  Z d
   Z d S(   s   Yearly sunspots data 1700-2008i˙˙˙˙(   t   utilst   restructuredtexts   This data is public domain.sž   
http://www.ngdc.noaa.gov/stp/solar/solarda3.html

The original dataset contains monthly data on sunspot activity in the file
./src/sunspots_yearly.dat.  There is also sunspots_monthly.dat.
sN   Yearly (1700-2008) data on sunspots from the National
Geophysical Data Center.sú   ::

    Number of Observations - 309 (Annual 1700 - 2008)
    Number of Variables - 1
    Variable name definitions::

        SUNACTIVITY - Number of sunspots for each year

    The data file contains a 'YEAR' variable that is not returned by load.
c       	   C   sO   t    }  |  j |  j  j } t j d |  d t |  j  d | d d  } | S(   Nt   datat   namest   endogt
   endog_namet   volume(   t	   _get_datat	   set_indext   YEARt   SUNACTIVITYt   dut   Datasett   listt   columns(   R   R   t   dataset(    (    sA   lib/python2.7/site-packages/statsmodels/datasets/sunspots/data.pyt   load_pandas    s
    	c         C   s   t  j t   d |  S(   s!  
    Load the yearly sunspot data and returns a data class.

    Parameters
    ----------
    as_pandas : bool
        Flag indicating whether to return pandas DataFrames and Series
        or numpy recarrays and arrays.  If True, returns pandas.

    Returns
    -------
    Dataset instance:
        See DATASET_PROPOSAL.txt for more information.

    Notes
    -----
    This dataset only contains data for one variable, so the attributes
    data, raw_data, and endog are all the same variable.  There is no exog
    attribute defined.
    t	   as_pandas(   R   t   as_numpy_datasetR   (   R   (    (    sA   lib/python2.7/site-packages/statsmodels/datasets/sunspots/data.pyt   load)   s    c           C   s   t  j t d  j t  S(   Ns   sunspots.csv(   R   t   load_csvt   __file__t   astypet   float(    (    (    sA   lib/python2.7/site-packages/statsmodels/datasets/sunspots/data.pyR   A   s    N(   t   __doc__t   statsmodels.datasetsR    R   t   __docformat__t	   COPYRIGHTt   TITLEt   SOURCEt
   DESCRSHORTt	   DESCRLONGt   NOTER   t   NoneR   R   (    (    (    sA   lib/python2.7/site-packages/statsmodels/datasets/sunspots/data.pyt   <module>   s   		