barbagroup / jitcode-meche Goto Github PK
View Code? Open in Web Editor NEWOnline learning modules to learn computing in a problem-based context within Mechanical Engineering
License: MIT License
Online learning modules to learn computing in a problem-based context within Mechanical Engineering
License: MIT License
Per: #1 (comment)
Early in the notebook, we should probably have a blank cell. The user types something, executes the cell, and sees a result. We then have them change the cell to get a different result as a first exercise.
I've read over the (currently) Lesson 2 draft, and I think that this made a large, uncomfortable leap from Lesson 1. In fact, this material might be appropriate for a much later lesson. The basic objective was to introduce custom functions, but there's a lot more going on.
Basically, I think that this lesson will be full of mysteries and somewhat frustrating for a novice. As a general rule, my "design guide" for these lessons is that each one should introduce one major new concept, and ideally it should do so while reinforcing or repeating something that was already done in a previous lesson. This gives a sense of confidence to the novice and reduces cognitive load.
In summary, this lesson is nice, although it can be improved, but I see it as a lesson 4 or 5 or even 6 β¦ definitely not 2.
e.g. Python_Intro -> Python Intro
@labarba - this is significantly improved. I've got a bunch of small comments and suggested fixes below.
The sentence:
According to the University Corporation for Atmospheric Research (UCAR), there are global records of temperature available from several sources: NASA, the National Climatic Data Center (NCDC) and the University of East Anglia in the UK.
Seems out of place, along with the video, which is missing a scale. I would leave out the sources of temperature information (and the video) and spend more time talking about the data set we're using and where it came from.
The data is contained in the file:
GlobalTemperatureAnomaly-1958-2008.csv
with the year on the first column and 12 monthly averages of temperature listed sequentially on the second column. We will read the file, then make an initial plot to see what it looks like.
I don't know what the data file contains, but its not monthly temperature averages. It's a measurement of deviations/differences/anomalies of some form. Perhaps the difference from the monthly average over all years? Here's the first problem in the lesson. There's a general discussion earlier about rising global temperature, but now we're moving into global temperature anomalies, which are a different topic altogether. This is misleading. If the notebook is going to be an analysis of global temperature anomalies, it should start with a discussion of global temperature anomalies and move forward from there.
Now we've added something more to our
import
call to load the library. What's this? Well, we're actually loadingpyplot
, which is a component of Matplotlib, and we're telling Python that we want to rename it locally asplt
... we're just lazy and want to type less.
Also slightly misleading. We're importing matplotlib, but we're only going to be using functions from one component, pyplot, so we use the import matplotlib.pyplot as plt
statement to give us a simple reference to the component which we've named (by convention) plt
.
The plot function can take another input; see if you can get it worked out with the year displayed as well.
The solution is posted immediately afterwards, I assume this is the "instructor solution" version?
The temperature certainly seems to be increasing. But we're not going to stop there, of course. It's not that easy to convince people that the planet is warming, as you know.
No, the temperature anomaly (or whatever this data is, I still don't know) is increasing. We should be precise here.
which in Python start with the symbol #.
-> which follow the #
symbol in Python.
You see a lot of scatter
-> You see a lot of small fluctuations?
also knows as
-> also known as
It means that we are taking the unweighted mean of the previous
$n$ data points.
-> The only parameter to the moving average is the value
We chose a window
-> We use a window
the scatter in the data is not random
-> The fluctuations in the data are not random
For the global temperature data, this discussion is crucial: many critics claim that since there is auto-correlation in the data, no reliable trends can be obtained!
global temperature anomaly data?
As a well-educated engineering student, who cares about the planet
Remove the comma between student and who -- it reverses the intent of the sentence.
appreciatd
-> appreciate
It says the branches can't be automatically merged; I don't necessarily want to merge them right now, but I'd like to be able to accomplish it. How do we fix this? It looks like just the lesson one ipynb won't go.
@labarba
Do you think we should remove some of the material from Lesson 00? If the whole purpose of the JIT notebooks is to gradually introduce programming constructs in a measured way, we might scare them off by showing them nested for loops in the very first notebook.
Maybe leave it to ideas about duck typing, zero-indexed and whitespace? Along with the usual strings, ints, floats, etc...
All,
I've got two things I want to work out about lesson two:
Aron, I thought that you might have an idea, especially for the second one. Please feel free to contribute, everyone else; I've had a look around and haven't found what I'm looking for. Is there a way (different magic command?) to make the scripts I'm using recognize the existing variables? Thanks.
-Alex
Hi all,
I have an idea but I'd like to get some feedback before diving in.
The early rover notebooks suffered from way too much info, too quickly. @zwade has done a good job rewriting them (see http://nbviewer.ipython.org/github/barbagroup/JITcode-MechE/blob/dev/module00_Introduction_to_Python/03_Lesson03_Rover_Conditionals.ipynb and http://nbviewer.ipython.org/github/barbagroup/JITcode-MechE/blob/dev/module00_Introduction_to_Python/04_Lesson04_Rover_Loops.ipynb) but I think they're still going to be a little bumpy. (Mostly it's the difficulty in cleanly "showing" the rover's position so that the students have feedback from the commands they send)
Proposal:
A notebook with a black-boxed "rover" library to allow students to send commands to the rover so that they can experiment with that.
Then, in the following notebooks, slowly unveil the black-boxed library and have them duplicate/improve (?) its functionality piece by piece.
If we did this, I think we could be up front about it, e.g. "Here's a library we've written to help you familiarize yourself with controlling the rover, you're welcome to take a look at the code driving the rover, but it's more complicated than what we've done before. But before long, we'll be showing you how to write your own rover driving code"
Now that our Wakari instance is up, we should be thinking about workflow for the students.
They can follow along with the nbviewer rendered lessons, but they'll need to clone something into their wakari accounts in order to load the data files for lessons 1 and 2.
Or, alternatively, we can change the loadtxt paths to reflect their location on github.
But, given the issues raised in #24 anyway, how about separate workbooks that accompany each lesson? We set this up as a separate repo, "JIT-code-MechE-Workbook" or whatever, and it contains all of the data files (in the same path as in this repo) plus notebooks that need to be "completed" as a way of measuring performance.
There's a lot of code duplicated to plot the results in Lesson 2 which is sort of counter to what we're trying to teach them -- good opportunity to add in a function that takes the data set, calls another function to convolve the data set, then creates a subplot with the original, convolved, etc... side by side
Hi all,
Is there a plan on how to display the links to the two sets of lessons? Do we just want two lists, one of Python, one of Matlab?
Other thoughts?
If it's just two lists, I'll edit gen-readme.py to handle generating the two lists.
Per #1 (comment) and consensus from the rest of the group, let's remove this from the first notebook.
I just checked with AeroPython and there, too, the style is being rendered differently by nbviewer now. The text column is pushed to the left of the browser window, while the code cells are not, giving a jagged look. Why?
Here's a new Lesson 2, based on siting wind turbines given wind data from a few locations.
Questions, comments and suggestions are most welcome.
I'm worried about a couple of different things that students might encounter when getting started with Lesson 0.
How do they get their IPython Notebook environment going? How do they launch IPython Notebook?
I can start working on these as a web page with lots of screen shots using Anaconda's installer.
The students will either use lab machines or have instructors help them install the environment on their computers during office hours.
How do they make cells "go". What are the different types of cells? What are those crazy symbols creating the equations? HOW MANY LANGUAGES DOES THIS THING SPEAK?
There are some really great IPython tutorial/overview lectures out there. We should link to them, and consider putting together a web page that gives a really gentle introduction to the IPython notebook as well.
We are going to add a little more help at the beginning of the notebook to distinguish the cells.
Is the dive into the Cochrane-Orcutt procedure too quick-and-steep?
Its a useful statistical procedure, to be sure, but it involves a convolution as well as some fairly well-developed statistical intuition to understand. I think we should move it to a "Dive Deeper" section for students to explore on their own, and instead have them just consider the simpler problem, which is calculating the Durbin-Watson statistic to decide if the data is serially correlated.
The Creative Commons licenses do not cover software. The recommended licensing approach is to provide all code under MIT and remaining content under CC BY. We need to note any exceptions (when we're reusing other people's material, for example), somewhere in a LICENSE file.
numpy.shape(T)
Again, we've told Python where to find the function shape() by attaching it to the library name with a dot. But since the shape is also a property of any NumPy array, we can get the same result another way:
T.shape
They way this is worded is a little confusing, it might be good to not mention both of them, since it reads as though all static methods of numpy should be available as instance methods (or fields) of T, which is not necessarily the case.
Looking over these modules, I'm afraid that because all the code is handed to them on a silver platter, they won't pay any attention to it and will just skim over. If at the end you have an additional problem (probably an easier one) that uses the same techniques, it would force them to understand how the code is actually working.
If the end goal is to have several modules on this repository, rather than having all lessons in one subdirectory, we might be better off splitting them up into their own subdirs -- the gen-readme can be edited to create a more complicated README with appropriate links under different headings.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.