-
Notifications
You must be signed in to change notification settings - Fork 0
/
dummy_build.R
42 lines (30 loc) · 1.1 KB
/
dummy_build.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# ENV SET UP -----------------------------------------------
# install.packages("renv")
# renv::init()
# renv::install("devtools")
# renv::install("tidyverse")
# devtools::install_github("cmf-uchicago/cmfproperty")
# renv::snapshot()
# DUMMY PROJECT --------------------------------------------
library(cmfproperty)
library(tidyverse)
df <- cmfproperty::example_data
# contains PIN, SALE_YEAR, SALE_PRICE, ASSESSED_VALUE for 2015-2019
# example file structure
write_csv(df, "input_data/IL_031/2015-2019.csv")
#read in each data set from file structure
df <- read_csv("input_data/IL_031/2015-2019.csv")
#compute small data cleaning, transformations
ratios <-
cmfproperty::reformat_data(
df,
sale_col = "SALE_PRICE",
assessment_col = "ASSESSED_VALUE",
sale_year_col = "SALE_YEAR",
)
# ADDS: TAX_YEAR (XXXX), RATIO (0-1), arms_length_transaction (bool),
# SALE_PRICE_ADJ, and ASSESSED_VALUE_ADJ
# create report
cmfproperty::make_report(ratios,
jurisdiction_name = "Cook County, Illinois",
output_dir = paste0(getwd(),"/output_reports/IL_031"))