Giter VIP home page Giter VIP logo

scipy-2017-holoviews-tutorial's People

Contributors

ceball avatar jbednar avatar jlstevens avatar michaelaye avatar philippjfr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

scipy-2017-holoviews-tutorial's Issues

Video?

Is the video for this tutorial going to be uploaded? I cannot seem to find it on the enthought youtube channel.

AttributeError: type object 'Document' has no attribute '_event_for_attribute_change'

Hi

I am running Holoviews version 1.8.3 in jupyter notebook (miniconda3 on windows 10).

When i run the below code,
hv.HoloMap({i:hv.Curve([i, i**2]) for i in range(10)}, kdims={'index'})

I get this error:
`---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
~/miniconda3/lib/python3.6/site-packages/IPython/core/formatters.py in call(self, obj)
330 pass
331 else:
--> 332 return printer(obj)
333 # Finally look for special method names
334 method = get_real_method(obj, self.print_method)

~/miniconda3/lib/python3.6/site-packages/holoviews/ipython/display_hooks.py in pprint_display(obj)
257 if not ip.display_formatter.formatters['text/plain'].pprint:
258 return None
--> 259 return display(obj, raw=True)
260
261

~/miniconda3/lib/python3.6/site-packages/holoviews/ipython/display_hooks.py in display(obj, raw, **kwargs)
243 elif isinstance(obj, (HoloMap, DynamicMap)):
244 with option_state(obj):
--> 245 html = map_display(obj)
246 else:
247 return repr(obj) if raw else IPython.display.display(obj, **kwargs)

~/miniconda3/lib/python3.6/site-packages/holoviews/ipython/display_hooks.py in wrapped(element)
129 try:
130 html = fn(element,
--> 131 max_frames=OutputSettings.options['max_frames'])
132
133 # Only want to add to the archive for one display hook...

~/miniconda3/lib/python3.6/site-packages/holoviews/ipython/display_hooks.py in map_display(vmap, max_frames)
198 return None
199
--> 200 return render(vmap)
201
202

~/miniconda3/lib/python3.6/site-packages/holoviews/ipython/display_hooks.py in render(obj, **kwargs)
59 if renderer.fig == 'pdf':
60 renderer = renderer.instance(fig='png')
---> 61 return renderer.html(obj, **kwargs)
62
63

~/miniconda3/lib/python3.6/site-packages/holoviews/plotting/renderer.py in html(self, obj, fmt, css, comm, **kwargs)
254 """
255 plot, fmt = self._validate(obj, fmt)
--> 256 figdata, _ = self(plot, fmt, **kwargs)
257 if css is None: css = self.css
258

~/miniconda3/lib/python3.6/site-packages/holoviews/plotting/bokeh/renderer.py in call(self, obj, fmt, doc)
77 return self.server_doc(plot, doc), info
78 elif isinstance(plot, tuple(self.widgets.values())):
---> 79 return plot(), info
80 elif fmt == 'png':
81 if bokeh_version < '0.12.6':

~/miniconda3/lib/python3.6/site-packages/holoviews/plotting/widgets/init.py in call(self)
137
138 def call(self):
--> 139 return self.render_html(self._get_data())
140
141

~/miniconda3/lib/python3.6/site-packages/holoviews/plotting/bokeh/widgets.py in _get_data(self)
239 # Get initial frame to draw immediately
240 init_frame = self._plot_figure(0, fig_format='html')
--> 241 data = super(BokehWidget, self)._get_data()
242 return dict(data, init_frame=init_frame)
243

~/miniconda3/lib/python3.6/site-packages/holoviews/plotting/widgets/init.py in _get_data(self)
364
365 def _get_data(self):
--> 366 data = super(SelectionWidget, self)._get_data()
367 widgets, dimensions, init_dim_vals = self.get_widgets()
368 key_data = {} if self.plot.dynamic else self.get_key_data()

~/miniconda3/lib/python3.6/site-packages/holoviews/plotting/widgets/init.py in _get_data(self)
153 json_path = json_path + '/'
154 dynamic = json.dumps(self.plot.dynamic) if self.plot.dynamic else 'false'
--> 155 return dict(CDN=CDN, frames=self.get_frames(), delay=delay,
156 cached=cached, load_json=load_json, mode=mode, id=self.id,
157 Nframes=len(self.plot), widget_name=name, json_path=json_path,

~/miniconda3/lib/python3.6/site-packages/holoviews/plotting/widgets/init.py in get_frames(self)
167 if self.embed:
168 frames = OrderedDict([(idx, self._plot_figure(idx))
--> 169 for idx in range(len(self.plot))])
170 else:
171 frames = {}

~/miniconda3/lib/python3.6/site-packages/holoviews/plotting/widgets/init.py in (.0)
167 if self.embed:
168 frames = OrderedDict([(idx, self._plot_figure(idx))
--> 169 for idx in range(len(self.plot))])
170 else:
171 frames = {}

~/miniconda3/lib/python3.6/site-packages/holoviews/plotting/bokeh/widgets.py in _plot_figure(self, idx, fig_format)
260 msg = self.renderer.html(self.plot, fig_format)
261 else:
--> 262 json_patch = self.renderer.diff(self.plot, serialize=False)
263 msg = dict(patch=json_patch, root=self.plot.state._id)
264 msg = serialize_json(msg)

~/miniconda3/lib/python3.6/site-packages/holoviews/plotting/bokeh/renderer.py in diff(self, plot, serialize)
231 for h in handles]
232 plot.traverse(lambda x: setattr(x, '_updated', False))
--> 233 patch = compute_static_patch(plot.document, plotobjects)
234 processed = self._apply_post_render_hooks(patch, plot, 'json')
235 return serialize_json(processed) if serialize else processed

~/miniconda3/lib/python3.6/site-packages/holoviews/plotting/bokeh/util.py in compute_static_patch(document, models)
383 priority = float('inf')
384 for key, val in obj['attributes'].items():
--> 385 event = Document._event_for_attribute_change(references,
386 obj, key, val,
387 value_refs)

AttributeError: type object 'Document' has no attribute '_event_for_attribute_change'

:HoloMap [index]
:Curve [x] (y)

`

