Histogram over time

I am using Python 3.3 (anaconda) and bokeh 1.0

I am trying to create a histogram that shows the number of failures over time. The granularity is per second and I am having no luck getting it to work. I have create a DataFrame that contains the time of the failure, as well as the schema (and other items). The DataFrame is created from a list of dictionary items, which contains schema as a string and time as a float. The dataframe looks correct when I view the contents, however everytime I try to create the histogram it fails. This is the line that creates the histogram:

hist = Histogram(df, 100, ‘time’, xscale=‘datetime’, color=‘schema’, title=“fails”)

The error I am getting is:

File “/Users/g/anaconda/envs/py3k/lib/python3.3/site-packages/bokeh/properties.py”, line 485, in validate

(nice_join([ cls.name for cls in self._underlying_type ]), value, type(value).name))

ValueError: expected a value of type float, int8, int16, int32, int64 or int, got time of type str

I have tried leaving the field as a datetime object and now converted into a float (UTC time). I am missing something but I have no idea what it is, any help would be appreciated.

Thanks

-g

I'm not sure offhand, without being able to run code to investigate. Can you provide a complete minimal example that reproduces the problem?

Bryan

···

On Oct 1, 2015, at 2:18 PM, [email protected] wrote:

I am using Python 3.3 (anaconda) and bokeh 1.0

I am trying to create a histogram that shows the number of failures over time. The granularity is per second and I am having no luck getting it to work. I have create a DataFrame that contains the time of the failure, as well as the schema (and other items). The DataFrame is created from a list of dictionary items, which contains schema as a string and time as a float. The dataframe looks correct when I view the contents, however everytime I try to create the histogram it fails. This is the line that creates the histogram:

hist = Histogram(df, 100, 'time', xscale='datetime', color='schema', title="fails")

The error I am getting is:

  File "/Users/g/anaconda/envs/py3k/lib/python3.3/site-packages/bokeh/properties.py", line 485, in validate
    (nice_join([ cls.__name__ for cls in self._underlying_type ]), value, type(value).__name__))
ValueError: expected a value of type float, int8, int16, int32, int64 or int, got time of type str

I have tried leaving the field as a datetime object and now converted into a float (UTC time). I am missing something but I have no idea what it is, any help would be appreciated.

Thanks
-g

--
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/98be2fa3-d221-4bba-8f13-f8847454cfce%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

I have a small example, I saved my dataframe data using pickle and then read it back into a dataframe, the graph example code is only a few lines long.

-g

graph_example.py (359 Bytes)

graph_frame.pickle (62.6 KB)

···

On Saturday, October 3, 2015 at 1:37:41 PM UTC-5, Bryan Van de ven wrote:

I’m not sure offhand, without being able to run code to investigate. Can you provide a complete minimal example that reproduces the problem?

Bryan

On Oct 1, 2015, at 2:18 PM, [email protected] wrote:

I am using Python 3.3 (anaconda) and bokeh 1.0

I am trying to create a histogram that shows the number of failures over time. The granularity is per second and I am having no luck getting it to work. I have create a DataFrame that contains the time of the failure, as well as the schema (and other items). The DataFrame is created from a list of dictionary items, which contains schema as a string and time as a float. The dataframe looks correct when I view the contents, however everytime I try to create the histogram it fails. This is the line that creates the histogram:

hist = Histogram(df, 100, ‘time’, xscale=‘datetime’, color=‘schema’, title=“fails”)

The error I am getting is:

File “/Users/g/anaconda/envs/py3k/lib/python3.3/site-packages/bokeh/properties.py”, line 485, in validate

(nice_join([ cls.__name__ for cls in self._underlying_type ]), value, type(value).__name__))

ValueError: expected a value of type float, int8, int16, int32, int64 or int, got time of type str

I have tried leaving the field as a datetime object and now converted into a float (UTC time). I am missing something but I have no idea what it is, any help would be appreciated.

Thanks

-g


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/98be2fa3-d221-4bba-8f13-f8847454cfce%40continuum.io.

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

