get_State_hpi: get State HPI data

Description Usage Arguments Value Examples

View source: R/HPI.R

Description

get State level Home Price Index data

Usage

1
get_State_hpi(statefile, from_year = NULL, out.Monthly = TRUE)

Arguments

statefile

The filename for the data downloaded from "https://www.fhfa.gov/DataTools/Downloads/Documents/HPI/HPI_AT_state.csv". 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 (State, Date, Index)

Examples

1
2
3
4
      # get recent States Home Price Index (monthly) since 2010
      statehpi_m    <- get_State_hpi(from_year=2010, out.Monthly=TRUE)
      # get recent States Home Price Index (quarterly) since 2000
      statehpi_Q    <- get_State_hpi(from_year=2000, out.Monthly=FALSE)

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