/data-institute-2019

Materials for the ProPublica Data Institute 2019

Data Institute 2019

For students of https://projects.propublica.org/graphics/ida-propublica-data-institute

Here are all of the materials we used to teach the 2019 Data Institute: slides, exercises, links, and homework. This is not an online course and doesn’t have all the context or instruction to be a standalone class.

Want to use our slides? Our teaching materials fall under the same Creative Commons license we use across our site. Get more details here.

Curriculum

Table of Contents

Click to jump directly to:

Week 1:

Week 2:

Welcome Reception & Install Party

ACCOUNTS

SOFTWARE

Macs

  • Open your Terminal app (comes with all Macs) and paste these exact commands into the window, one at a time, and press enter:
  • xcode-select --install
  • python -V
    • Your Terminal should say something like "Python 2.7.13". Your last two digits might be different, that's okay. If you get something that Python 3, which looks like: "Python 3.X.XX" let Sisi know.
  • curl https://bootstrap.pypa.io/get-pip.py | sudo python
    • This will ask you to put in your computer password. Go ahead, and quick warning: the cursor won't move, but trust that your computer is reading what you're typing in.
  • pip install --user BeautifulSoup
  • pip install --user Requests

Windows

  • Download Cygwin
    • Here's a screenshot-by-screenshot walkthrough of what installing it should be like.
    • PLEASE NOTE:
      • On step 9, installing packages, you only need to select pythonand git as packages to install. If there are multiple versions of python options, pick python2.
      • Only go through steps 1-10. Do not continue to the "Setup Notes" section of the walkthrough.

Day 1

Monday, July 22

Intro to Data Journalism

Exercises

No Homework! Enjoy the city!

Day 2

Tuesday, July 23

Analyzing Data

Exercises

No Homework! Enjoy the city!

Day 3

Wednesday, July 24

Analyzing Data, continued

Resources

No Homework! Enjoy the city!

Day 4

Thursday, July 25

Intro to Code

In-Class Demos

  • What coding languages have you heard of?
  • Using the web inspector

How Websites Work

In-Class Demos

  • How the Internet passes websites around
  • What HTML, CSS and Javascript contribute to a webpage

Exercises

  • Drawing a Website

HTML

In-Class Demos

  • How to create your first HTML file
  • Shortcut to the basic HTML template
  • How to use:
    • <h1>
    • <h2>
    • <h3>
    • <p>
    • <img>
    • <a>
    • <ul>

Exercises

  • Copy and paste this code and follow the instructions inside to format the page.
  • Can you fix this broken code?

Basic CSS

In-Class Demos

  • How to create your first CSS file
  • Shortcut to linking to your CSS file
  • How CSS styles work

Exercises

  • Using your practice HTML file from before, add CSS styles to it such you change the:
    • color
    • font-family
    • font-size
  • On your own, look up how to do the following in CSS, and add it to your HTML file as well:
    • underline text
    • bold text
    • italicize text
  • Going back to the Supreme Court article you formatted earlier, do the following using CSS:
    • Make the main headline dark red.
    • Use the font family "Georgia" for the main headline and the subheadline.
    • Center the text of the main headline and the subheadline.
    • Give the paragraphs a line height of 19 pixels.
    • Remove the underline from the links.
    • Make the "Related articles" label all uppercase.
    • Bonus: Make an underline appear when you hover over a link.

CSS Classes

In-Class Demos

  • How to write your own CSS Class
  • How CSS deals with conflict

Homework

  • Save this HTML onto your computer. Link to a new CSS file that you create. Write CSS to make the end result look like this image. You may only write CSS. You cannot edit the HTML file.
  • Using HTML and CSS, lay out a one-page web portfolio for yourself. Don't worry too much about the final design, though you are free to get started designing. Just make sure to get all of your information on the page and formatted using HTML.

Day 5

Friday, July 26

Intro to Design

Lecture

  • What's Design Anyways?
  • Design Principles: The Only 4 Rules You Gotta Know

Exercises

  • Align This!
  • Resume Redesign

Type, Layout & Color

Lecture

  • Letter: The Many Faces of Type
  • Text: How to Deal with Words
  • The Grid: Putting the Pieces Together
  • Colors & How to Pick 'Em

Exercises

  • Name that Font!
  • Type Crimes

Let's make a webpage!

Exercises

  • Making a website
  • Getting your portfolio on the internet!
  • Using the GitHub Desktop app

Homework

  • Using the principles we discussed today, redesign your resume. Email the before and after version to lena.groeger@propublica.org.
  • Using everything you've learned about design, type & layout, keep working on your portfolio HTML page. Then, since you've learned how to make a working webpage on the internet, upload your page to Github.
  • Here's Lena's big list of resources that may come in handy next week.



📚 Weekend! 🎉

Day 6

Monday, July 29

Javascript and JQuery

Review

  • Making a Website with Cards ♠️
  • Reminder to send Lena your resumes!
  • Going over homework from last Thursday

In-Class Demos

Exercises

  • Save this code onto your computer as separate HTML and CSS files. Create a new JS - file and link to it in your HTML.
  • Let's talk through logically, what needs to happen together.
  • Can you figure out how to build a before and after graphic using Javascript?

Homework

  • Using your own photos, make your own before and after interactive. Then, publish your interactive on Github and add it to your portfolio.

Day 7

Tuesday, July 30

Visualizing Data

Lecture

  • Bars
  • Lines
  • Scatterplots, Small Multiples, and More!

Let's Make Some Charts & Maps!

In-Class Demos

  • From data to charts in Google Sheets & Data Wrapper

Homework

  • Keep working on your portfolios!
  • Send Lena your before/after resumes if you haven't yet done so.

Day 8

Wednesday, July 31

Web Scraping + Fundamentals of Programming

In-Class Demos

  • Introduction to Web Scraping
  • Thinking through how to scrape this website
  • Download and unzip this folder into your "Code" folder on your computer
  • Fundamentals of Programming
  • Want to review later? Everything we're covering is laid out here.

Exercises

We'll do the first two together, and you'll do the rest on your own.

  1. Write a function, named copycat, that simply prints out whatever input it's given.
  2. Write a function, named addition, that when given any three numbers, will print out the total sum of all three numbers.
  3. Write a function, named conversion, that when given the Fahrenheit temperature, will print out what it is in Celsius. The formula you can use is: C = (F – 32) * 5/9
  4. Write a function, named find_the_max, that given any three numbers, will print out the bigger number. Python has the native ability to do this, using the function max(). Do not use it. Instead write this from scratch.
  5. For an extra challenge: Given the following data, write a function, named total_students, that calculates how many total students are enrolled in Hogwarts.
    pupils_by_year = [["first years", 40], ["second years", 40], ["third years", 38], ["fourth years", 35], ["fifth years", 30], ["sixth years", 29], ["seventh years", 23]]

Homework

  • Keep working on your portfolios and presentations.
  • See if you can write yourself any other functions. It'll help you gear up for tomorrow.

Day 9

Thursday, August 1

Web Scraping, Continued

In-Class Demos

  • Even more web scraping!

Homework

  • Prepare your presentation for tomorrow! Send a URL of the project you want to show to data.institute@propublica.org by tomorrow at 9:30am. Here are some questions to think about:
  • General: What did you learn? What can you do now that you could not do 2 weeks ago? What were the biggest challenges/setbacks/frustrations you faced? The biggest surprises/succeses/most awesome things you accomplished?
  • Project specific: Tell us what you’re presenting: your portfolio, a dataset you analyzed, a data visualization you created. What are you proud of? What are the next steps you want to take? What are your ultimate goals for the project?

Day 10

Friday, August 2