API wrapper for extracting CMHC data out of the CMHC Housing Market Information Portal.

Reference

Documentation is available on the GitHub pages.

The example vignettes contain some common use cases.

Installation

The stable version of cmhc can be easily installed from CRAN.

install.packages("cmhc")

Alternatively, the latest development version can be installed from Github.

remotes::install_github("mountainmath/cmhc")

Usage

Consult the example vignette for more information. As an example, this is how to extract time series information for vacancy rate data by bedroom type for the Vancouver Census Metropolitan Area (“59933”).

library(cmhc)
vacancy_data <- get_cmhc(survey="Rms",series="Vacancy Rate",dimension="Bedroom Type",
                         breakdown="Historical Time Periods",  geo_uid="59933")

Contributing

  • We encourage contributions to improve this project. The best way is through issues and pull requests.
  • If you want to get in touch, we are pretty good at responding via email or via twitter at @vb_jens.

Cite cmhc

If you wish to cite cmhc:

von Bergmann, J. cmhc: R package to access, retrieve, and work with CMHC data. v0.2.0.

A BibTeX entry for LaTeX users is

  @Manual{,
    author = {Jens {von Bergmann}},
    title = {cmhc: R package to access, retrieve, and work with CMHC data},
    year = {2022},
    note = {R package version 0.2.0},
    url = {https://mountainmath.github.io/cmhc/},
  }

The cmhc package is designed to work well with the cancensus package working with Canadian Census data and matches the census geographies.