Simple Bokeh example with widgets

Yes you are! There is some sample data that shipped separately because it is too large to check into the repo or include in the package. At a python prompt, execute:

import bokeh

bokeh.sampledata.download()

Thanks,

Bryan

···

On Jul 31, 2014, at 1:13, Armen Alexanian [email protected] wrote:

Hi Bryan,

Thanks again for your help! That example worked great and I was able to see the line graph on my local bokeh-server at the url you specified. I then tried again using the population_server.py example and I got the following error:

File “parser.pyx”, line 332, in pandas.parser.TextReader.cinit (pandas\parser.c:3218)

File “parser.pyx”, line 559, in pandas.parser.TextReader._setup_parser_source (pandas\parser.c:5594)

OSError: File b’C:\Users\aalexanian/.bokeh\data\WPP2012_SA_DB03_POPULATION_QUINQUENNIAL.CSV’ does not exist

I’m almost there!

Thanks!

Armen

When I run the code for the first widgets example,

On Wednesday, July 30, 2014 1:16:41 PM UTC-7, Armen Alexanian wrote:

Hi,

I’m new to Bokeh and Python, though I’ve made some great progress on a visualization I’m working on. I’ve tried the three Bokeh examples with widgets but can’t get any of them to work. I’m not sure if it’s because I’m using Windows or on my company network. Would someone please post a very simple example of a script which shows how to put a Select widget on a webpage without linking to any external data sets or requiring Bokeh server?

Thanks very much!

Armen

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/30347ae7-be53-44a0-a4ea-6907a73af745%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

<population_server_py_graphic.PNG>

Bryan and Damian,

Thanks very much again! The sample data downloaded perfectly. When I tried to rerun the script (while my bokeh-server is running), I get this strange error below “‘Plot’ object has no attribute ‘below’”. When I comment out that line, there’s another line which has “plot.left” and it gives me the same error for the “left”. When I looked at plot’s attributes by typing “plot.” in Spyder and it brings up a drop down list of the attributes, it’s correct that there aren’t below or left attributes.

File “H:/Work Files/Python Programming/Scripts/Widgets_Test.py”, line 60, in pyramid

plot.below.append(xaxis)

AttributeError: ‘Plot’ object has no attribute ‘below’

Thanks so much for your help! I really appreciate it.

Armen

···

On Wednesday, July 30, 2014 1:16:41 PM UTC-7, Armen Alexanian wrote:

Hi,

I’m new to Bokeh and Python, though I’ve made some great progress on a visualization I’m working on. I’ve tried the three Bokeh examples with widgets but can’t get any of them to work. I’m not sure if it’s because I’m using Windows or on my company network. Would someone please post a very simple example of a script which shows how to put a Select widget on a webpage without linking to any external data sets or requiring Bokeh server?

Thanks very much!

Armen

OK, you hit a bug… I can reproduce it in 0.5.1, but it seems to be fixed on master, because it is working as expected.
We will probably have the 0.5.2 early next week, and the fix will be included. Sorry about this bug… we recently have a huge PR merged and still we have some little things to fix. Thanks for you report, btw, it is very useful…

···

On Thu, Jul 31, 2014 at 1:44 PM, Armen Alexanian [email protected] wrote:

Bryan and Damian,

Thanks very much again! The sample data downloaded perfectly. When I tried to rerun the script (while my bokeh-server is running), I get this strange error below “‘Plot’ object has no attribute ‘below’”. When I comment out that line, there’s another line which has “plot.left” and it gives me the same error for the “left”. When I looked at plot’s attributes by typing “plot.” in Spyder and it brings up a drop down list of the attributes, it’s correct that there aren’t below or left attributes.

File “H:/Work Files/Python Programming/Scripts/Widgets_Test.py”, line 60, in pyramid

plot.below.append(xaxis)

AttributeError: ‘Plot’ object has no attribute ‘below’

Thanks so much for your help! I really appreciate it.

Armen

On Wednesday, July 30, 2014 1:16:41 PM UTC-7, Armen Alexanian wrote:

Hi,

I’m new to Bokeh and Python, though I’ve made some great progress on a visualization I’m working on. I’ve tried the three Bokeh examples with widgets but can’t get any of them to work. I’m not sure if it’s because I’m using Windows or on my company network. Would someone please post a very simple example of a script which shows how to put a Select widget on a webpage without linking to any external data sets or requiring Bokeh server?

Thanks very much!

Armen

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/2e6319b8-04b1-425c-b685-ca39da79fff9%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Hi Damian,