Please help!

Thanks!

Data download

So it could absolutely just be me misunderstanding the instructions, but when I ran 'python download_sample_data.py' from the root of the clone of this repo (in my case, that's ./scipy-2017-holoviews-tutorial), the nyc_taxi.csv file was downloaded to the ./scipy-2017-holoviews-tutorial/data/ directory and it looks like it needs to be in the ./scipy-2017-holoviews-tutorial/notebooks/assets/ directory.

Error when running notebook 04-exploration-with-containers offline

Hi,
I'm working in an offline environment -
When running the *HoloMaps * cell I get the following error (I think it is because there is no connection to the Internet).
I think I need to use the bokeh INLINE parameter - but i'm not sure how?
Any suggestions?
Thx

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
C:\ProgramData\Anaconda3\lib\site-packages\IPython\core\formatters.py in __call__(self, obj)
    305                 pass
    306             else:
--> 307                 return printer(obj)
    308             # Finally look for special method names
    309             method = get_real_method(obj, self.print_method)

C:\ProgramData\Anaconda3\lib\site-packages\holoviews\ipython\display_hooks.py in pprint_display(obj)
    257     if not ip.display_formatter.formatters['text/plain'].pprint:
    258         return None
--> 259     return display(obj, raw=True)
    260 
    261 

C:\ProgramData\Anaconda3\lib\site-packages\holoviews\ipython\display_hooks.py in display(obj, raw, **kwargs)
    243     elif isinstance(obj, (HoloMap, DynamicMap)):
    244         with option_state(obj):
--> 245             html = map_display(obj)
    246     else:
    247         return repr(obj) if raw else IPython.display.display(obj, **kwargs)

C:\ProgramData\Anaconda3\lib\site-packages\holoviews\ipython\display_hooks.py in wrapped(element)
    129         try:
    130             html = fn(element,
--> 131                       max_frames=OutputSettings.options['max_frames'])
    132 
    133             # Only want to add to the archive for one display hook...

C:\ProgramData\Anaconda3\lib\site-packages\holoviews\ipython\display_hooks.py in map_display(vmap, max_frames)
    198         return None
    199 
--> 200     return render(vmap)
    201 
    202 

C:\ProgramData\Anaconda3\lib\site-packages\holoviews\ipython\display_hooks.py in render(obj, **kwargs)
     59     if renderer.fig == 'pdf':
     60         renderer = renderer.instance(fig='png')
---> 61     return renderer.html(obj, **kwargs)
     62 
     63 

C:\ProgramData\Anaconda3\lib\site-packages\holoviews\plotting\renderer.py in html(self, obj, fmt, css, comm, **kwargs)
    254         """
    255         plot, fmt =  self._validate(obj, fmt)
--> 256         figdata, _ = self(plot, fmt, **kwargs)
    257         if css is None: css = self.css
    258 

C:\ProgramData\Anaconda3\lib\site-packages\holoviews\plotting\bokeh\renderer.py in __call__(self, obj, fmt, doc)
     77             return self.server_doc(plot, doc), info
     78         elif isinstance(plot, tuple(self.widgets.values())):
---> 79             return plot(), info
     80         elif fmt == 'png':
     81             if bokeh_version < '0.12.6':

C:\ProgramData\Anaconda3\lib\site-packages\holoviews\plotting\widgets\__init__.py in __call__(self)
    137 
    138     def __call__(self):
--> 139         return self.render_html(self._get_data())
    140 
    141 

C:\ProgramData\Anaconda3\lib\site-packages\holoviews\plotting\bokeh\widgets.py in _get_data(self)
    239         # Get initial frame to draw immediately
    240         init_frame = self._plot_figure(0, fig_format='html')
--> 241         data = super(BokehWidget, self)._get_data()
    242         return dict(data, init_frame=init_frame)
    243 

C:\ProgramData\Anaconda3\lib\site-packages\holoviews\plotting\widgets\__init__.py in _get_data(self)
    364 
    365     def _get_data(self):
--> 366         data = super(SelectionWidget, self)._get_data()
    367         widgets, dimensions, init_dim_vals = self.get_widgets()
    368         key_data = {} if self.plot.dynamic else self.get_key_data()

C:\ProgramData\Anaconda3\lib\site-packages\holoviews\plotting\widgets\__init__.py in _get_data(self)
    153             json_path = json_path + '/'
    154         dynamic = json.dumps(self.plot.dynamic) if self.plot.dynamic else 'false'
--> 155         return dict(CDN=CDN, frames=self.get_frames(), delay=delay,
    156                     cached=cached, load_json=load_json, mode=mode, id=self.id,
    157                     Nframes=len(self.plot), widget_name=name, json_path=json_path,

C:\ProgramData\Anaconda3\lib\site-packages\holoviews\plotting\widgets\__init__.py in get_frames(self)
    167         if self.embed:
    168             frames = OrderedDict([(idx, self._plot_figure(idx))
--> 169                                   for idx in range(len(self.plot))])
    170         else:
    171             frames = {}

C:\ProgramData\Anaconda3\lib\site-packages\holoviews\plotting\widgets\__init__.py in <listcomp>(.0)
    167         if self.embed:
    168             frames = OrderedDict([(idx, self._plot_figure(idx))
--> 169                                   for idx in range(len(self.plot))])
    170         else:
    171             frames = {}

C:\ProgramData\Anaconda3\lib\site-packages\holoviews\plotting\bokeh\widgets.py in _plot_figure(self, idx, fig_format)
    260                 msg = self.renderer.html(self.plot, fig_format)
    261             else:
--> 262                 json_patch = self.renderer.diff(self.plot, serialize=False)
    263                 msg = dict(patch=json_patch, root=self.plot.state._id)
    264                 msg = serialize_json(msg)

C:\ProgramData\Anaconda3\lib\site-packages\holoviews\plotting\bokeh\renderer.py in diff(self, plot, serialize)
    231                        for h in handles]
    232         plot.traverse(lambda x: setattr(x, '_updated', False))
--> 233         patch = compute_static_patch(plot.document, plotobjects)
    234         processed = self._apply_post_render_hooks(patch, plot, 'json')
    235         return serialize_json(processed) if serialize else processed

C:\ProgramData\Anaconda3\lib\site-packages\holoviews\plotting\bokeh\util.py in compute_static_patch(document, models)
    383             priority = float('inf')
    384         for key, val in obj['attributes'].items():
--> 385             event = Document._event_for_attribute_change(references,
    386                                                          obj, key, val,
    387                                                          value_refs)

AttributeError: type object 'Document' has no attribute '_event_for_attribute_change'

Out[6]:
:HoloMap   [fc,fm]
   :Curve   [Time]   (Amplitude)

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.