
    -e                        d Z ddlmZ ddlZ ej        e          ZddlZddlm	Z	 ddl
mZmZ dZ G d d	e	          ZddZ ed          Z ed          Z ed          Z ed          Z ed          ZdS )a"   Provide historical ticker data for selected stocks.

Sourced from public news sources.

This module contains five dicts: ``AAPL``, ``FB``, ``GOOG``, ``IBM``, and ``MSFT``.

Each dictionary has the structure:

.. code-block:: python

    AAPL['date']       # list of date string
    AAPL['open']       # list of float
    AAPL['high']       # list of float
    AAPL['low']        # list of float
    AAPL['close']      # list of float
    AAPL['volume']     # list of int
    AAPL['adj_close']  # list of float

.. bokeh-sampledata-xref:: stocks
    )annotationsN)	TypedDict   )external_pathopen_csv)AAPLFBGOOGIBMMSFTc                  V    e Zd ZU ded<   ded<   ded<   ded<   ded<   ded	<   ded
<   dS )	StockDataz	list[str]datezlist[float]openhighlowclosez	list[int]volume	adj_closeN)__name__
__module____qualname____annotations__     7lib/python3.11/site-packages/bokeh/sampledata/stocks.pyr   r   G   sc         OOOr   r   namestrreturnc           	     (   t          | dz             }t          g g g g g g g           }t          |          5 }t          |           t	          j        |d          }|D ]}|\  }}}}	}
}}|d                             |           |d                             t          |                     |d                             t          |                     |d                             t          |	                     |d	                             t          |
                     |d
                             t          |                     |d                             t          |                     	 ddd           n# 1 swxY w Y   |S )z

    z.csv)r   r   r   r   r   r   r   ,)	delimiterr   r   r   r   r   r   r   N)	r   r   r   nextcsvreaderappendfloatint)r   filenamedatafr%   rowr   
open_pricer   r   r   r   r   s                r   
_read_datar.   P   s    TF]++H  D 
(		 7qQA--- 	7 	7CDGAD*dC	L%%%Lj 1 1222Ld,,,KuSzz***M  u...N!!#f++...$$U9%5%56666	77 7 7 7 7 7 7 7 7 7 7 7 7 7 7 Ks   EFFFr   r	   r
   r   r   )r   r   r   r   )__doc__
__future__r   logging	getLoggerr   logr$   typingr   util.sampledatar   r   __all__r   r.   r   r	   r
   r   r   r   r   r   <module>r7      s   0 # " " " " " g!! 


       6 5 5 5 5 5 5 5(    	      @ z&z$z&z%z&r   