Thanks so much for looking into this! It’s really cool for me to be able to help you guys test the new software. When the new 0.5.2 comes out next week, is there a command I can use to update my Bokeh version?

By the way, I was a student last week at Continuum’s Python for Science class (which I highly recommend to anyone interested in Python), and Ben Zaitlen was one of our teachers and I found his article about Bokeh on his blog so he showed us a bunch of great examples and I started using it. It’s working great so far, helping me create a visual representation of the many buildings my employer owns and the various attributes of each unit. I started by using the periodic table graph example and modified it so that each unit is sized differently based on its square footage. The hover tool is awesome! I can hover over each unit and see the details. I’m looking forward to using the Select widget so users can have a drop-down menu of buildings, and a drop-down menu of attributes by which to color code the units and then the selected building will appear with the selected attributes. Some of the attributes chosen will result in different colored units and others will result in heat-map colored units with different shades of one color to denote that attribute’s concentration. I did a somewhat related visualization in CoffeeScript last year but the Bokeh tool is much simpler because it’s specifically made to create graphs and visualizations. (CoffeeScript is awesome though!)

Thanks again,

Armen

···

On Wednesday, July 30, 2014 1:16:41 PM UTC-7, Armen Alexanian wrote:

Hi,

I’m new to Bokeh and Python, though I’ve made some great progress on a visualization I’m working on. I’ve tried the three Bokeh examples with widgets but can’t get any of them to work. I’m not sure if it’s because I’m using Windows or on my company network. Would someone please post a very simple example of a script which shows how to put a Select widget on a webpage without linking to any external data sets or requiring Bokeh server?

Thanks very much!

Armen

When we release the new version I suggest you to update it via conda or pip (I don’t know which system are you using now).

For conda:

conda update bokeh

For pip:

pip uninstall bokeh

to delete the old version, and then:

pip install bokeh

to install the new one…

Currently pip install bokeh -U is not working so I suggest you to do what I describe above.

It is really great you start using Bokeh and keep trying after each fail… you help us a lot. Thanks for your patient and I hope you enjoy Bokeh and all its features a lot!

Damian

···

On Thu, Jul 31, 2014 at 3:09 PM, Armen Alexanian [email protected] wrote:

Hi Damian,

Thanks so much for looking into this! It’s really cool for me to be able to help you guys test the new software. When the new 0.5.2 comes out next week, is there a command I can use to update my Bokeh version?

By the way, I was a student last week at Continuum’s Python for Science class (which I highly recommend to anyone interested in Python), and Ben Zaitlen was one of our teachers and I found his article about Bokeh on his blog so he showed us a bunch of great examples and I started using it. It’s working great so far, helping me create a visual representation of the many buildings my employer owns and the various attributes of each unit. I started by using the periodic table graph example and modified it so that each unit is sized differently based on its square footage. The hover tool is awesome! I can hover over each unit and see the details. I’m looking forward to using the Select widget so users can have a drop-down menu of buildings, and a drop-down menu of attributes by which to color code the units and then the selected building will appear with the selected attributes. Some of the attributes chosen will result in different colored units and others will result in heat-map colored units with different shades of one color to denote that attribute’s concentration. I did a somewhat related visualization in CoffeeScript last year but the Bokeh tool is much simpler because it’s specifically made to create graphs and visualizations. (CoffeeScript is awesome though!)

Thanks again,

Armen

On Wednesday, July 30, 2014 1:16:41 PM UTC-7, Armen Alexanian wrote:

Hi,

I’m new to Bokeh and Python, though I’ve made some great progress on a visualization I’m working on. I’ve tried the three Bokeh examples with widgets but can’t get any of them to work. I’m not sure if it’s because I’m using Windows or on my company network. Would someone please post a very simple example of a script which shows how to put a Select widget on a webpage without linking to any external data sets or requiring Bokeh server?

Thanks very much!

Armen

You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/b763479f-21fe-449d-93aa-b70f139e9f5a%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Thanks so much Damian! I’m looking forward to next week with the new version. I still have lots of work to do until then. :slight_smile:

Armen

···

On Wednesday, July 30, 2014 1:16:41 PM UTC-7, Armen Alexanian wrote:

Hi,

I’m new to Bokeh and Python, though I’ve made some great progress on a visualization I’m working on. I’ve tried the three Bokeh examples with widgets but can’t get any of them to work. I’m not sure if it’s because I’m using Windows or on my company network. Would someone please post a very simple example of a script which shows how to put a Select widget on a webpage without linking to any external data sets or requiring Bokeh server?

Thanks very much!

Armen