CAPP 30122 - Computer Science with Applications 2

This course expands upon the computational thinking & skills taught in 30121, with a focus on applications to real world problems in policy-adjacent spaces. It consists of lectures, discussion sections, and programming assignments. The course culminates in a final project built on a team – expanding & demonstrating the programming & data skills built through the first two quarters.

Goals:

Prerequisite: CAPP 30121

Readings

There is no textbook, but there are supplmentary readings listed at the end of most sections of the course notes.

These readings are often helpful to those that want additional depth and/or need a bit more exposure to the topic than lecture can provide.

If you ever feel like additional content on a topic would be helpful, please ask on Ed and I am glad to suggest high-quality resources.

Office Hours

Who Where When
James Turk
James Turk
James Turk

I am also available by appointment: book a 1:1 Meeting or a group meeting.

Meeting Times

Each section will meet for lectures two days a week and with a teaching assistant for a discussion section one day a week.

Section Time Location
01 Mon/Wed 9:00am-10:20am Keller 0023
02 Mon/Wed 10:30am-11:50pm Keller 0007
Section Time Location Instructor
1L01 Tue 3:30-4:50pm
1L02 Tue 5:00-6:20pm
2L01 Tue 3:30-4:50pm
2L02 Tue 5:00-6:20pm

Weekly Schedule

Schedule subject to change, major changes will be announced in class and on Ed Discussion.

Week Topics TA Session Assignments
1 Project Discussion
2
Quiz #1 Debugging Lab Project M1 Due - Monday, Jan 11 Debugging Lab Due - Friday, Jan 15
3 Quiz #2 Web Scraping Lab Web Scraping Lab Due - Friday, Jan 22 PA #1 (API) Due - Sunday, Jan 24
4 Quiz #3 Git Exercise Project M2 Due - Monday, Jan 25 PA #2 (Web Scraping) Due - Sunday, Jan 31
5 Quiz #4 GIS Lab GIS Lab Due - Friday, Feb 5 M3 Meeting before 5pm Friday, Feb 5th PA #3 (Data Structures) Due - Sunday, Feb 7
6 Quiz #5 Regex Lab Regex Lab Due - Friday, Feb 12 PA #4 (GIS/Trees) Due - Sunday, Feb 14
7 Quiz #6 Project I2 or I3 Due - Friday, Feb 19 M4 Meeting before 5pm Friday, Feb 19 PA #5 (Linkage) Due - Sunday, Feb 21
8 Quiz #7 Data Viz Lab Data Viz Lab Due - Friday, Feb 26 PA #6 (Graphs) Due - Sunday, Feb 28
9 Super Quiz Second of I2 or I3 Due - Friday, Mar 5 PA Resubmission Due - Sunday, Mar 7
10 Project Fair - Monday, Mar 9 @ TBD Final Commits Due - Tuesday, Mar 10
  • Lab, Project, and PA submissions due 11:59pm of the date listed.
  • Milestones requiring meetings (M3, M4, I3) will be first-come first serve.

Quizzes

There will be 7 short quizzes, each of which is worth 5 points.

There will be no make-ups for quizzes except in cases of documented illness or emergency.

Your lowest quiz score will be dropped.

In Week 9, there will be a Super Quiz, a second chance at the content covered on quizzes which can replace your quiz grades.

Programming Labs

The 5 programming labs will be introduced in TA sessions & are meant to be worked on collaboratively. They are designed to give practice with skills that are related to upcoming PAs and/or broadly applicable for your project.

Each lab will receive a single grade:

  • +2 - All problems seriously attempted.
  • +1 - Incomplete submission (requires attendance of TA session)
  • 0 - Incomplete submission/no attendance.

These are essentially graded pass/fail, with a pass requiring a good-faith attempt at each problem.

A +1 is available for partial credit only if you attend the TA session. In other words: If you have a busy week & can’t find the time to finish your assignment, you can submit as far as you got during the TA session and receive half credit.

Programming Assignments

There will be six programming assignments which you are expected to work on independently without the use of Generative AI.

See Working on Programming Assignments for advice and a sense of how graders will be evaluating your code.

Resubmissions

You will be allowed to resubmit one programming assignment.

Details on the process will be posted on Ed.

A submission will be eligible to raise the PA grade given if it fixes the mistakes of the original and incorporates grader feedback.

