cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
AgAnalytics
Level I

Interactive html file for figure with local data filters

I am trying to create an interactive html file of a figure that a user can modify by changing local data filters, but when I save it as an interactive file I get a message that says "This feature is not interactive." and thus my figure is static.  I found a similar question on the this site that indicated that if I a disable the "Include" function of the filter (i.e., clicking on red triangle and selecting Show Modes and then deselecting Include) that things would work.  However, when I do this, then I can click on the filters but they actually do not "filter the data" so this still doesn't work.  Am I doing something wrong, or is it not possible to create interactive html files with local data filters that can be used to change a graph?  Thanks.

 

ps  I am using JMP 17.2

7 REPLIES 7
jthi
Super User

Re: Interactive html file for figure with local data filters

I think local data filter is able to show and hide values (not sure if this is true in every case) but it wont for example modify axis

Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

nw = new window("myreport", gb = dt << Graph Builder(
	Show Control Panel(0),
	Variables(X(:weight), Y(:height), Overlay(:sex)),
	Elements(Points(X, Y, Legend(9))),
	Local Data Filter(
		Show Modes(1),
		Mode(Include(0)),
		Add Filter(columns(:age), Display(:age, N Items(6)))
	)
));


nw << Save Interactive HTML("$TEMP/filter.html");
wait(0);

nw << close window;
Close(dt, no save);

Web("$TEMP/filter.html");

jthi_0-1716265562241.png

@John_Powell_JMP 

-Jarmo

Re: Interactive html file for figure with local data filters

Thank you @AgAnalytics for asking this question and thank you @jthi for answering and bringing it to my attention. 

 

The points in Graph Builder and the Bivariate platform do indeed respond to the Show mode of the local data filter in JMP and JMP's exported Interactive HTML. 

 

Some graphs, like Distribution(Histogram) and Mosaic plots do not respond to the Show mode of the local data filter in JMP, so they will not respond to the local data filter with only the show mode enabled in Interactive HTML either. 

 

Note: Interactive HTML is also used on JMP Live and JMP Public where the local data filter's Include mode is supported due to Interactive HTML being able to use a JMP server to perform the calculations necessary to rebuild the graph with rows excluded.

 

@AgAnalytics , what type of graph are you trying to filter?

 

Thanks, 

~John

 

 

AgAnalytics
Level I

Re: Interactive html file for figure with local data filters

John,

 

I am trying to filter an X,Y graph (either smoother or means of points) and I believe my code is pretty much the same thing that @jthi shared but it still does not work.  Is it possible that a file can be too large or there are too many filters?  I'm guessing the number of filters isn't an issue (I have 6), but maybe the file size is too large (~730,000 rows and 49 columns)?  Thanks.

Re: Interactive html file for figure with local data filters

Thanks for the quick reply @AgAnalytics .

 

I'm glad you shared earlier that you are using JMP 17.2 and mentioned that you are trying to use multiple local data filters. The ability for Interactive HTML to handle more than one local data filter was just introduced in JMP 18. 

 

With JMP 17.2, you may see the first local data filter being active, but not the others. However, if that filter is applied to a smoother graph, the smoother will not get recalculated when data is only hidden by the local data filter in JMP 17.2 or JMP 18 or Interactive HTML.  It's just not what Show/Hiding data is and Smoothers are designed to do. Smoother calculations are based on all the included data whether or not those rows are hidden.

 

Summary markers such as means of multiple rows of data will only be hidden by the local data filter with just the Show mode enabled, when all the rows represented by a summary marker are hidden.  Depending on how the filter is set up and your data, you may not see any summary markers hide when you change the filter. You would see this behavior in both JMP and Interactive HTML.

 

If you are unable to upgrade to JMP 18, I suggest you split your report so each report only has one local data filter.  If you are getting different behavior between JMP and Interactive HTML, please let me know.

 

Thanks, 

~John

 

 

 

AgAnalytics
Level I

Re: Interactive html file for figure with local data filters

John,

 

Thanks for the additional information.  I modified the code that @jthi sent with the sample data to include multiple filters and to change from X|Y points to means and things still seemed to work perfectly.  However, when I changed to smoother it did not work.  Thus, I attempted to do the same with my much larger dataset (i.e., plot X|Y means and not use smoother) and it still does not work for me.  That is, I can make multiple data filters work with the sample dataset but not with my data so I'm not sure if that is the issue or not (I have inquired about upgrading to JMP 18 but that is out of my control at the moment).  Bottom line, if I select "Include" everything works great in JMP but the filters do not work in the html file, if I deselect "Include" I can click on any of the filters in both JMP and the html file, but they don't do anything (following same process with sample data and @jthi modified code to include more filters works).

 

Thanks again for comments, seems like it should work but guessing I'm still missing something.  

Re: Interactive html file for figure with local data filters

@AgAnalytics , 

 

I'm a bit puzzled about how you were able to get multiple local data filters to work. I think it may be just a matter of what we consider multiple local data filters.

 

A single local data filter can have multiple filters, like age and height for the sample above.  This has been supported in Interactive HTML for several versions already. The multiple local data filter support in Interactive HTML for JMP 18 is for a report including multiple graphs and two or more of the graphs have their own local data filter. I didn't realize until now that you are only trying to filter one graph, so you have a single local data filter with multiple filters. 

 

Depending on how these filters span the data, and what you have as your X and Y (what categories your mean points represent) the mean points may or may not hide as the filters change.  

To see a simple example, replace the Graph Builder section in the script above with the following:

Graph Builder(
	Size( 271, 266 ),
	Show Control Panel( 0 ),
	Variables( X( :sex ), Y( :weight ) ),
	Elements( Points( X, Y, Legend( 2 ), Summary Statistic( "Mean" ) ) ),
	Local Data Filter(
		Show Modes( 1 ),
		Mode( Include( 0 ) ),
		Add Filter(
			columns( :age ),
			Display( :age, N Items( 6 ) )
		)
	)
);

John_Powell_JMP_0-1716309501781.png

Since the categories F and M include data from all ages, the mean points will show no matter what ages you choose to show with the local data filter. You may also notice that the mean points remain the same no matter what ages you choose to show. That is because the mean calculation is based on Included rows in each category and we are not excluding any rows with this local data filter. 

If you were to remove or exclude the only 16 year old Male, the Mean point for the M category would change and be hidden only when you select (to show) age = 16 in the local data filter.

 

If you would like more help with your specific case, and don't feel comfortable sharing all the details here, please contact our technical support.  With the specifics of your filter setup and your large data(anonymized if you wish) they may be able to figure out how to achieve your goals in JMP 17.2. 

 

I hope this helps, 

~John

 

 

AgAnalytics
Level I

Re: Interactive html file for figure with local data filters

Thank you John.  You are correct that I was only using a single Data Filter with multiple filters and the example you have just provided is pretty much exactly what I am doing (and how things are/or are not working).  You are correct that the mean data points never change even though I filter for different ages since the "Include" has been deselected.  Am wanting to show how the lines move with the different filters but that requires the "Include" to be selected so might have to figure something else out.  Thanks again for the help.