Skip to content
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

Support flexible plotting #4

Closed
domoritz opened this issue Aug 12, 2020 · 9 comments
Closed

Support flexible plotting #4

domoritz opened this issue Aug 12, 2020 · 9 comments

Comments

@domoritz
Copy link

It would be great if danfo was agnostic to a particular plotting library and supported for example Vega-Lite and in particular https://github.com/vega/vega-lite-api.

@risenW
Copy link
Member

risenW commented Aug 13, 2020

Hi @domoritz thanks for the feedback. We would definitely love to support other plotting libraries, but we had to bundle danfo with one for a start. We can definitely create wrappers that works with different backends going forward.

@domoritz
Copy link
Author

domoritz commented Aug 13, 2020

Sounds great. Just wondering, why do you think danfo needs to be bundled with a plotting library. Wouldn't it be better to keep the dependencies lean and provide plotting as an extension? Instead of making .plot a function of a dataframe, you could even turn it around and plat(df). I can see that you want to stay close to Pandas but in js dependencies are a lot more expensive than in Python since you usually have to load the complete dependencies every time you run the code.

Either way, I'm super excited about danafo! We have previously built https://github.com/vega/datalib but did all the data munging in js.

@risenW
Copy link
Member

risenW commented Aug 13, 2020

I totally get your point, what I think we can do is remove the plotting dependency and have users require it instead. Or we can create a more generic plotting module that can work with numerous plotting packages as you have earlier mentioned.
We can definitely redesign this if you're interested in working with us on it.

@willium
Copy link

willium commented Aug 13, 2020

+1 on not bundling a plotting library. Doesn't seem germane to the problems that this attempts to solve (dataframes).

@domoritz
Copy link
Author

I think unbundling plotting is probably the best approach as there are many js plotting libraries and it's not clear which one makes the most sense in a particular use case.

@Alex-Monahan
Copy link

Plotly is actually perfect for me, and I love having a .plot method on your DataFrame object! Please don't remove that capability, or please show me a path to re-import it! :-)

@domoritz
Copy link
Author

The plotting library could extend danafo or you could call plot(dataFrame, ...) where you call dataFrame.plot(...) today.

@steveoni
Copy link
Member

The plotting library could extend danafo or you could call plot(dataFrame, ...) where you call dataFrame.plot(...) today.

I totally agree with that. We can try creating a wrapper for some of the popular plotting libaries

@risenW
Copy link
Member

risenW commented Aug 13, 2020

Plotly is actually perfect for me, and I love having a .plot method on your DataFrame object! Please don't remove that capability, or please show me a path to re-import it! :-)

Sure we won't remove support for it, we will just not bundle it together to reduce size, and then create a wrapped for it. This ensures we can create separate wrappers for different plotting package.

So we can do something similar to Plot(dataframe, Plotly) or Plot(dataframe, Vega)

@risenW risenW closed this as completed Sep 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants