Comments (6)
Is an error message like this better? I just raised a syntax error since this behaves like a syntax error.
from lux.
Yeah, the SyntaxError seems appropriate here. I wonder if we could just map this into a VisList internally and still return something, but place a warning.
from lux.
I've been trying it out and my approach is to construct a VisList if the intent list length is greater than 1 and display that inside of Vis's repr_html - but, it seems to be a bit buggy cause we are trying to have two files import each other. I think we can do it if we turn VisList into something importable (i.e just doing import VisList or something like that) -> I dont know if having two files import each other is good practice though. Alternatively, we can merge Vis and VisList together so that we can construct a VisList inside the Vis and just display the VisList and throw the error after.
from lux.
You're right, it's probably not a good idea to have the two packages import each other. I recall this is one of the reasons why I separated them out in the first place. Let's opt for just showing the error message then, but making it a bit interpretable, something along the lines of:
The intent corresponds to more than one visualizations, please replace the
Vis
constructor withVisList
to generate a list of visualizations. For more information, see: https://lux-api.readthedocs.io/en/latest/source/guide/vis.html#working-with-collections-of-visualization-with-vislist
from lux.
Resolved in #135
from lux.
The multi-vis error is not being thrown in this case, leading to other downstream errors that is harder for the user to parse.
df = pd.read_csv('https://github.com/lux-org/lux-datasets/blob/master/data/olympic.csv?raw=true')
df["Year"] = pd.to_datetime(df["Year"], format='%Y') # change pandas dtype for the column "Year" to datatype
from lux.vis.Vis import Vis
intent = ["Season=Winter|Summer","AthleteRegion"]
vis = Vis(intent,df)
vis
The check inside check_not_vislist_intent
does not check for "|" or list notation.
We should extend the check to cover all scenarios where a VisList could be generated as well in the tests.
from lux.
Related Issues (20)
- [BUG] HOT 1
- AttributeError: 'LuxDataFrame' object has no attribute '_type_override'
- [BUG] IndexError: index 0 is out of bounds for axis 0 with size 0
- Redundant data in timeseries analysis
- [BUG] ModuleNotFoundError: No module named 'fcntl' HOT 10
- ModuleNotFoundError: No module named 'termios'
- C:\Users\mukta\anaconda3\lib\site-packages\IPython\core\formatters.py:918: UserWarning: Unexpected error in rendering Lux widget and recommendations. Falling back to Pandas display.
- [BUG] Couldnt see visualizations
- [BUG]
- Issue/error on rendering dataframe using LUX
- Lux cannot import 'bmat' from SciPy
- [BUG] New pandas versions seem to break Vis aggregation HOT 2
- [Feature Request] Lux should also be extensible to make it easy for external libraries with pandas API to support.
- Can I put lux into Shiny web application (shiny for python)?
- [Feature Request] Reproducible builds
- [BUG] Current Version of The-Littlest-Jupyter-Hub not Supported
- [BUG]
- [BUG] Exporting to Streamlit
- [BUG]Failed to load model class 'LuxModel' from module 'luxwidget' HOT 1
- [BUG] Everything goes well but no 'Toggle Pandas/Lux' bottom HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lux.