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

Add permutation test demo #46

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft

Add permutation test demo #46

wants to merge 1 commit into from

Conversation

andrewpbray
Copy link
Contributor

@andrewpbray andrewpbray commented Jul 23, 2024

This attempts to add a quarto version of a well-done scrolly that features some very custom js graphics. Right now the html file has been run through pandoc to create md source and first efforts have been made to include some of the js via ojs code cells.

There are a few puzzles that I haven't figured out yet:

  • How to resolve the errors that I'm getting on render related to syntax parsing problems with the ojs cell blocks.
  • Once I shift to using the closeread extension in the source, how we'll want the user to trigger all of the specific functions that update the graphic (more on that below).
  • How to fix the css problems (gray bar on the left side and overriding of the navbar css). This should be straightforward just haven't done it yet!

Also, the author of this piece, Jared Wilbur has given permission to include this example. He has also done some awesome work that incorporates Svelte: https://mlu-explain.github.io/linear-regression/

@andrewpbray
Copy link
Contributor Author

The key functionality that we'd be translating into quarto syntax is the following js:

if (response.index == 0 & response.direction == 'down') {
  transitionZeroDown()
} else if (response.index == 0 & response.direction == 'up') {
  transitionZeroUp()
} else if (response.index == 1 & response.direction == 'down') {
  transitionOneDown()
} else if (response.index == 1 & response.direction == 'up') {
  transitionOneUp()
\\ and so on to transitionEightUp()

So he calls a specific function on every combination of step and direction. Would something like the following work?

:::{focus-on="alpacas" runjs-if-down="transitionOneDown runjs-if-up="transitionOneUp"}
Text of the step
:::

@andrewpbray andrewpbray marked this pull request as draft July 23, 2024 16:45
@andrewpbray andrewpbray changed the base branch from main to dev October 31, 2024 02:59
@andrewpbray andrewpbray added this to the Post-contest work milestone Oct 31, 2024
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

Successfully merging this pull request may close these issues.

1 participant