
    [6g                     ^    d Z ddZddZd Zd Zd Zd Z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.
FNc                 Z   t          d          }|r||d         |k             }| r9|d                             t                    dz                       d          |d<   |s|                    ddgd          }|r/|                    t          d	d
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/

    Returns:
        A `pandas.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yearz-01-01datetime64[ns]centroid_latcentroid_lon   )axis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   columnsTmapperr	   inplace)_get_datasetastypestrdroprenamedict)	datetimes	centroidsr   pretty_namesdfs        S/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/plotly/data/__init__.pyr   r      s     
k	"	"B $6
d"# Rj'',,x7??@PQQ6
 ?WWnn5AW>> 

		!%)* 2201    	 	
 	
 	
  I    c                     t          d          }| r,|                    t          ddddddd	          d
d           |S )a  
    Each row represents a restaurant bill.

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

    Returns:
        A `pandas.DataFrame` with 244 rows and the following columns:
        `['total_bill', 'tip', 'sex', 'smoker', 'day', 'time', 'size']`.tipsz
Total BillTipzPayer GenderzSmokers at TablezDay of WeekMealz
Party Size)
total_billtipsexsmokerdaytimesizer   Tr   )r   r   r   )r!   r"   s     r#   r&   r&   /   sj     
f		B 

		'")!!    	 	
 	
 	
 Ir$   c                       t          d          S )a  
    Each row represents a flower.

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

    Returns:
        A `pandas.DataFrame` with 150 rows and the following columns:
        `['sepal_length', 'sepal_width', 'petal_length', 'petal_width', 'species', 'species_id']`.irisr    r$   r#   r1   r1   K   s     r$   c                       t          d          S )z
    Each row represents a level of wind intensity in a cardinal direction, and its frequency.

    Returns:
        A `pandas.DataFrame` with 128 rows and the following columns:
        `['direction', 'strength', 'frequency']`.windr2   r3   r$   r#   r5   r5   W   s     r$   c                       t          d          S )a"  
    Each row represents voting results for an electoral district in the 2013 Montreal
    mayoral election.

    Returns:
        A `pandas.DataFrame` with 58 rows and the following columns:
        `['district', 'Coderre', 'Bergeron', 'Joly', 'total', 'winner', 'result', 'district_id']`.electionr2   r3   r$   r#   r7   r7   a        
###r$   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 )a0  
    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.    Npackage_datadatasetszelection.geojson.gzrzutf-8)gzipjsonospathjoindirname__file__GzipFileloadsreaddecode)r>   r?   r@   rA   fresults         r#   election_geojsonrK   l   s     KKKKKKIII7<<
1122	 D 
tS	!	! 6QAFFHHOOG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.

    Returns:
        A `pandas.DataFrame` with 249 rows and the following columns:
        `['centroid_lat', 'centroid_lon', 'car_hours', 'peak_hour']`.carsharer2   r3   r$   r#   rM   rM      r8   r$   c                     t          d          }|r|d                             d          |d<   | r!|                    d          }d|j        _        |S )a  
    Each row in this wide dataset represents closing prices from 6 tech stocks in 2018/2019.

    Returns:
        A `pandas.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
        If `datetimes` is True, the 'date' column will be a datetime column
        is named 'company'stocksdater   company)r   r   	set_indexr   name)indexedr   r"   s      r#   rO   rO      s\     
h		B 9Z&&'7886
 $\\&!!#
Ir$   c                 @    t          d          }| rd|j        _        |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.


    Returns:
        A `pandas.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" 
experimentparticipant)r   indexrS   rT   r"   s     r#   rV   rV      s'     
l	#	#B &%Ir$   c                 j    t          d          }| r!|                    d          }d|j        _        |S )au  
    This dataset represents the medal table for Olympic Short Track Speed Skating for the
    top three nations as of 2020.

    Returns:
        A `pandas.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'medalsnationmedal)r   rR   r   rS   rY   s     r#   medals_wider^      s8     
h		B "\\(##!
Ir$   c                     t          d                              dgdd          }| r|                    d          }|S )a>  
    This dataset represents the medal table for Olympic Short Track Speed Skating for the
    top three nations as of 2020.

    Returns:
        A `pandas.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\   countr]   )id_vars
value_namevar_name)r   meltrR   rY   s     r#   medals_longre      sO     
h			$	$
w 
% 
 
B  $\\(##Ir$   c           	          dd l }dd l}|                    |j                            |j                            |j                            t                              dd| dz                       S )Nr:   r;   r<   z.csv.gz)pandasr@   read_csvrA   rB   rC   rD   )drg   r@   s      r#   r   r      si    MMMIII??
GOOBGOOH5566	M		
 	
  r$   )FFNF)F)FF)__doc__r   r&   r1   r5   r7   rK   rM   rO   rV   r^   re   r   r3   r$   r#   <module>rk      s    
& & & &R   8	  	  	      $ $ $  .$ $ $   &       "   "    r$   