Hi, I was able to get something plotted with a little bit of work. The thing that I’d need to look into is the scale, because I had to zoom the axes manually to get the attached view.

The only thing I changed about what you were doing was that I changed the histogram line to:

hist = Histogram(df, ‘time’, color=‘DarkGrey’, title=“fails”)

``

A histogram simply bins a variable and applies a summary statistic to each bin. I need to add other stat types, but currently that is a count. So, this is what you get for the data below. I’d consider other plotting options, including something that would plot the data across a continuous time axis.

Btw, this is also another option for how you could use the histogram chart:

hist = Histogram(df, ‘time’, color=‘reason’, title=“fails”, legend=True)

``

···

On Wednesday, October 14, 2015 at 3:45:43 PM UTC-5, [email protected] wrote:

I have a small example, I saved my dataframe data using pickle and then read it back into a dataframe, the graph example code is only a few lines long.

-g

On Saturday, October 3, 2015 at 1:37:41 PM UTC-5, Bryan Van de ven wrote:

I’m not sure offhand, without being able to run code to investigate. Can you provide a complete minimal example that reproduces the problem?

Bryan

On Oct 1, 2015, at 2:18 PM, [email protected] wrote:

I am using Python 3.3 (anaconda) and bokeh 1.0

I am trying to create a histogram that shows the number of failures over time. The granularity is per second and I am having no luck getting it to work. I have create a DataFrame that contains the time of the failure, as well as the schema (and other items). The DataFrame is created from a list of dictionary items, which contains schema as a string and time as a float. The dataframe looks correct when I view the contents, however everytime I try to create the histogram it fails. This is the line that creates the histogram:

hist = Histogram(df, 100, ‘time’, xscale=‘datetime’, color=‘schema’, title=“fails”)

The error I am getting is:

File “/Users/g/anaconda/envs/py3k/lib/python3.3/site-packages/bokeh/properties.py”, line 485, in validate

(nice_join([ cls.__name__ for cls in self._underlying_type ]), value, type(value).__name__))

ValueError: expected a value of type float, int8, int16, int32, int64 or int, got time of type str

I have tried leaving the field as a datetime object and now converted into a float (UTC time). I am missing something but I have no idea what it is, any help would be appreciated.

Thanks

-g


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/98be2fa3-d221-4bba-8f13-f8847454cfce%40continuum.io.

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

Oh, also here it is with your (i assume) bins set to 100 to give more detail.

hist = Histogram(df, ‘time’, bins=100, color=‘reason’, title=“fails”, legend=True)

``

···

On Friday, October 2, 2015 at 7:20:09 AM UTC-5, [email protected] wrote:

I am using Python 3.3 (anaconda) and bokeh 1.0

I am trying to create a histogram that shows the number of failures over time. The granularity is per second and I am having no luck getting it to work. I have create a DataFrame that contains the time of the failure, as well as the schema (and other items). The DataFrame is created from a list of dictionary items, which contains schema as a string and time as a float. The dataframe looks correct when I view the contents, however everytime I try to create the histogram it fails. This is the line that creates the histogram:

hist = Histogram(df, 100, ‘time’, xscale=‘datetime’, color=‘schema’, title=“fails”)

The error I am getting is:

File “/Users/g/anaconda/envs/py3k/lib/python3.3/site-packages/bokeh/properties.py”, line 485, in validate

(nice_join([ cls.name for cls in self._underlying_type ]), value, type(value).name))

ValueError: expected a value of type float, int8, int16, int32, int64 or int, got time of type str

I have tried leaving the field as a datetime object and now converted into a float (UTC time). I am missing something but I have no idea what it is, any help would be appreciated.

Thanks

-g

I still get the same error. I am using python 3 which might be the issue. Or maybe I have a different version of bokeh?

···

On Wednesday, October 14, 2015 at 4:04:11 PM UTC-5, Nick Roth wrote:

Oh, also here it is with your (i assume) bins set to 100 to give more detail.

hist = Histogram(df, ‘time’, bins=100, color=‘reason’, title=“fails”, legend=True)

