NYU Wagner banner

Python Coding for Public Policy - Spring 2024#

Course Information#

Instructor Information#

Description#

This seven-week course exposes the students to the application and use of Python for data analytics in public policy setting. The course teaches introductory technical programming skills that allow students to learn Python and apply code on pertinent public policy data. The majority of the class content will utilize the New York City 311 Service Requests dataset. It’s a rich dataset that can be explored from many angles relevant to real-world public policy and program management responsibilities.

Class will be split between:

  • Lecture

  • Demonstration

  • Hands-on time to:

    • Play with the code from lectures

    • Start on the homework

    • Ask questions

This class is a prerequisite for Advanced Data Analytics and Evidence Building, which builds on the topics covered here.

Homework#

Homework assignments will consist of two different formats:

  1. Online tutorials: In advance of classes, online tutorials will be assigned as homework. These online tutorials will introduce students to critical Python concepts. The following lecture will then focus on applying those concepts to real public policy data questions.

  2. Coding: Students will complete Python coding exercises that apply new concepts they have learned in lecture. Coding assignments will build off of concepts covered in previous assignments.

These are expected to take 5-10 hours per week.

Learning Objectives#

By the end of the course, students will know:

  • Python fundamentals

    • Common data types

    • Functions

    • Reading technical documentation

    • Troubleshooting

  • How to use pandas and other packages for data exploration, manipulation, visualization, and analysis

  • How to use Jupyter as a coding environment

  • How to work with open data

  • How these tools and skills can be leveraged in a policy context

Schedule#

Lecture

Date

Topic

Homework due

Late/resubmission deadline

0

3/12

Intro to coding

none

none

3/19

no class - Spring Break

none

none

1

3/26

Working with data

Homework 0

2

4/2

Manipulating and combining data

Homework 1

Homework 0

3

4/9

Data visualization

Homework 2

Homework 1

4

4/16

Dates and time series analysis

Homework 3 and Final Project proposal

Homework 2

5

4/23

APIs

Homework 4

Homework 3 and Final Project proposal

6

4/30

The Bigger Picture

Final Project

Homework 4

none

5/3

none

none

Final Project

none

5/7

none

Final Project peer grading

In general, assignments and resubmissions are due at the time class starts. These will all be reflected in the Assignments in Brightspace.

Communications#

  • All announcements and assignments will be delivered through the Brightspace site.

  • Assignments, due dates, and other aspects of the course may be modified mid-course.

    • As much advance notice will be given as possible.

  • Troubleshooting and other communications between class sessions will be through Ed Discussions, so that other students can respond and/or benefit from the answers.

    • Email is also an option, though please only use for questions that aren’t appropriate for others to see.

  • The instructor/grader will try to respond within 24 hours, 48 hours max, if someone else hasn’t aleady.

Assignments and Evaluation#

The Course Grade is based on the following:

It is entirely possible for everyone in the class to get over 100%.

Assignment scoring#

If the submission showed effort, feedback will be given through annotations in Brightspace.

Final Project#

The Final Project score will be the median of peer grades. For the Final Project peer review score, the following apply per review:

  • Minimal feedback: -10 points

  • Not reviewed: -20 points

Resubmission#

For submissions that showed effort and were on time, the assignment can be resubmitted to improve the score, up to full credit. This will be due before the next class — see the schedule — and can be resubmitted through Brightspace.

Extensions#

Requests for extensions will only be considered if made via email before the deadline, up to the late submission cutoff shown above. Late submission deadlines will only be extended if there is accomodation requested through the school. Resubmission deadlines will not be extended.

Participation#

To encourage cosnsistent, deeper thought about the Assignments, relevance to the broader world, etc., students are expected to do Between-Class Participation. This includes:

  • Asking a question of substance

  • Answering a question

  • Posting a useful/interesting resource

  • Sharing an insight

in either:

  • Office hours

  • Ed Discussions

    • When starting a new Conversation, please use a descriptive Title to make them easier to navigate

    • Suggest checking your notifications settings to make sure you see conversations that come through

  • Email

A student’s overall Between-Class Participation score is calculated based on some form of participation every week. The following don’t count:

  • In-class participation, due to:

    • The difficuly of tracking participation live

    • Some students being more shy

  • Homework revisions

  • Communications about grades or other administrivia

Letter Grades#

Letter grades for the entire course will be assigned as follows:

Letter Grade

GPA Points

Description

Criteria

A

4.0 points

Excellent

Exceptional work for a graduate student. Work at this level is unusually thorough, well-reasoned, creative, methodologically sophisticated, and well written. Work is of exceptional, professional quality.

A-

3.7 points

Very good

