§
    ‹hþhþ3  ã                   ó¦   — d Z ddlZddlmZ ddlmc mZ h d£Zh d£Z		 	 	 	 	 dd„Z
dd	„Zdd
„Zdd„Zdd„Zd„ Zdd„Zdd„Zdd„Zdd„Zdd„Zd„ ZdS )zE
Built-in datasets for demonstration, educational and test purposes.
é    N)Úimport_module>   ÚcudfÚmodinÚpandasÚpolarsÚpyarrow>   r   r   r   Fr   c                 ór  — t          j        t          d|¬¦  «        d¬¦  «        }|r+|                     t          j        d¦  «        |k    ¦  «        }| rŠ|                     t          j        t          j        d¦  «                             t          j        ¦   «         ¦  «        t          j	        d¦  «        g¦  «        j
                             d¬¦  «        ¦  «        }|s|                     d	d
¦  «        }|r,|                     t          dddddddddd¬¦
  «
        ¦  «        }|                     ¦   «         S )a  
    Each row represents a country on a given year.

    https://www.gapminder.org/data/

    Parameters
    ----------
    datetimes: bool
        Whether or not 'year' column will converted to datetime type

    centroids: bool
        If True, ['centroid_lat', 'centroid_lon'] columns are added

    year: int | None
        If provided, the dataset will be filtered for that year

    pretty_names: bool
        If True, prettifies the column names

    return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'}
        Type of the resulting dataframe

    Returns
    -------
    Dataframe of `return_type` type
        Dataframe with 1704 rows and the following columns:
        `['country', 'continent', 'year', 'lifeExp', 'pop', 'gdpPercap',
        'iso_alpha', 'iso_num']`.

        If `datetimes` is True, the 'year' column will be a datetime column
        If `centroids` is True, two new columns are added: ['centroid_lat', 'centroid_lon']
        If `year` is an integer, the dataset will be filtered for that year
    Ú	gapminder©Úreturn_typeT©Ú
eager_onlyÚyearz-01-01z%Y-%m-%d)ÚformatÚcentroid_latÚcentroid_lonÚCountryÚ	ContinentÚYearzLife ExpectancyzGDP per CapitaÚ
PopulationzISO Alpha Country CodezISO Numeric Country CodezCentroid LatitudezCentroid Longitude)
ÚcountryÚ	continentr   ÚlifeExpÚ	gdpPercapÚpopÚ	iso_alphaÚiso_numr   r   )ÚnwÚfrom_nativeÚ_get_datasetÚfilterÚcolÚwith_columnsÚ
concat_strÚcastÚStringÚlitÚstrÚto_datetimeÚdropÚrenameÚdictÚ	to_native)Ú	datetimesÚ	centroidsr   Úpretty_namesr   Údfs         úK/var/www/histauto/venv/lib/python3.11/site-packages/plotly/data/__init__.pyr
   r
      s8  € õP 
ŒÝ�[¨kÐ:Ñ:Ô:Àtð
ñ 
ô 
€Bð ð /Ø�YŠY•r”v˜f‘~”~¨Ò-Ñ.Ô.ˆØð 
Ø�_Š_õ ŒMÝ”˜‘”×$Ò$¥R¤Y¡[¤[Ñ1Ô1µ2´6¸(Ñ3CÔ3CÐDñô ä—+’+ Z�+Ñ0Ô0ñ
ô 
ˆð ð 5Ø�WŠW�^ ^Ñ4Ô4ˆØð 
Ø�YŠYÝØ!Ø%ØØ)Ø*Ø Ø2Ø2Ø0Ø1ðñ ô ñ
ô 
ˆð �<Š<‰>Œ>Ðó    c                 óÊ   — t          j        t          d|¬¦  «        d¬¦  «        }| r)|                     t	          ddddd	d
d¬¦  «        ¦  «        }|                     ¦   «         S )a
  
    Each row represents a restaurant bill.

    https://vincentarelbundock.github.io/Rdatasets/doc/reshape2/tips.html

    Parameters
    ----------
    pretty_names: bool
        If True, prettifies the column names

    return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'}
        Type of the resulting dataframe

    Returns
    -------
    Dataframe of `return_type` type
        Dataframe with 244 rows and the following columns:
        `['total_bill', 'tip', 'sex', 'smoker', 'day', 'time', 'size']`.
    Útipsr   Tr   z
Total BillÚTipzPayer GenderzSmokers at TablezDay of WeekÚMealz
Party Size)Ú
total_billÚtipÚsexÚsmokerÚdayÚtimeÚsize)r   r   r    r+   r,   r-   )r0   r   r1   s      r2   r5   r5   W   sx   € õ* 
Œ� V¸ÐEÑEÔEÐRVÐ	WÑ	WÔ	W€BØð 
Ø�YŠYÝØ'ØØ"Ø)Ø!ØØ!ðñ ô ñ

