Giter Club home page Giter Club logo

altair_widgets's People

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  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  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

altair_widgets's Issues

Menus/etc in "options" don't display current setting

...because they don't read the current encoding settings in. They should read in the appropriate value from self.settings and set menu.value to that appropriate value.

This is related to the issue of showing the default value of these parameters.

This is a significant user interface issue -- I ran into an issue where I changed the scale to "log" and wanted to go back to "linear"... so I kept on selecting "linear". This didn't have any effect because the callback is only called when menu.value changes.

Advanced options are disabled

The options button is disabled:

This has some practical effects – for example, setting an axis to type=log can't be done.

Does not work with ipywidgets 7.4.0 and altair 2.2.2

When running

interact_with(iris)

I get the following output

TypeError                                 Traceback (most recent call last)
<ipython-input-1-1ad553e9f0bc> in <module>()
      8 
      9 from altair_widgets import interact_with
---> 10 interact_with(iris)

~/code/perso/notebooks/data-science-exercises/venv/lib/python3.7/site-packages/altair_widgets/widget.py in interact_with(df, ndims, **kwargs)
     26 
     27     """
---> 28     return Interact(df, ndims=ndims, **kwargs)
     29 
     30 

~/code/perso/notebooks/data-science-exercises/venv/lib/python3.7/site-packages/altair_widgets/widget.py in __init__(self, df, ndims, show)
     56             display(self.controller)
     57 
---> 58         self.plot(show=show)
     59 
     60     def _show_advanced(self, button, disable=1):

~/code/perso/notebooks/data-science-exercises/venv/lib/python3.7/site-packages/altair_widgets/widget.py in plot(self, show)
    168         mark = mark_opts.pop('mark')
    169         Chart_mark = getattr(altair.Chart(self.df), mark)
--> 170         self.chart = Chart_mark(**mark_opts).encode(**kwargs)
    171         if show and self.show:
    172             clear_output()

~/code/perso/notebooks/data-science-exercises/venv/lib/python3.7/site-packages/altair/vegalite/v2/api.py in encode(self, *args, **kwargs)
   1238                 if condition is not Undefined:
   1239                     obj['condition'] = _wrap_in_channel_class(condition, prop)
-> 1240             kwargs[prop] = _wrap_in_channel_class(obj, prop)
   1241 
   1242 

~/code/perso/notebooks/data-science-exercises/venv/lib/python3.7/site-packages/altair/vegalite/v2/api.py in _wrap_in_channel_class(obj, prop)
   1214                 return [_wrap_in_channel_class(subobj, prop) for subobj in obj]
   1215 
-> 1216             if 'value' in obj:
   1217                 clsname += 'Value'
   1218 

TypeError: argument of type 'NoneType' is not iterable

If I then click on the button "Options", I get additional errors:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
~/code/perso/notebooks/data-science-exercises/venv/lib/python3.7/site-packages/altair_widgets/widget.py in _show_advanced(self, button, disable)
     84             c.observe(self._update, names='value')
     85 
---> 86         visible = self.controller.children[row].children[-1].visible
     87         self.controller.children[row].children[disable].disabled = not visible
     88         self.controller.children[row].children[-1].visible = not visible

AttributeError: 'VBox' object has no attribute 'visible'

Altair Widgets in Colab

Hi. I'm trying to use altair widgets in google colab with altair v1.0, but I don't know which command to use to make the interaction appear in screen.
Thank you!
altair

Add unit tests & set-up Travis

To start with, we could just do smoke tests (i.e. run the main function and make sure it doesn't error). It might be worth investigating how ipywidgets tests things, to see if we can go a bit deeper.

altair_widgets doesn’t work under altair 1.2 and ipywidgets 7.0

When I launch altair_widgets (I tried the iris example posted here on github) I get the following error:
"TraitError: The 'x' trait of an Encoding instance must be a X, but a value of class 'NoneType' (i.e. None) was specified."

If I select an x encoding I get the same message for y and then for colour.After selecting 3 encodings, I get a visualization, but then I cannot modify anything anymore.

Any ideas?
Many thanks!

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.