Shopping Days

Programming and Data for Policymakers

(a.k.a #code4policy)

 

 

✨✨DO NOW

 

Please navigate to:

 

code4policy.com/shopping

 

and follow the instructions on screen

Programming and Data for Policymakers

(a.k.a #code4policy)

 

Instructors: Dhrumil Mehta

 

 

dhrumil_mehta@hks.harvard.edu

 @datadhrumil

@dmil

  • Visiting Professor of Public Policy @ Harvard U.
  • Associate Professor of Journalism @ Columbia U.
  • Deputy Director of Tow Center for Digital Journalism

 

Formerly:

  • Database Journalist, Politics @ FiveThirtyEight
  • Software Development Engineer @ Amazon

Programming and Data for Policymakers

(a.k.a #code4policy)

 

Instructors: Aarushi Sahejpal

 

 

asahejpal@hks.harvard.edu

@aarushisahejpal

I co-teach this class with Dhrumil + am a data journalism professor at American University in Washington, D.C.

  • Data Editor, The Investigative Reporting Workshop
  • Consultant, The Lawyers Committee for Civil Rights Under Law

Formerly

The COVID Tracking Project at The Atlantic, The White House Office of Science and Technology Policy, The Center for Public Integrity, Reveal from the Center for Investigative Reporting

 

A quick look at a summary of responses to the poll

Logistics

Two sections

- Section A: 10am-2pm ET

- Section B: 4pm-8pm ET

 

Types of Assignments

- Classwork

- Homework

    - coding

    - reading / slack discussion

- Project

 

Things you will need

A laptop computer

These two books (e-books available on amazon)

 

  

 

 

 

 

 

 

 

A can-do attitude!

What this class is

This course is built with the understanding that hands-on experience with programming, data, software development and management methods, open source collaboration, and technology innovation will better prepare students to competently navigate technology projects and nuanced issues at the intersection of technology and governance than a theoretical understanding alone.

 

- Hands-on coding workshops

- Project

- Reading

- Discussion + Q&A with expert guest speakers

What this class is not

- It is not a general programming curriculum

- It is not an intro to computer science course

- It is not a specific programming language course

Haven't coded before?

No prior programming experience is necessary, but the course will be rooted in programming exercises and students must be prepared for hands-on learning. Students who have no experience with topics covered may consider staying after class or coming in on the weekend for individual instruction or help with debugging code.

 

 

Want to get a head start?

 

Try the Python3 or JavaScript course at:

https://www.codecademy.com/

 

Why you should take this course:

You don't plan to work at the intersection of tech and govt

  • You might be a part of technology-related policy making
  • Policy implementation is increasingly technology-dependent

 

You do plan to work at the intersection of tech and govt

  • Speaking to and working effectively with technologists
  • Managing technology projects
  • Learning how to learn how to code
  • Learning some hard-skills along the way (coding/data viz)

 

Example Projects

Let's Roll!

Interruptions welcome!

If at any point you feel stuck, please either speak up or use the "NO" icon in the "Participants" panel.

 

If I start seeing lots of "No", I will stop and recap...

 

For questions, feel free to interrupt or use the hand-raised icon

Download this code

  1. Login to GitHub
     
  2. Navigate to https://github.com/code4policy/shopping
     
  3. Click on the "Open in GitHub Codespaces" button

In class, you'll work on your own computer.

...

Today, we'll stay in the web to avoid configuration drama.

Pair Programming: Designate a "driver" and a navigator. The driver shares their screen.

 

Look at the code and see if you can make sense of how it works.

What are the four files?

How does each type of file work?

How do they work together?

 

Modify the code

(Be bold and break things! -- You're just exploring right now)

 

Step 1: Make a small change to one of the files

Step 2: Save that change

Step 3: Refresh the browser to view the change

Step 4: Repeat

Navigate back to:

https://github.com/code4policy/shopping-days

  • Navigate to any file and hit the edit button

Propose a change

Scroll down to the bottom of the page and propose that change

  

  • Make ONE small modification to any one file (it can be a change in text, background color, image, anything.

 

 

That was your first open source contribution!

 

(unless you've done this before)

Why is this important?

Pick a government agency and go check out their GitHub!

https://github.com/18F

https://github.com/usda

  • Transparency
  • Security
  • Shared infrastructure
  • Lots of other reasons that we will discuss in class
  • Technology decision with policy implications
     

https://github.com/code4policy/modules/blob/main/git/02-intro-github.md#github-for-things-other-than-code

 

 

Q&A

dhrumil_mehta@hks.harvard.edu

1. Go to your fork of the class site: github.com/your-username/simple-website

2. Turn on the web server

Bonus: Your own website

HKS Shopping Days

By Dhrumil Mehta

HKS Shopping Days

  • 252