``

On Friday, October 2, 2015 at 7:20:09 AM UTC-5, [email protected] wrote:

I am using Python 3.3 (anaconda) and bokeh 1.0

I am trying to create a histogram that shows the number of failures over time. The granularity is per second and I am having no luck getting it to work. I have create a DataFrame that contains the time of the failure, as well as the schema (and other items). The DataFrame is created from a list of dictionary items, which contains schema as a string and time as a float. The dataframe looks correct when I view the contents, however everytime I try to create the histogram it fails. This is the line that creates the histogram:

hist = Histogram(df, 100, ‘time’, xscale=‘datetime’, color=‘schema’, title=“fails”)

The error I am getting is:

File “/Users/g/anaconda/envs/py3k/lib/python3.3/site-packages/bokeh/properties.py”, line 485, in validate

(nice_join([ cls.name for cls in self._underlying_type ]), value, type(value).name))

ValueError: expected a value of type float, int8, int16, int32, int64 or int, got time of type str

I have tried leaving the field as a datetime object and now converted into a float (UTC time). I am missing something but I have no idea what it is, any help would be appreciated.

Thanks

-g

Can you report the version of Bokeh? E.g.,

  In [22]: import bokeh

  In [23]: bokeh.__version__
  Out[23]: '0.10.0'

The charts interface changed considerably in the 0.10 release. If you the old (deprecated) charts they are in bokeh._legacy_charts for now.

Bryan

···

On Oct 14, 2015, at 4:12 PM, [email protected] wrote:

I still get the same error. I am using python 3 which might be the issue. Or maybe I have a different version of bokeh?

On Wednesday, October 14, 2015 at 4:04:11 PM UTC-5, Nick Roth wrote:
Oh, also here it is with your (i assume) bins set to 100 to give more detail.

hist = Histogram(df, 'time', bins=100, color='reason', title="fails", legend=True)

On Friday, October 2, 2015 at 7:20:09 AM UTC-5, [email protected] wrote:
I am using Python 3.3 (anaconda) and bokeh 1.0

I am trying to create a histogram that shows the number of failures over time. The granularity is per second and I am having no luck getting it to work. I have create a DataFrame that contains the time of the failure, as well as the schema (and other items). The DataFrame is created from a list of dictionary items, which contains schema as a string and time as a float. The dataframe looks correct when I view the contents, however everytime I try to create the histogram it fails. This is the line that creates the histogram:

hist = Histogram(df, 100, 'time', xscale='datetime', color='schema', title="fails")

The error I am getting is:

  File "/Users/g/anaconda/envs/py3k/lib/python3.3/site-packages/bokeh/properties.py", line 485, in validate
    (nice_join([ cls.__name__ for cls in self._underlying_type ]), value, type(value).__name__))
ValueError: expected a value of type float, int8, int16, int32, int64 or int, got time of type str

I have tried leaving the field as a datetime object and now converted into a float (UTC time). I am missing something but I have no idea what it is, any help would be appreciated.

Thanks
-g

--
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/90c78b2c-e503-4ace-90ee-f5157318c735%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

I am running 0.10.0dev1

/Users/gary/anaconda/envs/py3k/bin/python.app /Users/gary/Projects/load_stats/src/graph/graph_example.py

0.10.0dev1

···

On Thursday, October 15, 2015 at 6:31:18 AM UTC-5, Bryan Van de ven wrote:

Can you report the version of Bokeh? E.g.,

    In [22]: import bokeh



    In [23]: bokeh.__version__

    Out[23]: '0.10.0'

The charts interface changed considerably in the 0.10 release. If you the old (deprecated) charts they are in bokeh._legacy_charts for now.

Bryan

On Oct 14, 2015, at 4:12 PM, [email protected] wrote:

I still get the same error. I am using python 3 which might be the issue. Or maybe I have a different version of bokeh?

On Wednesday, October 14, 2015 at 4:04:11 PM UTC-5, Nick Roth wrote:

