Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.72 KB

File metadata and controls

49 lines (33 loc) · 1.72 KB

Lab 2


Goals

Students:

  • refresh their memories on working with Jupyter and pandas
  • get practice with pagination and concatenation of datasets

Steps

We'll be doing this lab as pair programming, with the TA floating around to help.


Full class together

  1. Go over pair programming.
  2. Talk through the steps below.
  3. Get in groups of 2-3 (unrelated to the project teams).

In groups

Students can look back at the Computing in Context slides if needed.

  1. One person in each group, create a new notebook in Google Colab.
    1. Add everyone's name.
    2. Share it with your teammate(s).
  2. Load the NYPD Hate Crime data into pandas.
  3. Confirm how many records have been loaded.
  4. Compute an aggregate statistic (mean, median, sum, whatever).
  5. Create a visualization.
    • Keep it simple.
  6. Switch to getting the data from the API.
  7. Check how many records the API is returning.
  8. Get the full dataset using pagination.
  9. Check how many results you get total, confirm it matches what's in the data portal.
  10. Do the aggregate statistic and visualization using the expanded dataset and note how they've changed.
  11. Submit via CourseWorks.