carpentries-incubator / targets-workshop

Pre-alpha {targets} workshop
https://carpentries-incubator.github.io/targets-workshop/
Other
33 stars 6 forks source link

some comments and suggestions #3

Closed drmowinckels closed 1 year ago

drmowinckels commented 1 year ago

I love this lesson, I learned a lot walking through it. All examples run on my end following the lesson.

Mostly I have comments regarding introduction of new packages with assumption on what the learners should already understand about them.

i'd suggest this lesson was for more intermediate R users, more than having "familiarity", as there are some complex concepts in here that I think goes beyond what familiarity would entail (at least how I interpret familiarity).

As a general note, I think the lesson could benefit with some more comparison between running something in the console, vs having it as a target. At least when it comes to the targets where you are using functions from other packages, where the learners might not be familiar with what those functions do. SO their mental model seeing the targets plan is just not there.

I think if you could run an example in the console first, then set it up as a target, would improve that a lot and make the transition from script to target easier when they themselves try to apply this to their own work.

github-actions[bot] commented 1 year ago

Thank you!

Thank you for your pull request :smiley:

:robot: This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}.

If you have files that automatically render output (e.g. R Markdown), then you should check for the following:

Rendered Changes

:mag: Inspect the changes: https://github.com/joelnitta/targets-workshop/compare/md-outputs..md-outputs-PR-3

The following changes were observed in the rendered markdown documents:

 batch.md        | 44 +++++++++++++++++++++++---------------------
 cache.md        |  1 +
 md5sum.txt      | 10 +++++-----
 organization.md |  5 +++--
 packages.md     | 11 ++++++-----
 setup.md        | 16 ++++++++++++++++
 6 files changed, 54 insertions(+), 33 deletions(-)
What does this mean? If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible. This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation.

:stopwatch: Updated at 2023-06-02 10:55:13 +0000

joelnitta commented 1 year ago

Thanks for the helpful input @drmowinckels !

I'm very glad to hear that the examples work for you.

i'd suggest this lesson was for more intermediate R users, more than having "familiarity", as there are some complex concepts in here that I think goes beyond what familiarity would entail (at least how I interpret familiarity).

Great point --- I agree that {targets} is probably best taught as a tool after users have achieved at least intermediate abilities in R. It assumes/requires familiarity with some pretty complicated concepts, like running code in a separate, non-interactive R instance and being able to write functions. Without a solid foundation to build on, most learners would probably struggle quite a bit.

I had a hard time trying to provide a realistic example that does something interesting, while not overwhelming the learner with more functions and packages beyond targets, which is already a big mental load.

I will see what I can do to take these excellent comments into account.

joelnitta commented 1 year ago

(By the way, the "carpentries bot" above with the ducky is me. For some weird reason it isn't showing my actual name!)

drmowinckels commented 1 year ago

examples are so hard!

I think you are adding meaningful packages, maybe with the exception of broom, dplyr and palmerpenguins (and I love these packages, totally worth learning, but in this context I think we can have better examples without their use).

The future packages make sense to add, for the parallell computing. So this I think is necessary to have there. tarchettypes too, I do love the readability. Its important extra to add on, I think.

joelnitta commented 1 year ago

maybe with the exception of broom, dplyr and palmerpenguins

Yes, these are all of course not necessary for targets. But I wanted to provide a realistic example that demonstrates the features of targets including branching and generating reports. Do you have any ideas/suggestions for an example that demonstrates these features while not using such packages?

joelnitta commented 1 year ago

@drmowinckels Here are some other tutorial examples for reference:

joelnitta commented 1 year ago

Actually, I think perhaps we could take some tips from Will's tutorial. He provides more detailed background information on the example project (predicting customer churn), including demonstrating the functions outside of the pipeline like you also suggested. I think it may be worth it to spend some more time/space explaining the point of the penguins example so that the workflow makes more sense.

How about this: start with palmerpenguins right from the start, instead of the example code generated by tar_script(). I like tar_script() because it is simple—everyone gets the same _targets.R file immediately. But the transition from the simple examples in episodes 1–4 to the penguins example in 5 onward is kind of awkward, and requires the learners to make a mental jump.

So perhaps we could set it up so that the goal is to analyze bill shape in penguins. We would first introduce a simple R script not using targets that does things the "regular" way. Then introduce aspects of targets one at a time. I don't think it would be such a big change from the current version, mostly just adjusting the first four episodes.

joelnitta commented 1 year ago

@drmowinckels: I have implemented my idea of using palmerpenguins for the whole lesson and addressed all the points you raised in your PR, so I am going to close this now. It would be great if you can take a look at the updated version and let me know if you have any more comments. Thanks!