Oh, also here it is with your (i assume) bins set to 100 to give more detail.

hist = Histogram(df, ‘time’, bins=100, color=‘reason’, title=“fails”, legend=True)

On Friday, October 2, 2015 at 7:20:09 AM UTC-5, [email protected] wrote:

I am using Python 3.3 (anaconda) and bokeh 1.0

I am trying to create a histogram that shows the number of failures over time. The granularity is per second and I am having no luck getting it to work. I have create a DataFrame that contains the time of the failure, as well as the schema (and other items). The DataFrame is created from a list of dictionary items, which contains schema as a string and time as a float. The dataframe looks correct when I view the contents, however everytime I try to create the histogram it fails. This is the line that creates the histogram:

hist = Histogram(df, 100, ‘time’, xscale=‘datetime’, color=‘schema’, title=“fails”)

The error I am getting is:

File “/Users/g/anaconda/envs/py3k/lib/python3.3/site-packages/bokeh/properties.py”, line 485, in validate

(nice_join([ cls.__name__ for cls in self._underlying_type ]), value, type(value).__name__))

ValueError: expected a value of type float, int8, int16, int32, int64 or int, got time of type str

I have tried leaving the field as a datetime object and now converted into a float (UTC time). I am missing something but I have no idea what it is, any help would be appreciated.

Thanks

-g


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/90c78b2c-e503-4ace-90ee-f5157318c735%40continuum.io.

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

Not sure why you are still having that issue, unless you still have 100 has the second argument. I just tried this and it works.

conda create -n bokeh3_official python=3 pandas bokeh
source activate bokeh3_official
python graph_example.py

``

To be safe, use keyword arguments to designate your input.

hist = Histogram(df, values=‘time’, bins=100, color=‘reason’, title=‘fails’, legend=True)

``

graph_example.py (380 Bytes)

···

On Thursday, October 15, 2015 at 11:20:51 AM UTC-5, [email protected] wrote:

I am running 0.10.0dev1

/Users/gary/anaconda/envs/py3k/bin/python.app /Users/gary/Projects/load_stats/src/graph/graph_example.py

0.10.0dev1

On Thursday, October 15, 2015 at 6:31:18 AM UTC-5, Bryan Van de ven wrote:

Can you report the version of Bokeh? E.g.,

    In [22]: import bokeh



    In [23]: bokeh.__version__

    Out[23]: '0.10.0'

The charts interface changed considerably in the 0.10 release. If you the old (deprecated) charts they are in bokeh._legacy_charts for now.

Bryan

On Oct 14, 2015, at 4:12 PM, [email protected] wrote:

I still get the same error. I am using python 3 which might be the issue. Or maybe I have a different version of bokeh?

On Wednesday, October 14, 2015 at 4:04:11 PM UTC-5, Nick Roth wrote:

Oh, also here it is with your (i assume) bins set to 100 to give more detail.

hist = Histogram(df, ‘time’, bins=100, color=‘reason’, title=“fails”, legend=True)

On Friday, October 2, 2015 at 7:20:09 AM UTC-5, [email protected] wrote:

I am using Python 3.3 (anaconda) and bokeh 1.0

I am trying to create a histogram that shows the number of failures over time. The granularity is per second and I am having no luck getting it to work. I have create a DataFrame that contains the time of the failure, as well as the schema (and other items). The DataFrame is created from a list of dictionary items, which contains schema as a string and time as a float. The dataframe looks correct when I view the contents, however everytime I try to create the histogram it fails. This is the line that creates the histogram:

hist = Histogram(df, 100, ‘time’, xscale=‘datetime’, color=‘schema’, title=“fails”)

The error I am getting is:

File “/Users/g/anaconda/envs/py3k/lib/python3.3/site-packages/bokeh/properties.py”, line 485, in validate

(nice_join([ cls.__name__ for cls in self._underlying_type ]), value, type(value).__name__))

ValueError: expected a value of type float, int8, int16, int32, int64 or int, got time of type str

