B
    Z                 @   sl   d Z dZdZe ZdZdZdZdZddlm	Z	m
Z
mZ dd	lmZ dd
lmZmZ dd Zdd Zdd ZdS )zStack loss dataZrestructuredtextzThis is public domain. zw
Brownlee, K. A. (1965), "Statistical Theory and Methodology in
Science and Engineering", 2nd edition, New York:Wiley.
z(Stack loss plant data of Brownlee (1965)zThe stack loss plant data of Brownlee (1965) contains
21 days of measurements from a plant's oxidation of ammonia to nitric acid.
The nitric oxide pollutants are captured in an absorption tower.a  ::

    Number of Observations - 21

    Number of Variables - 4

    Variable name definitions::

        STACKLOSS - 10 times the percentage of ammonia going into the plant
                    that escapes from the absoroption column
        AIRFLOW   - Rate of operation of the plant
        WATERTEMP - Cooling water temperature in the absorption tower
        ACIDCONC  - Acid concentration of circulating acid minus 50 times 10.
    )
recfromtxtcolumn_stackarray)utils)dirnameabspathc              C   s   t  } tj| dtdS )z
    Load the stack loss data and returns a Dataset class instance.

    Returns
    --------
    Dataset instance:
        See DATASET_PROPOSAL.txt for more information.
    r   )	endog_idxdtype)	_get_dataduZprocess_recarrayfloat)data r   Blib/python3.7/site-packages/statsmodels/datasets/stackloss/data.pyload%   s    	r   c              C   s   t  } tj| dtdS )z
    Load the stack loss data and returns a Dataset class instance.

    Returns
    --------
    Dataset instance:
        See DATASET_PROPOSAL.txt for more information.
    r   )r   r	   )r
   r   Zprocess_recarray_pandasr   )r   r   r   r   load_pandas1   s    	r   c           	   C   s:   t tt} t| d d}t|ddtd}W d Q R X |S )Nz/stackloss.csvrb,T)Z	delimiternamesr	   )r   r   __file__openr   r   )filepathfr   r   r   r   r
   =   s
    r
   N)__doc__Z__docformat__Z	COPYRIGHTZTITLEZSOURCEZ
DESCRSHORTZ	DESCRLONGZNOTEZnumpyr   r   r   Zstatsmodels.datasetsr   r   os.pathr   r   r   r   r
   r   r   r   r   <module>   s   