Description Usage Arguments Details Value See Also Examples
View source: R/get_hpsi_data.R
Get home purchase sentiment index data
1 | get_hpsi_data(age_group = NA)
|
age_group |
a number between 1 and 4 which may be passed into the function
as a character. By default, |
The home purchase sentiment index (HPSI) is an index calculated using Fannie Mae's National Housing Survey data to represent consumer's home purchase sentiment. Details can be found here.
A tbl_df
with the columns date
, age_group
, and hpsi_value
.
get_nhs_data
1 2 3 4 5 6 7 8 | ## This gets HPSI data for all ages aggregated
hpsi_all_ages <- get_hpsi_data()
## getting HPSI data for respondents aged 18-34 years old
hpsi_18_34 <- get_hpsi_data(age_group = 1)
## query the API 4 times to get data for all age groups unaggregated
hpsi_all_unagg <- purrr::map_dfr(1:4, get_hpsi_data)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.