- Notifications
You must be signed in to change notification settings - Fork 276
Make far better for workshop (WIP; don't merge) #8
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
Conversation
| @ericmjl notebook 1 is ready for feedback. I may make minor tweaks today or tomorrow. I am discussing with @justinbois tomorrow and will likely make some changes after that. I'm interested to see how correlated your feedback will be with JB's. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Hugo! I'm going to post some thoughts here. The summary of things that I think might be important are:
- Standardizing on programming and variable naming conventions.
- Consistently show data preparation procedures.
The rest of my comments are in the PR discussion thread, as it's near impossible to comment on a notebook diff 😄
Programming ConventionsLet's standardize a bit on programming conventions. Usually I don't have strong opinions on this, but drawing on my prior experience in Science One at UBC, where algebraic conventions were harmonized between the physics and chemistry instructors, I think it's important to standardize (at least within one class) -- it's more for the learner, and less for the instructors. One thing that I think is a pandas-centric convention is to use the selector syntax for column names, rather than attribute syntax (even though both are available). The reason for this is that the selector syntax is more general (particularly when non alphanumeric characters are present in the column names), and I think there are more examples of the use of selector syntax than attribute syntax. |
Consistent Data PrepAnother thing that I did in the notebooks that I'm creating is to use highlight some of pyjanitor's data cleaning functions, such as (ahem) cleaning column names! For example, in loading the finches dataset, I have added the following: df = (jn.DataFrame(df) # wrap dataframe in a Janitor dataframe. .clean_names() # clean column names .rename_column('blenth', 'beak_length') # rename blength to beak_length (readability fix) .rename_column('bdepth', 'beak_depth') # rename bdepth to beak_depth (readability fix) .label_encode('species') # create a `species_enc` column that has the species encoded numerically )Since the finches dataset permeates the whole tutorial, it may help with continuity if this little detail is taken care of. |
| @ericmjl thanks for all of this. Happy to change to selector syntax, although I may ask that we merge this PR before I do. Will that be ok? [Edit: I've done this now in both NBs] Adding in such data prep so early will distract from the pedagogy, which is difficult enough, particularly as I intend to have as little boilerplate code as possible. A solution for this would be to clean the file before the tutorial. Thoughts? And were those the only two things? |
| @ericmjl also: NB2 is ready for feedback. I'll also change to selector syntax here. I also need to do a PEP 8 pass, add in some comments AND add in some text/eqn based descriptions for sections 3&4 (I'll get to this tomorrow). |
Let's riff off that - I now remember that in Network Analysis Made Simple, I provided custom functions for the class to load data of interest (in our case, it would be |
Yep, just those. I've looked at the content of the notebooks, but can't find anything to critique at the moment - mostly I'm looking forward to seeing how you teach your material! |
| Now reviewing NB2! Going to leave notes as individual comments with screenshots. |
| wrt
Definitely going to include more text here. My to-do was
Plan is to add a description of how to build a model: figure out the parameters, assign priors and likelihoods, than sample using MCMC to get posterior. I'll mention in the hands on what the priors and likelihood are etc... Yes will sample 2,000 steps. |
My apologies! Didn't make that connection earlier on. |
| @ericmjl i've added more verbiage to section 3. check it out ! I'm pretty happy with it. |
As am I! Can't wait to see how you teach it! 😄 |
| woop woop! descriptions to section 4 added. LMK what you think and then i'll merge |
| I'm good to go with what you've got! I will merge. |
Make far better for workshop (WIP; don't merge)
Make far better for workshop (WIP; don't merge)


@ericmjl Working on it! Please do not review until I request it.