Instructor Notes
This is a placeholder file. Please add content here.
Introduction
Instructor Note
Intro exercise: As people trickle in: * online: in the chat, write your name and one thing you’re excited to learn about in the course. * in person: if small enough, ask one by one. If bigger, do the same thing on a sticky note.
Instructor Note
Deliver this as if you are in an infomercial, and as if everyone is on board with the character you are playing.
Instructor Note
Logistics:
- My name is $name and I come from $background. Your other instructors will be $list (ask them for quick intro).
- Most sessions are structured as sets of short explanations or demonstrations, interspersed with exercises. Be prepared to alternate listening-mode with thinking-mode and doing-mode.
- Ask questions by using the “raise hand” indicator or typing into chat.
- Follow along on the website and/or use it to catch up if you need to space out or step out: https://docs.catalyst.coop/open-energy-data-for-all/
Any other questions on what to expect or how to participate?
Instructor Note
Modify for whatever subset is being presented.
Instructor Note
Don’t cover this, unless you have a lot of extra time or this is high priority for your students. Instead, direct students to the course website for tips on locating and identifying appropriate datasets for open research projects.
Handling diverse filetypes in Pandas
Instructor Note
In preparation for this lesson:
- In Jupyter Notebooks, open the 2-diverse-filetypes.ipynb notebook
- In another Jupyter Notebooks tab, open the directory view to make it possible to visualize the xml file
- Open the
data/eia923_2022.xlsxfile on your computer’s spreadsheet software (e.g., Excel) - Open the lesson folder in your local file browser, to make it easy to open files in a text editor throughout the lesson.
Instructor Note
Remind people of the setup instructions: https://docs.catalyst.coop/open-energy-data-for-all/#setup Ask for a green sticky or check mark when everyone has completed this step. If after a few minutes people are still having trouble, ask them to message one of the helpers for support. Give them the option to debug in a seperate room if needed, or follow along without coding.
Instructor Note
We recommend skipping the below call-out unless people run into filepath issues.
Instructor Note
Go ahead and open the eia923_2022.xlsx file in your
local spreadsheet software (e.g., Excel, OpenOffice).
Instructor Note
We recommend skipping the below call-out unless students ask more about what’s actually going on or you’re ahead on schedule - it’s an aside that we don’t necessarily need to get into.
Instructor Note
Below is an optional challenge that is likely to get cut for time. It is intended to refresh students’ data exploration skills, and build intuition around comparing datasets. Plus, it’s a nice ice-breaker. This may be appropriate if you’re only teaching the first two episodes, or if you’re particularly interested in developing the data exploration and comparison skills of your cohort.
Accessing remote data
Instructor Note
Prep checklist:
Scraping Data
Visual Data Exploration
Instructor Note
Prep:
Start a spreadsheet application but do not open anything in it yet
-
Share whole screen or screen region with the following (overlapping is fine):
- Web browser with slides for the intro
- Terminal window open to the course repo
- File browser open to the course repo
-
Unshared screen or region:
- Course website instructor view or raw episode file
Adapt intro to whether workshop is part of the full series or running as part of the VisEx+Assumptions standalone.
Setup instructions: https://docs.catalyst.coop/open-energy-data-for-all/index.html#setup
GitHub repo: https://github.com/catalyst-cooperative/open-energy-data-for-all/
Course website: https://docs.catalyst.coop/open-energy-data-for-all/visual-data-exploration.html
Instructor Note
unstack is a bit of a brain warp, so take extra time
here to check that students are with you.
Making assumptions about your data
Instructor Note
Prep list:
- make a Google Doc that people can put their assumptions in; make it editable by all who have the link; zoom in to 150%
Instructor Note
Some examples, if students are feeling a little quiet:
- the net generation data is actually in MWh and not a mix of units
- the net generation of batteries is strictly less than the fuel consumed in MWh
- the net generation of each individual plant is “reasonable” - i.e. there are no reports of a generator producing more power than the Sun
- the reported dates are all within the last decade
- the fuel mix matches what we know of physical reality
- the total generation matches what we expect for Puerto Rican electricity demand
- all energy source codes correspond to the set in the documentation
- a plant ID corresponds to only one plant name per year
- a given plant ID always corresponds to the same plant name
- plant IDs are distributed in chronological order of construction
- every generator has at least one reporting period for which they have non-zero generation
- electricity generation heat rates are close to known averages for their prime mover / energy source
- if a value is reported, it is correct and reflects reality
- if a generator reports all null values for a specific time period, it was non-operational during that time period; if a generator reports 0 generation for a specific time period, it was operational, but not dispatched
Instructor Note
Put this up on the screen! Using markdown cells.
Modularization
Instructor Note
- Start with the code from cell 3.
- Update existing comment into a plain language description (e.g., “Replace short-hand codes in a column with interpretable strings using a dictionary.”) You can ask for suggestions here!
- Use description to name function.
- Then swap out the dictionary and column name for more generic variables.
Instructor Note
Ask each team to paste their function into the codi and explain why they chose it. Pick one or two of these to test.
Escape from Jupyter!
Instructor Note
Take a moment to check that your students are all one directory above
the lesson content. Otherwise, uv will create a workspace
in the lesson’s existing uv environment instead of a new
project.
Instructor Note
The precise numbers of packages resolved, prepared and installed will vary for each user. In case your students are curious:
- Resolution: Recursively searching for compatible package versions, ensuring that the requested requirements are fulfilled and that the requirements of each requested package are compatible. See docs for more detail.
Instructor Note
If at any point students are struggling to get to this point, they
can catch up by unzipping the pr-gen-fuel-init.zip file
from the checkpoints folder into a different folder than
the lesson is in.
Instructor Note
Copy over the cells, with the import and utility function outside of
main() and the remaining cells in main(). Once
that’s done, rename main() to
transform_pr_gen_fuel() and update the
if __name__ == "__main__": to call that function
instead.
Making sure your system is behaving
Instructor Note
Use VS Code here.
Instructor Note
Encourage people to really follow along on their own, something like:
“The tools we use here are very interactive, so it will be a lot easier to learn if you are literally typing out the commands with your fingers instead of trying to remember all the things I’m doing. If you need a minute to get set up, or fall behind, throw up the NO react in Zoom and we’ll give you time to catch up.”
Instructor Note
If you’re used to using the short forms of the pdb
commands (l, n, s, and so on) you
should warn the students and try to use the full commands.
Instructor Note
Depending on how much time you have, you can either have them do the exercise or just go over the hint and solution.