B
    &[_V                 @   sp   d Z dd Zdd Zdd Zdd Zd	d
 Zdd Zdd ZdddZdddZ	dddZ
dddZdd ZdS )zE
Built-in datasets for demonstration, educational and test purposes.
c               C   s   t 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']`.
	gapminder)_get_dataset r   r   8/tmp/pip-install-l29rncou/plotly/plotly/data/__init__.pyr      s    r   c               C   s   t 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']`.
tips)r   r   r   r   r   r      s    
r   c               C   s   t dS )z
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   r   r   r   !   s    
r   c               C   s   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']`.
wind)r   r   r   r   r   r   .   s    r   c               C   s   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']`.
election)r   r   r   r   r   r   9   s    	r   c           	   C   sj   ddl } ddl}ddl}|j|j|jtddd}| |d}||	 
d}W dQ R X |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.
    Npackage_datadatasetszelection.geojson.gzrzutf-8)gzipjsonospathjoindirname__file__GzipFileloadsreaddecode)r   r   r   r   fresultr   r   r   election_geojsonE   s    	r   c               C   s   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']`.
carshare)r   r   r   r   r   r   ]   s    	r   Fc             C   s"   t d}| r|d}d|j_|S )aQ  
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
    is named 'company'
stocksdateZcompany)r   	set_indexcolumnsname)indexeddfr   r   r   r   i   s
    

r   c             C   s   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"

experimentZparticipant)r   indexr    )r!   r"   r   r   r   r#   z   s    r#   c             C   s"   t d}| r|d}d|j_|S )aZ  
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   r   r   r    )r!   r"   r   r   r   medals_wide   s
    
r(   c             C   s(   t djdgd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'   )Zid_varsZ
value_namevar_name)r   Zmeltr   )r!   r"   r   r   r   medals_long   s
    

r+   c          	   C   s<   dd l }dd l}||j|j|jtdd| d S )Nr	   r
   r   z.csv.gz)pandasr   Zread_csvr   r   r   r   )dr,   r   r   r   r   r      s    r   N)F)F)F)F)__doc__r   r   r   r   r   r   r   r   r#   r(   r+   r   r   r   r   r   <module>   s   