Course Project

In lieu of a final exam, this course has a quarter-long team project. During the quarter you will form a team of 3-4, identify some real-world data sets, and build a small application utilizing the data. This project will require you to apply skills you learn in class augmented with self-guided learning and exploration of your chosen data.

The project will earn a total of 14 grades:

  • M1-M4: Milestones. Due approximately every two weeks throughout the quarter. These are intended to keep the team on track and build your experience planning a larger software project.
  • R1-R7: Requirements. These are the core requirements your project must meet, they will be evaluated on the final submission and shared by the entire team.
  • I1-I3: Individual criteria. Each team member will receive their own grade for these.

Each of these is worth 2 points except M1 which is a single point. This is a total of 27 points.

A few criteria have a bonus point available as well, some are outlined below, and others may be rewarded as discretionary points for work that goes beyond expectations.

Each criteria is explained in detail below:

M1: Project Proposal

The first milestone will have you provide information about the group and an initial proposal for what you plan on building.

I want your team to get a chance to build something that you are all genuinely interested in working on.

Projects should begin with two or three sources of data and a clearly stated goal.

This is just an initial proposal, details will definitely change as you work on the project throughout the quarter.

For this milestone, each team must create a group repository using the GitHub classroom link shared on Ed Discussion.

(Note: Unlike regular assignments, you will be welcome & encouraged to post your projects publicly on GitHub, so pick a name you’re happy to share with the world.)

Copy the following into a file named milestones/milestone1.md and answer the questions there:

{Replace anything in {} with your answers}

# {Team Name Here}

## Members

- {Name <name@uchicago.edu>}
- {Name <name@uchicago.edu>}
- {Name <name@uchicago.edu>}
- {Name <name@uchicago.edu>}

## Abstract

100-200 words explaining the general idea for your project.  Be sure to read the project requirements below and consider how you'll incorporate the various components.

*These details can & will change as much as needed over the next few weeks.*

## Preliminary Data Sources

### Data Source #1

