This is a lightly edited version of the notebook that we worked through in class on 1/22/19.
In class, we went through how to make an API call end-to-end, to get a look at common tasks like figuring out documentation, using libraries, making HTTP requests, etc. Over the weekend, practice with this API and others (you might also try the one at opensecrets.org read more
In-Class Exercise: Data Scavenger Hunt
Pandas Filtering
Before we do our scavenger hunt, here's a piece of useful information you should know: you can filter rows of a Pandas dataframe using something that returns a boolean.
For example, suppose you have a DataFrame called copdf with police officer names in a column called "name" and …
read moreSolutions to Data Scavenger Hunt
Here are some example ways to respond to the prompts in our data scavenger hunt.
Hypothesis Tests on Experimental Data: Housing Discrimination Test Example
Shonubi/Bootstrap exercise
Simpson's Paradox Homework Example
Here is a combination of some of the code Sam kindly showed us in class, plus the visualizations I showed you, for our simpson's paradox example on 3/25/19.
Here are a few additional FYIs:
The source of the underlying dataset is an article entitled "Simpson’s Paradox: A Data Set and Discrimination Case Study read more
Day 1 in-class examples (2020)
In class-examples, January 27, 2020
In class-examples, January 28, 2020
In class-examples, February 3, 2020
In class-examples, February 4, 2020
In class-examples, February 10, 2020
In class-examples, February 11, 2020
In class-examples, February 17, 2020
In class-examples, February 25, 2020
In-Class Notebook, Mar 2, 2020
In-Class Notebook, Mar 3, 2020
There are a bunch of different ways we might think about the example of the application from the fake data from yesterday. We saw a test where the null hypothesis was that the application offering rate for black renters is equal to the overall application offering rate. With that hypothesis, we saw a binomial test, and here's a slightly more filled out version of that test.
read more