Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 1.92 KB

lab_02.md

File metadata and controls

52 lines (38 loc) · 1.92 KB

Lab 2


Objectives

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. Set up groups with different people than 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. Download the NYPD Hate Crime data as a CSV.
  3. Upload the file to Colab.
  4. Load the data with pandas.
  5. Confirm how many records have been loaded.
  6. Compute an aggregate statistic (mean, median, sum, whatever).
  7. Create a visualization.
    • Keep it simple.
  8. Switch to getting the data from the API.
  9. Check how many records the API is returning.
  10. Get the full dataset using pagination.
  11. Check how many results you get total, confirm it matches what's in the data portal.
  12. Do the aggregate statistic and visualization using the expanded dataset and note how they've changed.
  13. Submit via CourseWorks.