Exercise

The Borrower Income Ratio

The borrower income ratio is the ratio of the borrower’s (or borrowers’) annual income to the median family income of the area for the reporting year. This is the ratio used to determine whether borrower’s income qualifies for an income-based housing goal.

In the data set mort, missing values are recoded as 9. In this exercise, we replaced the 9's in the "borrower_income_ratio" column with NA, so you can create a table of the borrower income ratios.

Instructions

100 XP
  • Load the biganalytics and dplyr packages.
  • Call summary() on mort to check that "borrower_income_ratio" now has NAs.
  • Using bigtable(), create a table of borrower income ratios for each year.
  • Use dplyr's mutate() to add a new column BIR.