home
techred home > python 2 session schedule

DAT-129: Python 2 Master Course Schedule

Note that this document reflects the course outcomes in our current course syllabus for Fall 2021.

course date wk no. session links learning objectives out-of-class work
DAT-129 SAT
28-AUG-2021
-1

Intro to course and data structure exercise

FA'21 Session Recording

Dust off your neural bits with a some lightning drill on basic python data structures: (tuples, lists, dictionaries) and data types: objects!

Write data to data structures in python, access that data, and document code accurately.

Firm TODOs

Please complete the two tasks in our Fundamentals review

Create a github.com account

Optional TODOs

Create a skills TODO list for yourself to tackle during week -1 and week 0

Background on version control and configuration management

To Prepare for git intro next week, explore the git book and git resources on linked in learning.

Idea: Explore Kaggle data competitions

DAT-129 SAT
4-SEP-2021
0

Thinking In Functions

FA21 Recording

In-Class Links

Resources for EMS project

To open our CSV file of EMS dipatches, use this handy library that will provide you a dictionary for each record in the file.

Write functions that do a single task, and do so robustly and with sufficient documentation.

Meet mini-specs by using loops to do magical things with iterable objects.

Code from class on 4-SEP-2021

  1. Consider the free ed license for pycharm via JetBrains
  2. Implement the functions defined in class for computing a percent of redated EMS dispatch records in Allegheny county by year. A good faith effort means that you attempted each function and tried to get an overall working script, but if you hit walls, check your documentation, come to office hours at noon, but don't go nuts.
  3. Ensure that you have the git tool installed on your local system. This is a free tool provided for ALL operating systems. Use git-scm.com. Most defaults on install are acceptable. You'll be given an option to install the Graphic Interface (i.e. GUI) and/or BASH. Be sure to install BASH. We don't use the GUI in this course!!!
  4. Optional if you feel behind: Hack away at your skills refresher TODO list for weeks -1 and 0; prepare to share your artifacts, if any.

Notes:

Maintain your own logical flow chart that reflects how you actually implemented our project. If you change the method input/outputs, depict those changes in your diagram.

DAT-129 SAT
11-SEP-2021
1

FA21 Session Recording

Review EMS processing

Be prepared to share your code, regardless of progress, with your peers via git

Git resources

Finish EMS processing

get your file parsing of the EMS dispatch calls to display at least a tally of redactions by year, perhaps even a percentage

Make at least 4 commits from git BASH

As practice with git, preferably in a repo that you'll be comfortable sharing with the whole world next week

Choose a new CSV based data set

JSON next week: browse the WPRDC, data.gov, google source aggregate are good sources. Choose a csv based data set about which you have an interesting research question. Draft that question in a file and commit to your repo.

JSON Preview

DAT-129 SAT
18-SEP-2021
2

Recording

git essentails

File i/o, JSON, and git

Book resources (Dietel)

  1. 9.5: Serialization with JSON
  2. 9.12: Working with CSV
  3. Chapter 6: Dictionaries and sets

git branching

Implement code modularity suggestions in a peer's project

  1. Log your chosen CSV in our FA 21 master tracker JSON tab
  2. Generate a coding plan for a program to use a JSON-encoded search criteria to select records from your chosen data set and output the matches, also in a JSON file
  3. Begin coding your program, but it can be in process. Completion target for this project Sat, 2-OCT-2021
  4. Use GIT every day!! Add, commit, push to your remote repo.
DAT-129 SAT
25-SEP-2021
3

FA'21 Session Recordings

Query spec building in JSON; advanced git

Deitel textbook: Chapter 9, special focus on 9.5

Read in files in JSON format and CSV format. Process files in JSON and CSV format by converting them to native python objects. Write JSON files to disk. Create diagrams of code flow.

Fully bake & push JSON project to git

  1. Write python code to the JSON project specs: read in a data set as a CSV file and a JSON file encoding a filter criteria for records in your data set. interpret the JSON file's contents to generate a JSON-encoded output file containing only the matching records
  2. Document your project in a README.md file written in markdown that contains at least these sections: A) a written description of your project: what does it do, and why did you write it B) information regarding the data set you filtered, including links if the data are public C) user guide for creating a properly structured JSON file to encode your filter criteria (e.g. your JSON file should specify a list of key value pairs, including at least a key called "year" and a value as a single (scalar) year as an integer...)
  3. Push your python and your README.md markdown file to your course git repository. If you are not publicly sharing your code, make sure Paula and Eric are given read rights on your code.
  4. Submit your work by completely populating your row of the JSON sheet/tab of our master tracker which asks for links to your project code and a separate link to your JSON search criteria.
DAT-129 SAT
2-OCT-2021
4

Fall 2021 Session Recordings

Share json search project

Data structures practice in WWII

Icon project Overview

Manipulate essential data structures in python