I have tried leaving the field as a datetime object and now converted into a float (UTC time). I am missing something but I have no idea what it is, any help would be appreciated.

Thanks

-g


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/90c78b2c-e503-4ace-90ee-f5157318c735%40continuum.io.

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

I copied your line below and got this.

/Users/gary/anaconda/envs/py3k/bin/python.app /Users/gary/Projects/load_stats/src/graph/graph_example.py

0.10.0dev1

Traceback (most recent call last):

File “/Users/gary/Projects/load_stats/src/graph/graph_example.py”, line 22, in

main()

File “/Users/gary/Projects/load_stats/src/graph/graph_example.py”, line 16, in main

hist = Histogram(df, values=‘time’, bins=100, color=‘reason’, title=‘fails’, legend=True)

TypeError: Histogram() got multiple values for argument ‘values’

Process finished with exit code 1

···

On Thursday, October 15, 2015 at 11:31:24 AM UTC-5, Nick Roth wrote:

Not sure why you are still having that issue, unless you still have 100 has the second argument. I just tried this and it works.

conda create -n bokeh3_official python=3 pandas bokeh
source activate bokeh3_official
python graph_example.py

``

To be safe, use keyword arguments to designate your input.

hist = Histogram(df, values=‘time’, bins=100, color=‘reason’, title=‘fails’, legend=True)

``

On Thursday, October 15, 2015 at 11:20:51 AM UTC-5, [email protected] wrote:

I am running 0.10.0dev1

/Users/gary/anaconda/envs/py3k/bin/python.app /Users/gary/Projects/load_stats/src/graph/graph_example.py

0.10.0dev1

On Thursday, October 15, 2015 at 6:31:18 AM UTC-5, Bryan Van de ven wrote:

Can you report the version of Bokeh? E.g.,

    In [22]: import bokeh



    In [23]: bokeh.__version__

    Out[23]: '0.10.0'

The charts interface changed considerably in the 0.10 release. If you the old (deprecated) charts they are in bokeh._legacy_charts for now.

Bryan

On Oct 14, 2015, at 4:12 PM, [email protected] wrote:

I still get the same error. I am using python 3 which might be the issue. Or maybe I have a different version of bokeh?

On Wednesday, October 14, 2015 at 4:04:11 PM UTC-5, Nick Roth wrote:

Oh, also here it is with your (i assume) bins set to 100 to give more detail.

hist = Histogram(df, ‘time’, bins=100, color=‘reason’, title=“fails”, legend=True)

On Friday, October 2, 2015 at 7:20:09 AM UTC-5, [email protected] wrote:

I am using Python 3.3 (anaconda) and bokeh 1.0

I am trying to create a histogram that shows the number of failures over time. The granularity is per second and I am having no luck getting it to work. I have create a DataFrame that contains the time of the failure, as well as the schema (and other items). The DataFrame is created from a list of dictionary items, which contains schema as a string and time as a float. The dataframe looks correct when I view the contents, however everytime I try to create the histogram it fails. This is the line that creates the histogram:

hist = Histogram(df, 100, ‘time’, xscale=‘datetime’, color=‘schema’, title=“fails”)

The error I am getting is:

File “/Users/g/anaconda/envs/py3k/lib/python3.3/site-packages/bokeh/properties.py”, line 485, in validate

(nice_join([ cls.__name__ for cls in self._underlying_type ]), value, type(value).__name__))

ValueError: expected a value of type float, int8, int16, int32, int64 or int, got time of type str

I have tried leaving the field as a datetime object and now converted into a float (UTC time). I am missing something but I have no idea what it is, any help would be appreciated.

Thanks

-g


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/90c78b2c-e503-4ace-90ee-f5157318c735%40continuum.io.

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

So, I created a new virtual env exactly like yours. I am now getting a graph but nothing is displayed on it. I now have the 0.10.1 version of bokeh, python 3.5. It seems like I address one issue and another pops right up to take its place.

···

On Thursday, October 15, 2015 at 11:36:55 AM UTC-5, [email protected] wrote:

I copied your line below and got this.

