Best practices for notebooks in the classroom

3,052 views
Skip to first unread message

matt burton

unread,
May 24, 2017, 11:51:52 AM5/24/17
to Teaching with Jupyter Notebooks
Hey fellow jovian educators,

I am teaching an introductory python/data science course this summer and am looking for any resources about teaching with Jupyter Notebooks (for my own edification). I'm teaching a very small course (7 students) with JupyterHub running on my campus computing cluster. 

Given the small size of the course, I am not planning on doing anything fancy with nbgrader or other extensions, but I'd like to hear from folks about their experience during class sessions. My plan is to craft a notebook for each session with some content and have students follow along, and doing short exercises during the class period. I've done a bit of research on the web, but a lot of stuff I've found is more focused on how to set up the teaching environment and not about the practical/tactical work of teaching with the notebook. If you know of something, please let me know!

Kicking myself because I couldn't make the short trip from Pittsburgh to Philly for #JuptyerDayPhilly last week. It looked like a great lineup!

--
Matt Burton
University of Pittsburgh

Brian Granger

unread,
May 24, 2017, 12:48:03 PM5/24/17
to matt burton, Teaching with Jupyter Notebooks
Hi Matt,

I have been teaching slightly larger classes (2 section of 25-30
students). The main thing in a class that size is the time in
creating, assigning and grading the homework. The notebook works
really well for this, it just takes time from both the content
creation side and the management. I will be on the 4th iteration of
the course next year and it will be a much more pleasant experience.

A quick summery of random points:

* I try to give at least 50% of class time for students to work themselves.
* Assignments are individual, but they often work together
* Sometimes I have them pair program.
* The in class exercises are continuations of the weekly homework - I
assign between 3-5 problems a week, each is a notebook.
* I am not running Docker and have to watch RAM usage carefully - I
may start to run the systemd spawner to manage that.
* Use GitHub OAuth with JupyterHub
* I have been using Jake's book for the course and it works really well:

https://github.com/jakevdp/PythonDataScienceHandbook

Hope this helps!

Cheers,

Brian
> --
> You received this message because you are subscribed to the Google Groups
> "Teaching with Jupyter Notebooks" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter-educat...@googlegroups.com.
> To post to this group, send email to jupyter-...@googlegroups.com.
> Visit this group at https://groups.google.com/group/jupyter-education.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter-education/2b1bc84d-e40a-40f5-b3c8-4eb3a3169add%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Brian E. Granger
Associate Professor of Physics and Data Science
Cal Poly State University, San Luis Obispo
@ellisonbg on Twitter and GitHub
bgra...@calpoly.edu and elli...@gmail.com

Doug Blank

unread,
May 25, 2017, 5:51:32 PM5/25/17
to Teaching with Jupyter Notebooks
It was a great lineup! And now almost all of the talks are online:


My next action-item is to get all of the speakers and participants to join this group, so that we can discuss ideas like "best practices" here.

Someone actually asked that question, and we had a bit of discussion. I think the consensus was that there are a lot of great ideas, but not all of them work in all situations. Some of them are obvious, and some aren't so obvious. Brian mentioned some. Here are some other ideas:

1) Use notebooks instead of powerpoint slides. Make the students do presentations with notebooks.

2) Have the students turn in notebooks, and especially encourage them to write---write about the code and write about inspiration. Have them write personally.

3) Use a server if you can (JupyterHub, Sage Math Cloud, etc.) This can be a form of equity to make sure that everyone has the same computing resources.

4) Use many of the available meta-commands/magics. Such as the %activity magic in metakernel that gives you clicker-like (audience participation) functionality. Also, magics like %%tutor to connect to the online Python Tutor. There is also a %%jigsaw magic that allows you to code using Blockly (drag and drop blocks) in the notebook, then convert to Java or Python, or run directly.

5) Use nbgrader, if only to distribute or collect files. 

