House price index - Item weights - prc_hpi_inw

Data - Eurostat

purchase

Code
prc_hpi_inw %>%
  left_join(purchase, by = "purchase") %>%
  group_by(purchase, Purchase) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) print_table(.) else .}
purchase Purchase Nobs
TOTAL Total 609
DW_EXST Purchases of existing dwellings 579
DW_NEW Purchases of newly built dwellings 579

geo

Code
prc_hpi_inw %>%
  left_join(geo, by = "geo") %>%
  group_by(geo, Geo) %>%
  summarise(Nobs = n()) %>%
  arrange(-Nobs) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

time

Code
prc_hpi_inw %>%
  group_by(time) %>%
  summarise(Nobs = n()) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}

Table

png

Javascript

Code
prc_hpi_inw %>%
  filter(time == "2020") %>%
  left_join(geo, by = "geo") %>%
  mutate(values = round(values),
         Geo = ifelse(geo == "DE", "Germany", Geo)) %>%
  select(geo, Geo, purchase, values) %>%
  spread(purchase, values) %>%
  {if (is_html_output()) datatable(., filter = 'top', rownames = F) else .}