Share code with peers

  1. Create your very own 10x10 icon on a computer or on paper. Photograph/scan/save/export your icon. Save it in a directory inside your git repo called "personal_icon_manipulation". Push your changes to the public server.
  2. Create a program plan for carrying out icon input and display. This should include your overall inputs and outputs, and how your internal functions are connected to transform inputs to the desired outputs. This can be a flow chart or well-written pseudocode/code comments
  3. Begin coding your icon project and draft questions to discuss next week in class

Icon project target completion date: Saturday 16-OCT'21

DAT-129 SAT
9-OCT-2021
5

FA21: Session Recordings

Icon project strategy and work time

Icon project target completion date: Saturday 16-OCT'21

Encode a query in a URL and demonstrate its use by making a URL-encoded query against a remote API compouter

Write python to make HTTP requests using the requests library

Fully bake and push your code for your icon project by start of next week.

If you were absent this week, please call Eric 412.894.3020 to sign up for a topic.

DAT-129 SAT
16-OCT-2021
6

Fall 2021 Recordings

Share Icon Projects

Internet and APIs

Application programming interfaces 1

Choosing an API--then pausing for peer teaching.

Prepare peer tutorial for next week

Prepare peer tutorials

DAT-129 SAT
23-OCT-2021
7

Share peer reference guide

Push your peer reference guide to git and share URL in master tracker, please!

Undertake peer teaching (FA21 lineup)

* = straightforward rigor, ** = decently tractable, *** = complex

  1. Modules*: Samantha T.
  2. Comprehesions**: Adam B.
  3. Generator functions**:
  4. Regexps***: Nikki
  5. Object-oriented Python**: Xiaohong
  6. Exceptions* (aka. try/except): Maya
  7. Function magic (functions as objects)***: Robert
  8. Lambda Functions**: Rashan
  9. Pandas library**: Jordan

Guide peers in practicing an essential python skill using a reference guide made by the student.

Upload peer topic reference

Continue Peer Challenges

Choose one of your peer topics to test on your own by baking in one of the peer topics into an existing python project you've made so far. Prepare to share your application of one of your peers' topics next week.

Choose (maybe test?) an API

Choose an API topic and even an inquiry question about data that can be sourced from an API avaiable on the internet. If you time, experiment with the Donors Choose API.

DAT-129 SAT
30-OCT-2021
8

FA'21 session recordings

Dive into API project

Mop up peer teaching

If you didn't get a chance to share your peer lesson last week, please target to share this week.

Implement peer topic in your API projecect and push to git

Choose a topic presented by one of your peers (not your own) and make use of niftiness in your API project. Log the topic you implemented, notes about how and why you did so, and a link to a git repo that contains a pushed version of your code whose commit message contains the text "peer topic". Log your work in the sky-blue sheet/tab of the tracker spreadsheet called "API_implement_peer_topic"

DAT-129 SAT
6-NOV-2021
9

Session recording

Numpy & pandas, API Continued

Use beautifulsoup4 to extract basic data from a website's HTML

Chip away at your API project, attempting to pursue a particular inquiry question that is answerable with data from your API backing data set (i.e. the data). Next week will be a consultation time as well + an introduction to Scraping since we had a small crew this week in class.

DAT-129 SAT
13-NOV-2021
10

Session Recordings

API progress sharing

Prepare any questions you have about your API project, or if you're fully-baked, please prepare to share.

Pandas

  1. Get working code that scrapes an HTML page
  2. Optional: Add one embellishment to your code: database interaction, pandas vis, link-following
  3. Describe your project in a readme.md file and include a screen shot of both your output and the HTML your BeautifulSoup scrapes. See this sample markdown file with an image; just include the image file in the same directory as your markdown file
  4. Push your completed project to your github and insert link in our master tracker
DAT-129 Sat
20-NOV-2021
11

Fall'21 Recordings

Share API Project

Discuss final project

Web scraping project fleshout

DAT-129 Sat
27-NOV-2021
x

Turkey Day Break

No class session!

Turkey Day Break

Continue work on your Scraping project

DAT-129 SAT
4-DEC-2021
12

Share Web Scraping

Database interactivity

Final project

Spring 21: Session Recording

Begin your final project

Make an entry in our master tracker spreadsheet

DAT-129 SAT
11-DEC-2021
13

OS & file tree traversals

Visualization with matplotlib

Final project design

Fully bake final project and prepare for sharing

See sample git repo with screen shots and conclusions written in markdown

Use our master markdown tutorial to create a readme.md

DAT-129 SAT
18-DEC-2021
14

Submit final grade proposal cards

Share final projects

Remember: We're practicing presenting to decision makers, not python coders!

Eric will have Office Hours starting at 1700h/5:00pm

Rest of group will start at 7:00 pm!
  • Grade proposal cards
  • Two small groups for project sharing (review guide)