-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reworked data handling, allow for smaller board prototyping, and refactored slider plugins #2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a few small questions but overall this is really well documented 👍
style=styles.PANEL_STYLE | ||
) | ||
|
||
def data_transform(self, df): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be named get_data_transform
? I'm not clear on why this method is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is more of an "abstract method" in that can be overridden by child classes and is built-in to the callback infrastructure. I think I'm going to retire that functionality in a future release since I'm not sure it really adds anything (for plots at least; for data tables I think it still has some use in some examples I've written but can refactor those).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh gotcha, that makes sense
Just added a bunch of documentation as well to try to squeeze into this PR, which demonstrates how to use some of the old and new features. |
quickboard/base/_datamanager.py
Outdated
|
||
else: | ||
self.df = pd.DataFrame() | ||
print("ERROR: Invalid data_source input. Please see documentation for list of valid input types.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you throw an actual error here now rather than just printing a message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed now
This looks great! The documentation you added is really clear. On a note of personal preference, I do find life expectancy a somewhat bleak topic for a demo. On the other hand it's memorable and understandable! |
Thanks, and yeah, I chose that default Plotly data set since it seems amenable to lots of different visualizations rather than for interesting content. Hopefully the examples with life expectancy are not too morbid to be distracting! |
This PR includes some code to address as few known shortcomings of the codebase.
DataManager
s which get added to everyDynamicPanel
. These handle things like holding data relevant to the panel, parse from file paths, etc. Now you can load inDataFrame
s right from memory, which also gives a nice performance boost (at least anecdotally) and makes it easier to experiment. They also allow the new feature of using another panel's selected data as input, with documentation coming soon!PlotPanel
! One can use thestart_app
command to run an instance where theboard
input just receives aPlotPanel
to view, or aPlotPanel
with some plugins, etc. This should allow for very fast prototyping, and documentation with very simple starter code is coming soon for this use case.Slider
andRangeSlider
plugins were handled with one class. Now these have been split into two separate, somewhat slightly redundant but much cleaner code.