/Users/gary/anaconda/envs/py3k/bin/python.app /Users/gary/Projects/load_stats/src/graph/graph_example.py

0.10.0dev1

Traceback (most recent call last):

File “/Users/gary/Projects/load_stats/src/graph/graph_example.py”, line 22, in

main()

File “/Users/gary/Projects/load_stats/src/graph/graph_example.py”, line 16, in main

hist = Histogram(df, values=‘time’, bins=100, color=‘reason’, title=‘fails’, legend=True)

TypeError: Histogram() got multiple values for argument ‘values’

Process finished with exit code 1

On Thursday, October 15, 2015 at 11:31:24 AM UTC-5, Nick Roth wrote:

Not sure why you are still having that issue, unless you still have 100 has the second argument. I just tried this and it works.

conda create -n bokeh3_official python=3 pandas bokeh
source activate bokeh3_official
python graph_example.py

``

To be safe, use keyword arguments to designate your input.

hist = Histogram(df, values=‘time’, bins=100, color=‘reason’, title=‘fails’, legend=True)

``

On Thursday, October 15, 2015 at 11:20:51 AM UTC-5, gary[email protected] wrote:

I am running 0.10.0dev1

/Users/gary/anaconda/envs/py3k/bin/python.app /Users/gary/Projects/load_stats/src/graph/graph_example.py

0.10.0dev1

On Thursday, October 15, 2015 at 6:31:18 AM UTC-5, Bryan Van de ven wrote:

Can you report the version of Bokeh? E.g.,

    In [22]: import bokeh



    In [23]: bokeh.__version__

    Out[23]: '0.10.0'

The charts interface changed considerably in the 0.10 release. If you the old (deprecated) charts they are in bokeh._legacy_charts for now.

Bryan

On Oct 14, 2015, at 4:12 PM, [email protected] wrote:

I still get the same error. I am using python 3 which might be the issue. Or maybe I have a different version of bokeh?

On Wednesday, October 14, 2015 at 4:04:11 PM UTC-5, Nick Roth wrote:

Oh, also here it is with your (i assume) bins set to 100 to give more detail.

hist = Histogram(df, ‘time’, bins=100, color=‘reason’, title=“fails”, legend=True)

On Friday, October 2, 2015 at 7:20:09 AM UTC-5, [email protected] wrote:

I am using Python 3.3 (anaconda) and bokeh 1.0

I am trying to create a histogram that shows the number of failures over time. The granularity is per second and I am having no luck getting it to work. I have create a DataFrame that contains the time of the failure, as well as the schema (and other items). The DataFrame is created from a list of dictionary items, which contains schema as a string and time as a float. The dataframe looks correct when I view the contents, however everytime I try to create the histogram it fails. This is the line that creates the histogram:

hist = Histogram(df, 100, ‘time’, xscale=‘datetime’, color=‘schema’, title=“fails”)

The error I am getting is:

File “/Users/g/anaconda/envs/py3k/lib/python3.3/site-packages/bokeh/properties.py”, line 485, in validate

(nice_join([ cls.__name__ for cls in self._underlying_type ]), value, type(value).__name__))

ValueError: expected a value of type float, int8, int16, int32, int64 or int, got time of type str

I have tried leaving the field as a datetime object and now converted into a float (UTC time). I am missing something but I have no idea what it is, any help would be appreciated.

Thanks

-g


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/90c78b2c-e503-4ace-90ee-f5157318c735%40continuum.io.

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

I think the issue is that my xaxis is displaying such a wide range of times that all of my data is scrunched down to one very narrow line. I can’t even see it unless I expand the graph and even then it is just a razor thin line.

I need to figure out how to set the min/max on the xaxis I guess…

···

On Thursday, October 15, 2015 at 12:31:37 PM UTC-5, [email protected] wrote:

So, I created a new virtual env exactly like yours. I am now getting a graph but nothing is displayed on it. I now have the 0.10.1 version of bokeh, python 3.5. It seems like I address one issue and another pops right up to take its place.

