################## ### Module 8 Lab ## Download the "Real Property Taxes" Data from OpenBaltimore: ## https://data.baltimorecity.gov/Property/Real-Property-Taxes/27w9-urtv ## as a .csv file # 1. Read the Property Tax data into R and call it the variable `tax` # 2. How many addresses pay property taxes? ########### ### This code will make the tax amounts numeric # this is coming up in module 9 # check out `?gsub` tax$cityTax = as.numeric(gsub("$","",tax$cityTax,fixed=TRUE)) tax$stateTax = as.numeric(gsub("$","",tax$stateTax,fixed=TRUE)) tax$amountDue = as.numeric(gsub("$","",tax$amountDue,fixed=TRUE)) ########## # 3. What is the total city and state tax paid? # 4. What is the 75th percentile of city and state tax paid by ward? # 5. Split the data by ward into a list: # Using `sapply()` # a. how many observations are in each ward? # b. what is the mean state tax per ward # c. what is the maximum amount still due? # 6. Solve (5) using `table()` and `tapply()`