interactive
interactive copied to clipboard
Update F# Samples to use Plotly.NET, DataFrame, and Deedle Frame
Is your feature request related to a problem? Please describe. Right now it's difficult to get XPlot.Net working with the Microsoft.Data.Analysis DataFrame due to compatibility issues in Type versions. On top of this, XPlot itself recommends using Plotly.Net going forward. The current samples for F# in this repository still point to XPlot which is going to cause people to bump into issues, just as I did.
Describe the solution you'd like I'd like us to add new notebooks featuring Plotly.Net for charting with F#. I'd like to see one working with Microsoft.Data.Analysis.DataFrame and another working with a Deedle.Frame because the F# community still likes Deedle and there's honestly not a lot of documentation on this. My F# is a little rusty and I had trouble getting a DataFrameColumn converted to a sequence of singles for plotting a histogram, but Deedle is easier to work with. Having these examples will help more people use recommended solutions for working with data in a Polyglot Notebook using F#.
Also note that Plotly.Net is more geared towards F# developers than C# developers so you will have some developers who primarily write C# code trying to write F# to work with Plotly.Net, making examples involving DataFrame and Frame more important.
Describe alternatives you've considered We could also update or remove the old examples using XPlot, but there's probably value in keeping them there, as long as you add a note stating that XPlot recommends moving to Plotly.Net.
We should definitely update the samples to use Plotly.NET wherever XPlot was previously used. For the C# samples, these could use Plotly.NET.CSharp, which has better ergonomics for C# relative to the F#-focused Plotly.NET.
@jonsequitur I agree. I do think we need better ways of getting data out of DataFrameColumns and into charting.
I'll be doing some work for F# advent this December on Polyglot Notebooks and charting and am happy to take on the DataFrame and Plotly.NET aspects of this issue as part of that work via a PR here if you want to assign me to it. I think my article is supposed to go live on the 26th.
Thanks, @IntegerMan. Happy to have the help!
There's a list of issues with DataFrame that @luisquintanilla has been tracking and we've been looking into the possibility of some supplemental APIs for smoother interactive use. Any feedback would be helpful.
Thanks for this proposal @IntegerMan.
This sounds great to me! I think at minimum, upgrading to use Plotly.NET is a good next step.
Re: DataFrame, @asmirnov82 has been doing a ton of great work to improve it and resolve issues. At this point he's the expert with those APIs. He might be able to provide guidance on what the best ways to do what you're suggesting.
Hi @luisquintanilla and @IntegerMan, I am not very familiar with F#, so I managed to update DataFrame-Getting-Started sample to use Plotly.Net, but it could be not the best "F# way" of coding. You may take a look in #3385. Hope this may be helpfull. Anyway you are welcome to refactor if code requires changes
Thank you! @asmirnov82