Today we are going to
1. learn more about lists and plot them. Today’s files are in https://github.com/bmaillou/BigDataPython/tree/master/03-Lists
Here is a reading on lists. http://www.tutorialspoint.com/python/python_lists.htm
VIDEO
QUIZ After Video-Take the quiz on courseworks.
HOMEWORK
Homework 2 Due beginning of next class (Monday February 3, 2025).
- Code.org intro course through stage 15
- Make plots Like below.
- Remember to start your notebook with a nice header in Markdown with your name, homework number etc.
- Hand in your notebook. It ends in .ipynb. this lets me run your notebook if there are any issues.
Make 2 lists
x=np.array([1,2,3,4,5,6])
y=np.array([6,5,4,3,2,1])
plot x versus y.
- use the ax.plot nomenclature to make a plot.
- choose your favorite shape
- choose your favorite color
- choose your favorite linestyle.
- choose something else to change (e.g. linewidth…)
- Put your name in the axis labels
- Add a title with your hometown in the title
- Use Markdown after the graph to add a figure caption. It can be brief but get in the habit.
This is my example but it is not perfect!!!!! something similar will get you a 50. You need to add the missing parts.
This class was a good foundation for graphing to build off of throughout the semester. Lists continued to be relevant as what we were doing in class got progressively more difficult, and the list of different ways of sorting in the “list notebook” was something I continued to return to as it lays out the formatting commands in a clear and concise way.
I really like this section because you took your time going through the different was to get numbers in a list. One thing that I struggled with a lot was ( vs [ vs { and np.array uses brackets so I would really emphasize this point and start getting people use to that. I really also enjoyed the video and your introduction of how to make a really basic graph! I remember I was proud of myself that I actually coded and made a graph!
This class was extremely productive and introduced us to arrays, while re-iterating the plot functions and allowing us to mess with the fancy types of graphing. The directions were very vivid and challenged us sufficiently. Overall, great class. But, if I have to help one more farm girl fill her holes and remove her piles, I am going to have an aneurism.
I thought it was very useful to learn the difference between lists and arrays. However, having clear definitions of lists and arrays (and also strings) would be helpful to further understand the differences between them and when to use them. I also really enjoyed playing around with different colors and shapes in this class!
This was a great class because it introduced us to plotting, which I used in almost every notebook for the remainder of the semester. It also introduced us to manipulating data within plotting, including a sneak peak into selecting specific parts of data to plot. I’m not sure how this session of the class could improve
I enjoyed this lecture because it was a simple introduction to plotting, which became the foundation of all future lectures. It was interesting to see how one line of code in Python could create a plot while making the same plot in Excel would take many more steps. I also liked that each part was gone through step by step, no matter how minor. This way, I was actually able to understand what I was doing and I was able to see how each step used and built upon the one before it.
This was a good review of making and adjusting lists with well thought out puzzles for us to solve. It was nice to do this before starting to practice plotting simply. The homework for this class was also a good one– fun to start seeing figures appear.
Code.org was also a good tool to use at this point.
I ended up going back to the notes and assignment for this class most frequently because it was a good introduction to matplotlib. It also taught me how to look for ways to make prettier graphs, which was definitely an important part of this course. I second the suggestion from above to put more info about matplotlib options in the actual classnotes.
I remember this being a really cool class. For me the main draw was that I realized how much more efficient plotting in this way could be than plotting in Excel (or similar).
This may be a pretty superficial suggestion, but the link to the website that goes through different lines, shapes, etc to use in your graphs (http://matplotlib.org/api/axes_api.html#matplotlib.axes.Axes.plot), I find myself referencing all the time (since we do so much graphing!). I think it would be nice to also embed this link/a screenshot in the notebook (like how the loc, iloc, and dot notation summary sheet was in the first Pandas workbook). A little cheat sheet like that may be easier to quickly pull up and reference?
I ended up taking some screenshots of the site and adding them to my workbook and found that to be helpful. Looking at that page a lot whenever I was going back and doing graphs helped me remember more features so that I could learn to use them without referencing the external site.
–Jennifer Olson
I enjoyed this class because it was an easy and comprehensive introduction to the how to form graphs. This was also the first time that I realized how specific your commands must be to create anything in python. Although code.org was not my favorite part, I think that it was important to do. It forced me to break down every action. However, I do think that the 20 hour code was a little excessive I think that doing the first 10 hours was enough.