Coder Social home page Coder Social logo

Comments (10)

peshotan avatar peshotan commented on May 17, 2024 2

Hi Brandon and Young, I would like to work on this issue, if no one else is already working on it.

from dataprep.

bhishanpdl avatar bhishanpdl commented on May 17, 2024 2

Date: Jul 6, 2020

I am experiencing a similar problem in gcolab.

Versions

bokeh 2.1.1
dataprep 0.2.8
tornado 6.0.4

MWE:

!pip install -U tornado
!pip install dataprep

import time,os,json
import numpy as np
import pandas as pd
import seaborn as sns

import dataprep.eda as de
import bokeh.io
bokeh.io.output_notebook()

df = sns.load_dataset('titanic')
de.plot(df) # this gives nothing, does not give error but does not give any outputs.

# another attempt
from dataprep.eda import plot
plot(df) # gives no output

from dataprep.

korakot avatar korakot commented on May 17, 2024 2

After a lot of hacking (reading) into the code. Here's how to display plot in Colab.

def _report_repr_html_(self):
    from bokeh.io.notebook import load_notebook
    from bokeh.embed.notebook import notebook_content

    load_notebook(hide_banner=True)
    (script, div, cell_doc) = notebook_content(self.to_render)
    return f'{div}<script>{script}</script>'

from dataprep.eda.report import Report
Report._repr_html_ = _report_repr_html_

Now your minimal example plot(df) should work.

from dataprep.

jnwang avatar jnwang commented on May 17, 2024 1

It seems that the issue was fixed in bokeh-2.1. I cannot test it since dataprep 0.2.6 has requirement bokeh<2.1,>=2.0, which is incompatible with bokeh 2.1.1. @dovahcrow @brandonlockhart

from dataprep.

jnwang avatar jnwang commented on May 17, 2024 1

Thank you!! No worries. We will do extensive testing. :)

from dataprep.

brandonlockhart avatar brandonlockhart commented on May 17, 2024

This issue has been raised again today in a comment on our blog post. I'm getting this error on Colab:

Screen Shot 2020-06-14 at 12 48 40 PM

from dataprep.

peshotan avatar peshotan commented on May 17, 2024

Hi Brandon and Young, for the clearing the cache issue for the plot(df), it looks like it is a CORS issue that specific to Bokeh running on Chrome (bokeh/bokeh#9773).

The plot(df) function worked well in the local Jupyter notebook using Safari. However the google colab error still exists in Safari.

For NON-dataprep bokeh gridplots were again not being display in Chrome (it threw the CORS policy error again unless you clear the cache), when I changed the browser to safari it worked again.

Code for Chrome:
Screen Shot 2020-06-22 at 6 38 23 PM

Error on Chrome:
Screen Shot 2020-06-22 at 6 38 09 PM

Slightly modified code for Safari:
Screen Shot 2020-06-22 at 6 38 45 PM

Result on Safari:
Screen Shot 2020-06-22 at 6 38 37 PM

from dataprep.

brandonlockhart avatar brandonlockhart commented on May 17, 2024

@peterirani and I are getting an error in Colab with dataprep version 0.2.7. Code to reproduce:

# install
!pip install dataprep
pip install -U ipykernel

from dataprep.eda import plot
import seaborn as sbn
df = sbn.load_dataset('iris')
plot(df)

Error from the console output:
Bokeh: ERROR: Unable to run BokehJS code because BokehJS library is missing
@dovahcrow

from dataprep.

jnwang avatar jnwang commented on May 17, 2024

Thank you @korakot !! Would you like to submit a PR? We can put it in the next release cycle (in ~10 days).

from dataprep.

korakot avatar korakot commented on May 17, 2024

@jnwang I use Colab exclusively. So, I cannot test with other environment. Hope the minimal change doesn't impact other code.

Here's my PR

from dataprep.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.