On Thursday, October 15, 2015 at 11:36:55 AM UTC-5, [email protected] wrote:

I copied your line below and got this.

/Users/gary/anaconda/envs/py3k/bin/python.app /Users/gary/Projects/load_stats/src/graph/graph_example.py

0.10.0dev1

Traceback (most recent call last):

File “/Users/gary/Projects/load_stats/src/graph/graph_example.py”, line 22, in

main()

File “/Users/gary/Projects/load_stats/src/graph/graph_example.py”, line 16, in main

hist = Histogram(df, values=‘time’, bins=100, color=‘reason’, title=‘fails’, legend=True)

TypeError: Histogram() got multiple values for argument ‘values’

Process finished with exit code 1

On Thursday, October 15, 2015 at 11:31:24 AM UTC-5, Nick Roth wrote:

Not sure why you are still having that issue, unless you still have 100 has the second argument. I just tried this and it works.

conda create -n bokeh3_official python=3 pandas bokeh
source activate bokeh3_official
python graph_example.py

``

To be safe, use keyword arguments to designate your input.

hist = Histogram(df, values=‘time’, bins=100, color=‘reason’, title=‘fails’, legend=True)

``

On Thursday, October 15, 2015 at 11:20:51 AM UTC-5, [email protected] wrote:

I am running 0.10.0dev1

/Users/gary/anaconda/envs/py3k/bin/python.app /Users/gary/Projects/load_stats/src/graph/graph_example.py

0.10.0dev1

On Thursday, October 15, 2015 at 6:31:18 AM UTC-5, Bryan Van de ven wrote:

Can you report the version of Bokeh? E.g.,

    In [22]: import bokeh



    In [23]: bokeh.__version__

    Out[23]: '0.10.0'

The charts interface changed considerably in the 0.10 release. If you the old (deprecated) charts they are in bokeh._legacy_charts for now.

Bryan

On Oct 14, 2015, at 4:12 PM, [email protected] wrote:

I still get the same error. I am using python 3 which might be the issue. Or maybe I have a different version of bokeh?

On Wednesday, October 14, 2015 at 4:04:11 PM UTC-5, Nick Roth wrote:

Oh, also here it is with your (i assume) bins set to 100 to give more detail.

hist = Histogram(df, ‘time’, bins=100, color=‘reason’, title=“fails”, legend=True)

On Friday, October 2, 2015 at 7:20:09 AM UTC-5, [email protected] wrote:

I am using Python 3.3 (anaconda) and bokeh 1.0

I am trying to create a histogram that shows the number of failures over time. The granularity is per second and I am having no luck getting it to work. I have create a DataFrame that contains the time of the failure, as well as the schema (and other items). The DataFrame is created from a list of dictionary items, which contains schema as a string and time as a float. The dataframe looks correct when I view the contents, however everytime I try to create the histogram it fails. This is the line that creates the histogram:

hist = Histogram(df, 100, ‘time’, xscale=‘datetime’, color=‘schema’, title=“fails”)

The error I am getting is:

File “/Users/g/anaconda/envs/py3k/lib/python3.3/site-packages/bokeh/properties.py”, line 485, in validate

(nice_join([ cls.__name__ for cls in self._underlying_type ]), value, type(value).__name__))

ValueError: expected a value of type float, int8, int16, int32, int64 or int, got time of type str

I have tried leaving the field as a datetime object and now converted into a float (UTC time). I am missing something but I have no idea what it is, any help would be appreciated.

Thanks

-g


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/90c78b2c-e503-4ace-90ee-f5157318c735%40continuum.io.

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

Yeah sorry, that was some of my comments in my first response. I need to see why the bounds are set correctly, but for now you can manually zoom each axis manually by hovering over each and scrolling to get what I showed you.

The object you get back is a subclass of Plot, so everything is there for manual manipulation as needed.

···

On Thursday, October 15, 2015 at 2:20:03 PM UTC-5, [email protected] wrote:

I think the issue is that my xaxis is displaying such a wide range of times that all of my data is scrunched down to one very narrow line. I can’t even see it unless I expand the graph and even then it is just a razor thin line.