6) Every once in while, start class with a completely blank notebook. Prepared notebooks are great, but blank ones are better for the student. The pace is slower, and you can see the code get built, decisions made, mistakes made, try variations, etc.

7) You may want to re-think (completely) courses that you have taught before. Notebooks make a big difference in pedagogy.

8) Use the browser-based terminal when it makes sense. 

9) Develop your own pedagogical notebook style. We saw some very different approaches to the same materials. 

10) I just added a drawing annotation overlay extension that allows you to free-hand annotate/draw on a notebook. Haven't tried it in class yet, but I have wished I could. It is just a temp drawing canvas that goes away when done (for now). Also the needed spelling checker:


11) Think about POGIL ideas. These are a perfect match for the notebook:


That's it for now... more later! Good luck, and please feel free to ask about any of these ideas, or the presentations.

-Doug

mcburton

unread,
Jun 5, 2017, 10:55:13 AM6/5/17
to Doug Blank, Brian Granger, Teaching with Jupyter Notebooks
Doug, Brian,

Thanks so much for for your feedback, it turns out I am already doing (or trying) to mirror many of your suggestions. So I guess I'm on the right track! Notebooks definitely add a

Doug,
Thanks for the JupyterDay Philly slides, very helpful! Excellent point about "developing my own pdagogical notebook style" I think you are spot on with the fact the Notebook makes a big difference; both pedagogically and performatively. I hadn't heard/seen of the POGIL ideas before, very interesting. I've been trying out your "blank" notebook approach a bit and enjoy it, but I'm still figuring out how to prepare my own set of materials to follow.

Brian,
I am also teaching Python Data Science Handbook, are your class materials public? 


I came across this paper (I can't remember where unfortunately) that has empirically tested some of what you guys are doing in your classes. I don't know if you've seen it, but it was interesting:

Jacobs, C. T., Gorman, G. J., & Craig, L. (2015). Experiences with efficient methodologies for teaching computer programming to geoscientists. ArXiv:1505.05425 [Cs]. Retrieved from http://arxiv.org/abs/1505.05425


Thanks again for sharing your experiences. I am DEFINITELY interested in doing a Birds of a Feather on teaching/education with Notebooks at JupyterCon. See you all there!

--
mcb





--
You received this message because you are subscribed to a topic in the Google Groups "Teaching with Jupyter Notebooks" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jupyter-education/R3v5vgFQ6Zc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jupyter-education+unsubscribe@googlegroups.com.
To post to this group, send email to jupyter-education@googlegroups.com.

Lee Stott

unread,
Jun 6, 2017, 5:40:25 PM6/6/17
to Teaching with Jupyter Notebooks
Matt 

A great example of using Notebooks to teach is the work which the University of Cambridge, UK have been doing all 350 of their UG Engineering students are now taught using Notebooks see https://blogs.msdn.microsoft.com/uk_faculty_connection/2016/11/15/jupyter-notebooks-on-azure-with-notebooks-azure-com/ 

Best wishes

Lee
To unsubscribe from this group and all its topics, send an email to jupyter-educat...@googlegroups.com.
To post to this group, send email to jupyter-...@googlegroups.com.

Matthew Ingram

unread,
Nov 22, 2017, 4:54:12 PM11/22/17
to Teaching with Jupyter Notebooks
Hi Brian, Doug, Lee, and Matt,

Sorry for any confusion by adding another Matt to the conversation, but I was really pleased to find this thread on teaching/education with jupyter.
I teach a range of research methods courses at SUNY Albany (usually 10-20 students at both undergrad and grad levels), and am trying to rebuild all my materials using open resources (texts, software, exercises, exams, grading, and student collaboration tools).
I've experimented with the Open Science Framework (osf.io), but just discovered this thread using jupyter.

I'm in the process of reviewing the materials from the Philly conference you reference elsewhere in this thread, and am looking for any relevant workshops at jupytercon.
However, if there is a set of materials any of you would point me to for getting started in thinking about this, please let me know.

Best,

Matt I.
University at Albany, SUNY

Matthew Ingram

unread,
Nov 22, 2017, 4:55:46 PM11/22/17
to Teaching with Jupyter Notebooks
Hi Brian, Doug, Lee, and Matt,

Sorry for any confusion by adding another Matt to the conversation, but I was really pleased to find this thread on teaching/education with jupyter.
I teach a range of research methods courses at SUNY Albany (usually 10-20 students at both undergrad and grad levels), and am trying to rebuild all my materials using open resources (texts, software, exercises, exams, grading, and student collaboration tools).
I've experimented with the Open Science Framework (osf.io), but just discovered this thread using jupyter.

I'm in the process of reviewing the materials from the Philly conference you reference elsewhere in this thread, and am looking for any relevant workshops at jupytercon.
However, if there is a set of materials any of you would point me to for getting started in thinking about this, please let me know.

Best,

Matt I.
University at Albany, SUNY


On Wednesday, May 24, 2017 at 11:51:52 AM UTC-4, matt burton wrote:

Tony Hirst

unread,
Dec 3, 2017, 6:49:40 PM12/3/17
to Teaching with Jupyter Notebooks
Hi Doug

Re: "Notebooks make a big difference in pedagogy", would you like to expand a little more on that?:-)

