
    6Dh3                         S r SSKrSSKJr  SSKJs  Jr  1 Skr1 Skr	     SS jr
SS jrSS jrSS	 jrSS
 jrS rSS jrSS jrSS jrSS jrSS jrS rg)zE
Built-in datasets for demonstration, educational and test purposes.
    N)import_module>   cudfmodinpandaspolarspyarrow>   r   r   r   c                 Z   [         R                  " [        SUS9SS9nU(       a(  UR                  [         R                  " S5      U:H  5      nU (       a  UR                  [         R                  " [         R                  " S5      R                  [         R                  " 5       5      [         R                  " S5      /5      R                  R                  SS95      nU(       d  UR                  S	S
5      nU(       a!  UR                  [        SSSSSSSSSSS9
5      nUR                  5       $ )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         F/var/www/html/env/lib/python3.13/site-packages/plotly/data/__init__.pyr
   r
      s    P 
[k:t
B YYrvvf~-.__ MM$$RYY[1266(3CDc++Z+0
 WW^^4YY!%)* 2201
 <<>    c                     [         R                  " [        SUS9SS9nU (       a  UR                  [	        SSSSS	S
SS95      nUR                  5       $ )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ERV	WBYY'")!!

 <<>r3   c                     [        SU S9$ )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8r3   c                     [        SU S9$ )aj  
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8r3   c                     [        SU S9$ )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                  |   SSK n SSKnSSKnUR                  R	                  UR                  R                  UR                  R                  [        5      5      SSS5      nU R                  US5       nUR                  UR                  5       R                  S5      5      nSSS5        U$ ! , (       d  f       W$ = f)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     77<<
12	D 
tS	!QAFFHOOG45 
"M 
"	!Ms   3/B,,
B;c                     [        SU S9$ )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                 $   U (       a  U[         ;  a  SU S3n[        U5      e[        R                  " [	        SUS9SS9R                  [        R                  " S5      R                  [        R                  " 5       5      5      nU(       a=  UR                  [        R                  " S5      R                  R                  5       5      nU (       a2  UR                  5       R                  S5      nSUR                  l        U$ UR                  5       $ )	a  
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+&FG!#&&	X;7D
l266&>&&ryy{34  __RVVF^//;;=>\\^%%f-#

	<<>r3   c                     U (       a  U[         ;  a  SU S3n[        U5      e[        R                  " [	        SUS9SS9nU (       a#  UR                  5       nSUR                  l        U$ UR                  5       $ )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     so    , ;&AA+&FG!#&&	\{;
B \\^%	<<>r3   c                    U (       a  U[         ;  a  SU S3n[        U5      e[        R                  " [	        SUS9SS9nU (       a2  UR                  5       R                  S5      nSUR                  l        U$ UR                  5       $ )	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  sz    . ;&AA+&FG!#&&	X;7D
B \\^%%h/!

	<<>r3   c                     U (       a  U[         ;  a  SU S3n[        U5      e[        R                  " [	        SUS9SS9R                  S/SS	S
9nU (       a  [        R                  " US5      nUR                  5       $ )a2  
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+&FG!#&&	X;7D
gj    H-<<>r3   c                 .   [         R                  R                  [         R                  R                  [         R                  R                  [        5      5      SSU S-   5      nU[
        ;  a  SU S[
         3n[        U5      e US:X  a  SnOUS:X  a  S	nOUn[        U5      n UR                  U5      $ ! [         a    S
U SU S3n[        U5      ef = f! [         a1  nSU  SU 3n[        U5      R                  UR                  5      eSnAff = f)a  
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    {  s&   * ww||
12	I	H ,,-k] ;$%' 	 "#&&
')#*NG#+N(N/
=))  '[M}<MN!#&&'  = #5aS9n++AOO<<=s$   B7 &C 7C
D#,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      sx    
 #  E 9  	FR"J9(9$=&2=&)X!H"J"J3=r3   