ô 

ˆð �<Š<‰>Œ>Ðr3   c                 ó$   — t          d| ¬¦  «        S )aÃ  
    Each row represents a flower.

    https://en.wikipedia.org/wiki/Iris_flower_data_set

    Parameters
    ----------
    return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'}
        Type of the resulting dataframe

    Returns
    -------
    Dataframe of `return_type` type
        Dataframe with 150 rows and the following columns:
        `['sepal_length', 'sepal_width', 'petal_length', 'petal_width', 'species', 'species_id']`.
    Úirisr   ©r    r   s    r2   r@   r@   |   s   € õ" ˜¨KÐ8Ñ8Ô8Ð8r3   c                 ó$   — t          d| ¬¦  «        S )a–  
    Each row represents a level of wind intensity in a cardinal direction, and its frequency.

    Parameters
    ----------
    return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'}
        Type of the resulting dataframe

    Returns
    -------
    Dataframe of `return_type` type
        Dataframe with 128 rows and the following columns:
        `['direction', 'strength', 'frequency']`.
    Úwindr   rA   r   s    r2   rC   rC   �   s   € õ ˜¨KÐ8Ñ8Ô8Ð8r3   c                 ó$   — t          d| ¬¦  «        S )aÔ  
    Each row represents voting results for an electoral district in the 2013 Montreal
    mayoral election.

    Parameters
    ----------
    return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'}
        Type of the resulting dataframe

    Returns
    -------
    Dataframe of `return_type` type
        Dataframe with 58 rows and the following columns:
        `['district', 'Coderre', 'Bergeron', 'Joly', 'total', 'winner', 'result', 'district_id']`.
    Úelectionr   rA   r   s    r2   rE   rE   ¢   ó   € õ  ˜
°Ð<Ñ<Ô<Ð<r3   c                  ó’  — ddl } ddl}ddl}|j                             |j                             |j                             t          ¦  «        ¦  «        ddd¦  «        }|                      |d¦  «        5 }|                     | 	                    ¦   «          
                    d¦  «        ¦  «        }ddd¦  «         n# 1 swxY w Y   |S )a@  
    Each feature represents an electoral district in the 2013 Montreal mayoral election.

    Returns
    -------
        A GeoJSON-formatted `dict` with 58 polygon or multi-polygon features whose `id`
        is an electoral district numerical ID and whose `district` property is the ID and
        district name.
    r   NÚpackage_dataÚdatasetszelection.geojson.gzÚrzutf-8)ÚgzipÚjsonÚosÚpathÚjoinÚdirnameÚ__file__ÚGzipFileÚloadsÚreadÚdecode)rK   rL   rM   rN   ÚfÚresults         r2   Úelection_geojsonrX   µ   sî   € ð €K€K€KØ€K€K€KØ€I€I€IàŒ7�<Š<Ø
