interactive icon indicating copy to clipboard operation
interactive copied to clipboard

Example on Github readme page does not load SandDance extension

Open peteot opened this issue 4 years ago • 7 comments

The package and version I'm asking about:

Microsoft.dotnet-interactive Version: 1.0.317502+9c2a225c543085a04516cc4fc490919d5925ba87 Build date: 2022-03-25T20:43:44.0000000Z

Question

Trying to run the housingData sandDance example here (verbatim): https://github.com/dotnet/interactive#visualization

I get the error: Error: (3,13): error CS1061: 'DataFrame' does not contain a definition for 'ExploreWithSandDance' and no accessible extension method 'ExploreWithSandDance' accepting a first argument of type 'DataFrame' could be found (are you missing a using directive or an assembly reference?)

It seems the extension for SandDance is not being loaded.

I’m running VS Code Version: 1.66.1 on MacOS 11.6.1.

peteot avatar Apr 11 '22 13:04 peteot

Seeing the same problem.

andrerav avatar Apr 20 '22 22:04 andrerav

That gif should be updated to have a little more context.

The package you need to install is here: https://www.nuget.org/packages/SandDance.InteractiveExtension/

The Script & Interactive tab shows the #r command you run to install it.

jonsequitur avatar Apr 21 '22 00:04 jonsequitur

Thank you @jonsequitur, I installed that extension and restarted the kernel. Got a new error message now:

image

andrerav avatar Apr 21 '22 06:04 andrerav

Solve the same problem using @andrerav solution in the post https://github.com/dotnet/interactive/issues/1979.

I just summarized it here:

  1. Install the package. #r "nuget: SandDance.InteractiveExtension, 1.0.45"
  2. Add .ToTabularDataResource() to the last line. data.ToTabularDataResource().ExploreWithSandDance().Display();

cafenroy avatar Apr 21 '22 12:04 cafenroy

@andrerav Could you post the complete code sample including which version of Microsoft.Data.Analysis.Interactive you loaded?

jonsequitur avatar Apr 21 '22 15:04 jonsequitur

Hi @jonsequitur, I don't think that's necessary, the error I got was due to a missing call to ToTabularDataResource. See #1979 for details.

andrerav avatar Apr 21 '22 18:04 andrerav

@peteot try replacing

housingData.ExploreWithSandDance().Display();

with

housingData.ToTabularDataResource().ExploreWithSandDance().Display();

This should fix the issue for you.

andrerav avatar Apr 21 '22 18:04 andrerav