get_ZIP3_hpi: get ZIP3 HPI data

Description Usage Arguments Value Examples

View source: R/HPI.R

Description

get ZIP3 level Home Price Index data

Usage

1
get_ZIP3_hpi(zip3file = NULL, from_year = NULL, out.Monthly = TRUE)

Arguments

zip3file

The filename for the data downloaded from "https://www.fhfa.gov/DataTools/Downloads/Documents/HPI/HPI_AT_3zip.xlsx". If this is null, the function will connect to the download site.

from_year

Four digits representing the data starting year.

out.Monthly

TRUE means Monthly data, FASLE means Quarterly data.

Value

data in the data.table format with columns (ZIP3, Date, Index)

Examples

1
2
3
4
      # get recent ZIP3 Home Price Index (monthly) since 2010
      zip3hpi_m    <- get_ZIP3_hpi(from_year=2010, out.Monthly=TRUE)
      # get recent ZIP3 (US) Home Price Index (quarterly) since 2000
      zip3hpi_Q    <- get_ZIP3_hpi(from_year=2000, out.Monthly=FALSE)

xdderekchen/rEconEnv documentation built on Feb. 23, 2020, 7:55 a.m.