We've been using notebooks to teach a third year undergrad database course, shipping the notebooks in a VM along with a couple of database servers (MongoDB and Postgres) and a copy of OpenRefine. The structure of our notebooks reflect the materials we deliver as online texts (we're a distance education organisation), rich in narrative with inline activities.

We also came up with a structure for a FutureLearn MOOC, also available here - http://www.open.edu/openlearn/science-maths-technology/learn-code-data-analysis/content-section-overview?active-tab=description-tab - where the content was split between HTML pages doing set up, then a call to action to work on a pre-prepared notebook.

"Assessment" each week was for students to complete their own activity on a theme. eg we demoed activities around a particular rich data source (Comtrade export stats, World Bank indicators, etc) and then gave learners "as if" freedom to do their own research around an export item or set of indicators of their choice); the code could be largely reused from the examples we gave around one particular export item.

--tony

Doug Smith

unread,
May 3, 2018, 8:10:16 PM5/3/18
to Teaching with Jupyter Notebooks
This is an old thread but it raises a question that I have. What is the advantage of using JupyterHub? My use may be a bit atypical.  I have some students in physics that will do some computational analysis as part of a project. I thought I would develop a notebook for them which they use as a tutorial and to answer specific questions as part of the assignment.  They would email the notebook back to me for grading.

thanks

Samuel Lelièvre

unread,
May 7, 2018, 3:46:41 AM5/7/18
to Teaching with Jupyter Notebooks
Fri 2018-05-04 02:10:16 UTC+2, Doug Smith:
>
> What is the advantage of using JupyterHub? My use may
> be a bit atypical.  I have some students in physics that will
> do some computational analysis as part of a project. I thought
> I would develop a notebook for them which they use as a tutorial
> and to answer specific questions as part of the assignment.
> They would email the notebook back to me for grading.

I think CoCalc would be a perfect fit for your use case.

In a CoCalc project
- create a .course file where you register your students
- create a folder with the notebook you want to assign them
- in the .course file, assign the assignment to all students
- when your students log in to CoCalc, they will see a project
  corresponding to your course, which will have a folder with
  the notebook corresponding to the assignment
- they can work on it in CoCalc or if they prefer they could
  download the notebook, work on it, and upload it back to CoCalc
- at the due date, you can collect the work of all your students
  by clicking "collect" in the .course file

More info at

Lex Nederbragt

unread,
May 9, 2018, 6:52:16 AM5/9/18
to Doug Smith, Teaching with Jupyter Notebooks


On 4 May 2018, at 02:10, Doug Smith <bcphy...@gmail.com> wrote:

