a
    ~b-                     @   sv  d Z ddlZddlZddlmZ ddlmZ ddl	m
Z
 ed edZeejddddddd	d
ejdddddddddd	ejdddejddejddd ed Zejeddgg dZe
eddddZejjeededZejjeededZej dd egdZ!ej dd egdZ"ej#j$edd egdd Z%ee" e! e%> Z&e'e&Z(d!e(_)dS )"a  
Bokeh app example using datashader for rasterizing a large dataset and
geoviews for reprojecting coordinate systems.

This example requires the 1.7GB nyc_taxi_wide.parquet dataset which
you can obtain by downloading the file from AWS:

  https://s3.amazonaws.com/datashader-data/nyc_taxi_wide.parq

Place this parquet in a data/ subfolder and install the python dependencies, e.g.

  conda install datashader fastparquet python-snappy

You can now run this app with:

  bokeh serve --show nytaxi_hover.py

    N)opts)	aggregateZbokehFZ	orangeredTd   )xaxisyaxisZ	show_gridZ
show_framecolorZ	framewisewidthi   i  Zblack)	r   Zheightshared_axesZlogzZcolorbarr   r   ZaxiswiseZbgcolorZwhite   )r   Z
line_width)r	   z./data/nyc_taxi_wide.parqpickup_xZpickup_y)ZkdimsZvdimsg-C6?)link_inputsZ
x_samplingZ
y_sampling)xsource)yr   c                 C   s
   t | S N)hvVLine)r    r   Qlib/python3.9/site-packages/holoviews/examples/gallery/apps/bokeh/nytaxi_hover.py<lambda>1       r   )streamsc                 C   s
   t | S r   )r   HLine)r   r   r   r   r   2   r   c                 C   s   | j |dS )N)r   )Zsample)objr   r   r   r   r   4   r   )Z	operationr   r   zNYC Taxi Crosshair)*__doc__ZnumpyZnpZ	holoviewsr   Zdask.dataframeZ	dataframeddr   Zholoviews.operation.datashaderr   	extensionZrendererdefaultsZCurveZImager   ZLayoutr   Zread_parquetZpersistZdfZPointsZpointsZaggr   ZPointerXZmeanrangeZpointerxZPointerYZpointeryZ
DynamicMapZvlineZhlineutilZDynamicZsampledZhvobjZ
server_docdoctitler   r   r   r   <module>   s>   




