knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

nationwider

CRAN status Lifecycle: stable Codecov test coverage R-CMD-check

The goal of {nationwider} is to provide house price data from . All datasets available have been curated using tidytools and returned in a convenient rectangular tidy format.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("kvasilopoulos/nationwider")

Example

This is a basic example on how to download data with {nationwider}.

library(nationwider)

np <- nationwider::ntwd_get("new_prop")
np

We reshape our data from the initial form into a wider form.

library(dplyr)
library(tidyr)

np %>% 
  dplyr::filter(type == "Price") %>% 
  spread(region,value)

Here we are plotting all regions using type Index and Price as facets.

library(ggplot2)
np %>% 
  ggplot(aes(Date, value, col = region)) +
  geom_line() +
  facet_wrap(~ type, scales = "free")


kvasilopoulos/nationwider documentation built on Oct. 13, 2024, 7:37 p.m.