Œ�Š˜œŸš­Ñ1Ô1Ñ2Ô2ØØØñ	ô €Dð 
�Š�t˜SÑ	!Ô	!ð 6 QØ—’˜AŸFšF™HœHŸOšO¨GÑ4Ô4Ñ5Ô5ˆð6ð 6ð 6ñ 6ô 6ð 6ð 6ð 6ð 6ð 6ð 6øøøð 6ð 6ð 6ð 6à€Ms   Á5;B<Â<C ÃC c                 ó$   — t          d| ¬¦  «        S )aÔ  
    Each row represents the availability of car-sharing services near the centroid of a zone
    in Montreal over a month-long period.

    Parameters
    ----------
    return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'}
        Type of the resulting dataframe

    Returns
    -------
    Dataframe of `return_type` type
        Dataframe` with 249 rows and the following columns:
        `['centroid_lat', 'centroid_lon', 'car_hours', 'peak_hour']`.
    Úcarsharer   rA   r   s    r2   rZ   rZ   Î   rF   r3   c                 ó4  — | r|t           vrd|› d�}t          |¦  «        ‚t          j        t	          d|¬¦  «        d¬¦  «                             t          j        d¦  «                             t          j        ¦   «         ¦  «        ¦  «        }|r>|                     t          j        d¦  «        j	         
                    ¦   «         ¦  «        }| r5|                     ¦   «                              d¦  «        }d|j        _        |S |                     ¦   «         S )	ai  
    Each row in this wide dataset represents closing prices from 6 tech stocks in 2018/2019.

    Parameters
    ----------
    indexed: bool
        Whether or not the 'date' column is used as the index and the column index
        is named 'company'. Applicable only if `return_type='pandas'`

    datetimes: bool
        Whether or not the 'date' column will be of datetime type

    return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'}
        Type of the resulting dataframe

    Returns
    -------
    Dataframe of `return_type` type
        Dataframe with 100 rows and the following columns:
        `['date', 'GOOG', 'AAPL', 'AMZN', 'FB', 'NFLX', 'MSFT']`.
        If `indexed` is True, the 'date' column is used as the index and the column index
        is named 'company'
        If `datetimes` is True, the 'date' column will be a datetime column
    ú	Backend 'ú ' does not support setting indexÚstocksr   Tr   ÚdateÚcompany)ÚBACKENDS_WITH_INDEX_SUPPORTÚNotImplementedErrorr   r   r    r#   r"   r%   r&   r(   r)   r-   Ú	set_indexÚcolumnsÚname)Úindexedr.   r   Úmsgr1   s        r2   r^   r^   á   sú   € ð2 ð '�;Õ&AÐAÐAØG˜+ÐGÐGÐGˆÝ! #Ñ&Ô&Ð&å	ŒÝ�X¨;Ð7Ñ7Ô7ÀDð
ñ 
ô 
ç‚l•2”6˜&‘>”>×&Ò&¥r¤y¡{¤{Ñ3Ô3Ñ4Ô4ð ð ð ?Ø�_Š_�RœV F™^œ^Ô/×;Ò;Ñ=Ô=Ñ>Ô>ˆàð Ø�\Š\‰^Œ^×%Ò% fÑ-Ô-ˆØ#ˆŒ
ŒØˆ	à�<Š<‰>Œ>Ðr3   c                 óü   — | r|t           vrd|› d�}t          |¦  «        ‚t          j        t	          d|¬¦  «        d¬¦  «        }| r"|                     ¦   «         }d|j        _        |S |                     ¦   «         S )aÏ  
    Each row in this wide dataset represents the results of 100 simulated participants
    on three hypothetical experiments, along with their gender and control/treatment group.

    Parameters
    ----------
    indexed: bool
        If True, then the index is named "participant".
        Applicable only if `return_type='pandas'`

    return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'}
        Type of the resulting dataframe

    Returns
    -------
    Dataframe of `return_type` type
        Dataframe with 100 rows and the following columns:
        `['experiment_1', 'experiment_2', 'experiment_3', 'gender', 'group']`.
        If `indexed` is True, the data frame index is named "participant"
    r\   r]   Ú
experimentr   Tr   Úparticipant)ra   rb   r   r   r    r-   Úindexre   ©rf   r   rg   r1   s       r2   ri   ri     s�   € ð, ð '�;Õ&AÐAÐAØG˜+ÐGÐGÐGˆÝ! #Ñ&Ô&Ð&å	ŒÝ�\¨{Ð;Ñ;Ô;Èð
ñ 
ô 
€Bð ð Ø�\Š\‰^Œ^ˆØ%ˆŒŒØˆ	Ø�<Š<‰>Œ>Ðr3   c                 ó"  — | r|t           vrd|› d�}t          |¦  «        ‚t          j        t	          d|¬¦  «        d¬¦  «        }| r5|                     ¦   «                              d¦  «        }d|j        _        |S |                     ¦   «         S )	aÓ  
    This dataset represents the medal table for Olympic Short Track Speed Skating for the
    top three nations as of 2020.

    Parameters
    ----------
    indexed: bool
        Whether or not the 'nation' column is used as the index and the column index
        is named 'medal'. Applicable only if `return_type='pandas'`

    return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'}
        Type of the resulting dataframe

    Returns
    -------
    Dataframe of `return_type` type
        Dataframe with 3 rows and the following columns:
        `['nation', 'gold', 'silver', 'bronze']`.
        If `indexed` is True, the 'nation' column is used as the index and the column index
        is named 'medal'
    r\   r]   Úmedalsr   Tr   ÚnationÚmedal)	ra   rb   r   r   r    r-   rc   rd   re   rl   s       r2   Úmedals_widerq   1  sž   € ð. ð '�;Õ&AÐAÐAØG˜+ÐGÐGÐGˆÝ! #Ñ&Ô&Ð&å	ŒÝ�X¨;Ð7Ñ7Ô7ÀDð
ñ 
ô 
€Bð ð Ø�\Š\‰^Œ^×%Ò% hÑ/Ô/ˆØ!ˆŒ
ŒØˆ	Ø�<Š<‰>Œ>Ðr3   c                 ó  — | r|t           vrd|› d�}t          |¦  «        ‚t          j        t	          d|¬¦  «        d¬¦  «                             dgdd	¬
¦  «        }| rt          j        |d¦  «        }|                     ¦   «         S )an  
    This dataset represents the medal table for Olympic Short Track Speed Skating for the
    top three nations as of 2020.

    Parameters
    ----------
    indexed: bool
        Whether or not the 'nation' column is used as the index.
        Applicable only if `return_type='pandas'`

    return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'}
        Type of the resulting dataframe

    Returns
    -------
    Dataframe of `return_type` type
        Dataframe with 9 rows and the following columns: `['nation', 'medal', 'count']`.
        If `indexed` is True, the 'nation' column is used as the index.
    r\   r]   rn   r   Tr   ro   Úcountrp   )rk   Ú
value_nameÚvariable_name)ra   rb   r   r   r    ÚunpivotÚmaybe_set_indexr-   rl   s       r2   Úmedals_longrx   V  s©   € ð* ð '�;Õ&AÐAÐAØG˜+ÐGÐGÐGˆÝ! #Ñ&Ô&Ð&å	ŒÝ�X¨;Ð7Ñ7Ô7ÀDð
ñ 
ô 
ç‚gØˆjØØð ñ ô ð ð ð .ÝÔ  HÑ-Ô-ˆØ�<Š<‰>Œ>Ðr3   c                 óX  — t           j                             t           j                             t           j                             t          ¦  «        ¦  «        dd| dz   ¦  «        }|t
          vrd|› dt
          › �}t          |¦  «        ‚	 |dk    rd}n|dk    rd	}n|}t          |¦  «        }n&# t          $ r d
|› d|› d�}t          |¦  «        ‚w xY w	 | 	                    |¦  «        S # t          $ r4}d| › d|› �}t          |¦  «                             |j        ¦  «        ‚d}~ww xY w)aI  
    Loads the dataset using the specified backend.

    Notice that the available backends are 'pandas', 'polars', 'pyarrow' and they all have
    a `read_csv` function (pyarrow has it via pyarrow.csv). Therefore we can dynamically
    load the library using `importlib.import_module` and then call
    `backend.read_csv(filepath)`.

    Parameters
    ----------
    d: str
        Name of the dataset to load.

    return_type: {'pandas', 'polars', 'pyarrow', 'modin', 'cudf'}
        Type of the resulting dataframe

    Returns
    -------
    Dataframe of `return_type` type
    rH   rI   z.csv.gzzUnsupported return_type. Found z, expected one of r   zpyarrow.csvr   zmodin.pandaszreturn_type=z, but z is not installedzUnable to read 'z' dataset due to: N)rM   rN   rO   rP   rQ   ÚAVAILABLE_BACKENDSrb   r   ÚModuleNotFoundErrorÚread_csvÚ	ExceptionÚwith_tracebackÚ__traceback__)Údr   Úfilepathrg   Úmodule_to_loadÚbackendÚes          r2   r    r    {  sm  € õ* Œw�|Š|Ý
Œ�Š�œŸš­Ñ1Ô1Ñ2Ô2ØØØ	ˆI‰ñ	ô €Hð Õ,Ð,Ð,ð'¨kð 'ð 'Ý$ð'ð 'ð 	õ " #Ñ&Ô&Ð&ð
'Ø˜)Ò#Ð#Ø*ˆNˆNØ˜GÒ#Ð#Ø+ˆNˆNà(ˆNÝ Ñ/Ô/ˆˆøÝð 'ð 'ð 'ØN˜[ÐNÐN°ÐNÐNÐNˆÝ! #Ñ&Ô&Ð&ð'øøøð=Ø×Ò Ñ)Ô)Ð)øÝð =ð =ð =Ø9 Ð9Ð9°aÐ9Ð9ˆÝ˜‰nŒn×+Ò+¨A¬OÑ<Ô<Ð<øøøøð=øøøs$   Â#B/ Â/#CÃC+ Ã+
D)Ã5/D$Ä$D))FFNFr   )Fr   )r   )FFr   )Ú__doc__rM   Ú	importlibr   Únarwhals.stable.v1ÚstableÚv1r   rz   ra   r
   r5   r@   rC   rE   rX   rZ   r^   ri   rq   rx   r    © r3   r2   ú<module>r‹      sj  ððð ð 
€	€	€	Ø #Ð #Ð #Ð #Ð #Ð #à Ð Ð Ð Ð Ð Ð Ð Ð àEÐEÐEÐ Ø9Ð9Ð9Ð ð ØØ	ØØðFð Fð Fð FðR"ð "ð "ð "ðJ9ð 9ð 9ð 9ð(9ð 9ð 9ð 9ð$=ð =ð =ð =ð&ð ð ð2=ð =ð =ð =ð&)ð )ð )ð )ðX!ð !ð !ð !ðH"ð "ð "ð "ðJ"ð "ð "ð "ðJ3=ð 3=ð 3=ð 3=ð 3=r3   