Source URL: {https://...}
Source Type: {Scraped/Bulk Data/API}
Summary: {What is included? who published it?}
Challenges: {Any challenges or uncertainty about the data at this point?}

### Data Source #2...N

Same as above.

## Questions

1. {Numbered list of questions you'd like us to respond to}
2. {...}

(This is the only project criteria that is worth 1 point.)

If you make a complete submission on time, you will receive 1 point.

Late/incomplete submissions may receive 0 points.

M2: Project Plan

At this point you should have explored your data sources and spent more time revising what you plan to build based on the data and feedback.

For this milestone, answer the following in milestones/milestone2.md:

# {Team Name}

## Abstract

{Update your project abstract from Milestone 1 with any changes.}

## Data Sources

*Note that the requirements have been updated from Milestone 1!*

### Data Source #1..N

Source URL: {https://...}
Source Type: {Scraped/Bulk Data/API}
Approximate Number of Records (rows):
Approximate Number of Attributes (columns): 
Current Status: {At this point, you should have interacted with your data, describe the current status. Have you written code for an API or web scraper yet, explored the data, etc.?}
Challenges: {Any challenges or uncertainty about the data at this point?}

## Data Reconciliation Plan

One of the most important steps for this milestone is to have a plan as to how your data sources will connect.

For each data set, you will need to identify the "unique key" that will allow you to connect it to other data sets.

Example 1: You have two data sets: healthcare costs on a zip code level & employment figures on a county level. You will need to determine a mapping between zip code & county. You aren't sure how you'll go about joining them-- figuring that gap out now helps us identify that this will require a third data set available from the US Census so you can plan accordingly.

Example 2: You have three data sets: a list of companies that were fined for illegal emissions, a list of companies that have government contracts, and a list of company addresses. You identify that there won't be a perfect match between the three data sets, but you will need to put some effort into matching irregularly formatted company names.

## Final Deliverable Sketch
 
What do you hope someone interacting with your project will learn?

At this stage, what do you envision your final deliverable looking like?

You must include at least one image (you may use a digital tool or draw on paper and attach a photo)

## Project Schedule

The final goal of this milestone is to develop a team plan that will keep you on track for the remainder of the quarter.

1. Come up with a list of work that needs to be done. Use the answers above and try and identify as many small components as possible that need to be done. ("Scrape data source #1", "Write API extraction code for data source #2", "Write merge code for data source #1 and #3", "Create interactive map")
2. For each piece of work, identify a team member that will be *primarily responsible* and assign it a week between 5 and 9.
3. After ensuring that each team member has a roughly equal amount of work, and that your events are sequenced well, produce a table resembling:


| Week | Task | Lead |
|------|------|------|
|  5   | Complete Scraping IL Chamber | Paul | 
|  5   | Evaluate Location APIs | Nicole | 
|  5   | Prototype Map with Mock Data | Brett | 
|  6   | Work on Chamber/Tax Data Reconcilation | Paul | 
|  6   | Write Geospatial Join | Nicole | 
|  6   | Write Tests for Cleaning Logic | Brett |

- Each team member should have at least one signficant task each week from now through Week 9.
- A task may not appear more than twice. If a task spans 3 or more weeks, break it up into smaller components!

## Questions

1. {A *numbered** list of questions for us to respond to.}
2. {...}

A +2 will be earned if the submission is made on time with complete answers to all questions.

M3: Project Plan Meeting

As part of submitting M2, you will be asked to schedule a meeting to discuss your plan.

A +2 will be earned if each team member participates meaningfully in the meeting and the team returns a revised plan in the agreed upon timeframe.

Individual members may earn deductions for being late to, missing, or otherwise not participating in the meeting in a professional manner.

M4: Project Prototype

For this milestone, you’ll be asked to meet with course staff and present what is done so far, and review your plan for finishing the work by Week 10.

A +2 will require:

  • A repository with an appropriate project layout.
  • Working data import code for at least one of your sources.
  • An initial draft of data reconciliation/cleaning process.
  • An initial draft of the visualization/simulation/etc. that may be using mock data at this point.
  • Meaningful participation in a presentation of your prototype with course staff.
  • If required, a revised product plan in the agreed upon timeframe.

Individual team members which have not made meaningful contributions by this point, or who do not participate professionally in the meeting, may receive reduced grades.

R1: Data Acquisition

+2 criteria:

Your data acquisition code must be one or more runnable python modules, for example:

python -m ourproj.gather_census
python -m ourproj.scrape_chamber

Your project must make meaningful use of at least two distinct sources of data. At least one of these must be an API or scraped from a website.

+3 criteria:

Your project must make meaningful use of at least three distinct sources of data.

  • One source must be scraped from a website;
  • a second source must either be scraped or from an API;
  • there are no restrictions on the third source.

R2: Data Reconciliation

+2 criteria:

Your reconciliation code must run as one or more distinct modules:

python -m ourproj.merge output.csv datadict.json
python -m ourproj.geojoin

Your project must join together two or more data set using at least one of:

  • Geospatial join. Joining two datasets that are collected at different units of measure with one another. Examples: Census blocks and Chicago neighborhoods. Addresses and counties.
  • Fuzzy matching. A fuzzy or probablistic merge using a number of fields to score similarity.
  • A direct merge that requires substantial cleaning. Two fields that should be equal but require cleaning that goes beyond stripping punctuation. Example: Exact name matching when names are presented in different orders.

These topics will be covered in class.

+3 criteria:

Inclusion of a second join of a differing type. (So not two geospatial joins or a three-way fuzzy match.)

R3: Visual Output

+2 criteria:

Your project must have a runnable module (e.g. python -m ourproj.viz) that produces a visual output. This can be:

  • interactive terminal output (e.g. data exploration via menus, perhaps using rich)
  • static visualizations (e.g. a report with various altair charts supporting findings)
  • interactive visualizations (many teams self-teach tools like Plotly Dash to build interactive dashboards)

This criteria is flexible! Something not listed here is probably fine, just ask!

R4: Data Analysis or Simulation

+2 criteria:

Your project must do something meaningful with the collected and merged data.

Two common paths:

  • perform some meaningful statistical analysis to your data
  • use your data to power a simulation of some kind

This criteria is flexible! Something not listed here is probably fine, just ask!

R5: Testing

+2 criteria:

Key algorithms in your code should be tested.

The testing does not need to be comprehensive, but should test key points that should inspire confidence that your code works as intended.

While every project is different, a rough idea of what you might test:

  • A couple of tests per data source, for example:
    • Test that your API or web scraping code correctly fetches the data from a single page.
    • Test the conversion of a single record from the upstream into your internal cleaned-up representation.
  • Thoughtful tests of your data reconciliation code on a small subset of your data (real or mocked).
  • Testing of simulation or analysis component with mock data.

Each of these components should have 2-3 tests, aiming to cover critical cases.

R6: Documentation & Organization

+2 criteria:

Your repository must:

  • have all code contained in a single python package
  • keep minimal files in the top-level directory, instead keeping things organized in directories like milestones/, data/, documentation/, and similar.
  • include README.md and milestones/final.md (or pdf):

README.md

The README.md serves as a public-facing landing page for the project. It should contain:

  • the project name & updated final abstract
  • names of each team members
  • a screenshot of your project
  • instructions on how to run the project (1-3 commands)
  • citations for your data sources
  • a link to your project video

Final Milestone

Within the milestones/ directory. Add a project named final.md or final.pdf. This is the “internal” documentation for your project.

This document should be 2-3 pages. Please do not go longer than that.

  • Data Documentation - List the sources of data, any gaps or challenges in the data. Explain how data flows through the project. What else would someone picking this project up for the first time need to understand?
  • Project Structure - Write a page or so describing the structure of your project. What modules exist? What do they do? A diagram may be helpful here.
  • Team responsibilities - Give a detailed breakdown of who built what. Remember, each team member needs a significant contribution.
  • Final thoughts - Reflect on what the project intended to accomplish and what it did.

R7: Demo Video

+2 criteria:

Record a video demonstrating your project. The video must be between 2 and 5 minutes. The video should primarily focus on demonstrating the functionality of your final product.

I1: Team Evaluation

At the end of the quarter, you will complete a self and team evaluation.

+2 criteria:

Candid assessment of yourself and your teammates.

If significant issues arose on the team, an honest assessment of what went wrong that demonstrates lessons were learned will help your grade.

Issues surfaced on the team evaluation may result in deductions to this and/or other categories depending on severity.

I2: Peer Code Review

During the quarter, you and a peer will review one another’s code.

+2 criteria:

  • Selection of a meaningful contribution to share with your review partner.
  • Detailed review of partner’s code.
  • Integrate changes from review as appropriate.

I3: Code Review Meeting

During the quarter, you will meet with a member of course staff to discuss a code contribution.

+2 criteria:

  • Selection of a meaningful contribution to share with the member of course staff.
  • Integrate changes from review as appropriate.

Project Fair & Final Submission

Monday of Week 10 (Finals Week) we will have a project fair. This is a chance to show off what you made and celebrate what you all built.

Attendance at the project fair is required as it is scheduled in lieu of a final. Failure to attend will result in a -3 point adjustment to your individual project grades.

I strongly recommend your team sets an internal deadline to have things combined/merged ~24 hours prior to the event. Give yourself a buffer, you do not want to be making big last-minute changes the day you are planning to demo things.

After this deadline, you have an additional day or so to make final cleanups to your code. It is recommended that you use this time for documentation, final clean-up, and minor changes.

All final project commits must be made by Tuesday 11:59pm of Week 10.

We will not grade anything committed to the repository after this deadline.

Final Grade

The final grade is made up of 100 points (not including bonus points):

Type Number Points (each) Total Points Notes
Quiz 6 (of 7) 5 30 Lowest score is dropped.
Programming Assignment 6 5 30 One resubmission.
Lab 5 2 10
Milestones 4 2* 7 M1 is worth 1 point.
Project Final 10 2 20+ Some bonus points available.
Participation 3 1 3

This converts to a letter grade:

Minimum Letter
95 A
90 A-
87 B+
83 B
80 B-
77 C+
73 C
70 C-

I reserve the right to move these boundaries, but only in everyone’s favor.

C- is the minimum grade to receive credit for this course.

If you feel that you are at risk of falling behind reach out to James proactively to discuss options.

Warning

Academic Honesty violations, including use of AI, will earn all 0 on affected assignments. You will not be allowed to drop or replace these grades with a resubmission, and the highest grade you will be eligible to earn wiil be capped at a B.

This is, without a doubt, the most common way to get a low grade or fail this course. Do not share your work, ask others to, or use generative AI on assignments in any way.

Academic Honesty Policy