This is an old thread but it raises a question that I have. What is the advantage of using JupyterHub? 

- for ‘bring-your-own-device’ courses, no need for students to install anything on their machines and they can continue working wherever they have wifi
- equal programming environment for all students
- in our setup at Univ. of Oslo I as a teacher can push files to a GitHub repo, and these get synced to each students private area on their JupyterHub. Students can edit  provided notebooks, and also store their own notebooks. If students are editing provided notebooks these are not overwritten upon the next sync
- in our case, login using university provided account

Best,

Lex Nederbragt

mcburton

unread,
May 9, 2018, 8:35:41 AM5/9/18
to Lex Nederbragt, Doug Smith, Teaching with Jupyter Notebooks
Lex,

- in our setup at Univ. of Oslo I as a teacher can push files to a GitHub repo, and these get synced to each students private area on their JupyterHub. Students can edit  provided notebooks, and also store their own notebooks. If students are editing provided notebooks these are not overwritten upon the next sync

Have you written up the details of this file sharing setup? I have wanted to set up something similar (for sharing lecture notebooks) and am curious to hear the technical details of how you've set it up. 

--
mcb

--
You received this message because you are subscribed to a topic in the Google Groups "Teaching with Jupyter Notebooks" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jupyter-education/R3v5vgFQ6Zc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jupyter-education+unsubscribe@googlegroups.com.
To post to this group, send email to jupyter-education@googlegroups.com.

Lex Nederbragt

unread,
May 22, 2018, 8:48:40 AM5/22/18
to mcburton, Doug Smith, Teaching with Jupyter Notebooks
Hi,

I’ve asked the IT staff responsible, and they say their documentation is pretty much ‘for internal use only’ - and I suspect it is in Norwegian. But they hope at some point to write it up.

Sorry to not have anything useful…

Lex

You received this message because you are subscribed to the Google Groups "Teaching with Jupyter Notebooks" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jupyter-educat...@googlegroups.com.
To post to this group, send email to jupyter-...@googlegroups.com.

mlif...@iwu.edu

unread,
Jun 9, 2018, 11:15:09 AM6/9/18
to Teaching with Jupyter Notebooks
Matt,

You might want to look at nbgitpuller if you haven't already.  It looks to be pretty simple and flexible (limited setup needed on the server, and should work on a variety of server setups) with the one small cost of requiring students to click on a link to pull any new content.

--Mark


On Wednesday, May 9, 2018 at 7:35:41 AM UTC-5, matt burton wrote:
Lex,

- in our setup at Univ. of Oslo I as a teacher can push files to a GitHub repo, and these get synced to each students private area on their JupyterHub. Students can edit  provided notebooks, and also store their own notebooks. If students are editing provided notebooks these are not overwritten upon the next sync

Have you written up the details of this file sharing setup? I have wanted to set up something similar (for sharing lecture notebooks) and am curious to hear the technical details of how you've set it up. 

--
mcb
On Wed, May 9, 2018 at 6:52 AM, Lex Nederbragt <lex.ned...@ibv.uio.no> wrote:


On 4 May 2018, at 02:10, Doug Smith <bcphy...@gmail.com> wrote:

This is an old thread but it raises a question that I have. What is the advantage of using JupyterHub? 

- for ‘bring-your-own-device’ courses, no need for students to install anything on their machines and they can continue working wherever they have wifi
- equal programming environment for all students
- in our setup at Univ. of Oslo I as a teacher can push files to a GitHub repo, and these get synced to each students private area on their JupyterHub. Students can edit  provided notebooks, and also store their own notebooks. If students are editing provided notebooks these are not overwritten upon the next sync
- in our case, login using university provided account

Best,

Lex Nederbragt

--
You received this message because you are subscribed to a topic in the Google Groups "Teaching with Jupyter Notebooks" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jupyter-education/R3v5vgFQ6Zc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jupyter-educat...@googlegroups.com.
To post to this group, send email to jupyter-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages