# Standard imports 

from bokeh.io import output_notebook, show
output_notebook()

# Plot a complex chart in a single line

from bokeh.charts import Histogram
from bokeh.sampledata.iris import flowers as data

hist = Histogram(data, values="petal_length", color="species", legend="top_right", bins=12)

show(hist)

data.head()

from bokeh.charts import Scatter
p = Scatter(data, x='petal_length', y='petal_width')
show(p)

p = Scatter(data, x='petal_length', y='petal_width', color='species', 
            legend='top_left', marker='species', title="Ejemplo Scatter")
show(p)

"""
Explanation: <table style="float:left; border:none">
   <tr style="border:none">
       <td style="border:none">
           <a href="https://bokeh.pydata.org/">     
           <img 
               src="assets/images/bokeh-transparent.png" 
               style="width:50px"
           >
           </a>    
       </td>
       <td style="border:none">
           <h1>Bokeh Tutorial</h1>
       </td>
   </tr>
</table>
<div style="float:right;"><h2>00. Introduction and Setup</h2></div>

Table of Contents

Tuturial Overview
What is Bokeh 
What can I do with Bokeh 
How does it work
Getting set up

Tutorial Overview
The tutorial is broken into several sections, which are each presented in their own notebook:


High Level Charts 


Basic Plotting Interface


Styling Visual Attributes 


Layouts, Widgets, and Interactions 


Sharing and Embedding 


Models and Primitives 


Annotations 


Bokeh Applications 


Geographic Data


Datashader: Visualizaing Large Data


HoloViews and Bokeh


A1. Extra Bokeh Topics 
What is Bokeh
Bokeh is a Data Visualization library for

interactive visualization in modern browsers
standalone HTML documents, or server-backed apps
capable of expressive and verstatile graphics
can handle large, dynamic or streaming data
available from python (or Scala, or R, or Julia, or...)

And most importantly:
<center>NO JAVASCRIPT REQUIRED </center>
What can you do with Bokeh
End of explanation
"""


from IPython.core.display import Markdown
Markdown(open("README.md").read())

"""
Explanation: <img src="assets/images/arch.png" style="width:800px">
Getting set up
End of explanation
"""


from IPython import __version__ as ipython_version
from pandas import __version__ as pandas_version
from bokeh import __version__ as bokeh_version
print("IPython - %s" % ipython_version)
print("Pandas - %s" % pandas_version)
print("Bokeh - %s" % bokeh_version)

"""
Explanation: Setup-test, run the next cell. Hopefully you should see output that looks something like this:
IPython - 4.2.0
Pandas - 0.18.1
Bokeh - 0.12.0

If this isn't working for you, see the README.md in this directory.
End of explanation
"""