Very strong work for a graduate student. Work at this level shows signs of creativity, is thorough and well-reasoned, indicates strong understanding of appropriate methodological or analytical approaches, and meets professional standards.

B+

3.3 points

Good

Sound work for a graduate student; well-reasoned and thorough, methodologically sound. This is the graduate student grade that indicates the student has fully accomplished the basic objectives of the course.

B

3.0 points

Adequate

Competent work for a graduate student even though some weaknesses are evident. Demonstrates competency in the key course objectives but shows some indication that understanding of some important issues is less than complete. Methodological or analytical approaches used are adequate but student has not been thorough or has shown other weaknesses or limitations.

B-

2.7 points

Borderline

Weak work for a graduate student; meets the minimal expectations for a graduate student in the course. Understanding of salient issues is somewhat incomplete. Methodological or analytical work performed in the course is minimally adequate. Overall performance, if consistent in graduate courses, would not suffice to sustain graduate status in “good standing.”

C+

2.3 points

Deficient

Inadequate work for a graduate student; does not meet the minimal expectations for a graduate student in the course. Work is inadequately developed or flawed by numerous errors and misunderstanding of important issues. Methodological or analytical work performed is weak and fails to demonstrate knowledge or technical competence expected of graduate students.

C

2.0 points

C-

1.7 points

F

0.0 points

Fail

Work fails to meet even minimal expectations for course credit for a graduate student. Performance has been consistently weak in methodology and understanding, with serious limits in many areas. Weaknesses or limits are pervasive.

Class Policies#

  • All submissions must be made from a Jupyter notebook file, following these instructions.

Attendance#

Attending class is mandatory, but most importantly, important. Learning programming requires commitment from the part of the student and the skills are built out of practice. If you miss an experience in class, you miss an important learning moment and the class misses your contribution.

Missing class counts as an absence, regardless of the reason or notifying the instructor(s) beforehand. Missing more than 20 minutes of a class session will be treated as an absence. The first absence is treated as a “freebie”, each subsequent absence will result in a 1% deduction from the overall grade.

If you do miss class, we trust that it’s for a good reason. If you’re sick, please use that freebie and stay home and rest.

You are responsible for getting caught up on what was covered in class. You may want to ask a classmate for notes.

Auditing#

See the school policies. Students must be officially registered. If there’s a wait list, priority for spots in the class will be given to students taking it for credit. See information about what you can do while waiting.

Once registered: To receive R-credit, every assignment should at least be attempted and submitted. The between-class participation is not required. At the end of the course, please remind the instructor that you were auditing.

Sharing#

A student may work with other students. However, assignment solutions should not be identical to / copied-and-pasted from one another, and each student should submit theirs separately. In addition, students need to indicate who they worked with with each submission. This also applies to using generative tools like ChatGPT.

Similarly, it is common practice to use code snippets found on the internet; these sources must be cited.

Students are more than welcome to share approaches and code snippets in the Discussions, so long as they aren’t giving the full solution away.

Students may post their Final Project publicly (on GitHub, LinkedIn, etc.) since it’s open-ended. Other assignments (with “correct answers”) cannot be posted publicly, to avoid cheating in future semesters. You are, however, more than welcome to share any of your notebooks with specific people, such as future employers.

Academic Integrity#

Academic integrity is a vital component of Wagner and NYU. All students enrolled in this class are required to read and abide by Wagner’s Academic Code. All Wagner students have already read and signed the Wagner Academic Oath. Plagiarism of any form will not be tolerated and students in this class are expected to report violations to me. If any student in this class is unsure about what is expected of you and how to abide by the academic code, you should consult with me.

NYU’s Calendar Policy on Religious Holidays#

NYU’s Calendar Policy on Religious Holidays states that members of any religious group may, without penalty, absent themselves from classes when required in compliance with their religious obligations. Please notify me in advance of religious holidays that might coincide with exams to schedule mutually acceptable alternatives.

Accessibility#

Academic accommodations are available for students with disabilities. Please visit the Moses Center for Student Accessibility website and click on the Reasonable Accommodations and How to Register tab or call or email CSD at (212-998-4980 or mosescsd@nyu.edu) for information. Students who are requesting academic accommodations are strongly advised to reach out to the Moses Center as early as possible in the semester for assistance.

Technology Support#

You have 24/7 support via NYU’s IT services. Explore the NYU servicelink knowledgebase for troubleshooting and student guides. Contact askIT@nyu.edu or 1-212-998-3333 (24/7) for technology assistance. Your peers are another source of support, so you could ask a friend or classmate for help or tips.

If you do not have the appropriate hardware technology nor financial resources to purchase the technology, consider applying for the NYU Emergency Relief Grant.