I need to figure out how to set the min/max on the xaxis I guess…

On Thursday, October 15, 2015 at 12:31:37 PM UTC-5, [email protected] wrote:

So, I created a new virtual env exactly like yours. I am now getting a graph but nothing is displayed on it. I now have the 0.10.1 version of bokeh, python 3.5. It seems like I address one issue and another pops right up to take its place.

On Thursday, October 15, 2015 at 11:36:55 AM UTC-5, [email protected] wrote:

I copied your line below and got this.

/Users/gary/anaconda/envs/py3k/bin/python.app /Users/gary/Projects/load_stats/src/graph/graph_example.py

0.10.0dev1

Traceback (most recent call last):

File “/Users/gary/Projects/load_stats/src/graph/graph_example.py”, line 22, in

main()

File “/Users/gary/Projects/load_stats/src/graph/graph_example.py”, line 16, in main

hist = Histogram(df, values=‘time’, bins=100, color=‘reason’, title=‘fails’, legend=True)

TypeError: Histogram() got multiple values for argument ‘values’

Process finished with exit code 1

On Thursday, October 15, 2015 at 11:31:24 AM UTC-5, Nick Roth wrote:

Not sure why you are still having that issue, unless you still have 100 has the second argument. I just tried this and it works.

conda create -n bokeh3_official python=3 pandas bokeh
source activate bokeh3_official
python graph_example.py

``

To be safe, use keyword arguments to designate your input.

hist = Histogram(df, values=‘time’, bins=100, color=‘reason’, title=‘fails’, legend=True)

``

On Thursday, October 15, 2015 at 11:20:51 AM UTC-5, [email protected] wrote:

I am running 0.10.0dev1

/Users/gary/anaconda/envs/py3k/bin/python.app /Users/gary/Projects/load_stats/src/graph/graph_example.py

0.10.0dev1

On Thursday, October 15, 2015 at 6:31:18 AM UTC-5, Bryan Van de ven wrote:

Can you report the version of Bokeh? E.g.,

    In [22]: import bokeh



    In [23]: bokeh.__version__

    Out[23]: '0.10.0'

The charts interface changed considerably in the 0.10 release. If you the old (deprecated) charts they are in bokeh._legacy_charts for now.

Bryan

On Oct 14, 2015, at 4:12 PM, [email protected] wrote:

I still get the same error. I am using python 3 which might be the issue. Or maybe I have a different version of bokeh?

On Wednesday, October 14, 2015 at 4:04:11 PM UTC-5, Nick Roth wrote:

Oh, also here it is with your (i assume) bins set to 100 to give more detail.

hist = Histogram(df, ‘time’, bins=100, color=‘reason’, title=“fails”, legend=True)

On Friday, October 2, 2015 at 7:20:09 AM UTC-5, [email protected] wrote:

I am using Python 3.3 (anaconda) and bokeh 1.0

I am trying to create a histogram that shows the number of failures over time. The granularity is per second and I am having no luck getting it to work. I have create a DataFrame that contains the time of the failure, as well as the schema (and other items). The DataFrame is created from a list of dictionary items, which contains schema as a string and time as a float. The dataframe looks correct when I view the contents, however everytime I try to create the histogram it fails. This is the line that creates the histogram:

hist = Histogram(df, 100, ‘time’, xscale=‘datetime’, color=‘schema’, title=“fails”)

The error I am getting is:

File “/Users/g/anaconda/envs/py3k/lib/python3.3/site-packages/bokeh/properties.py”, line 485, in validate

(nice_join([ cls.__name__ for cls in self._underlying_type ]), value, type(value).__name__))

ValueError: expected a value of type float, int8, int16, int32, int64 or int, got time of type str

I have tried leaving the field as a datetime object and now converted into a float (UTC time). I am missing something but I have no idea what it is, any help would be appreciated.

Thanks

-g


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/90c78b2c-e503-4ace-90ee-f5157318c735%40continuum.io.

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