R Observatory
Search
install.packages("cmhc")
CRAN 30-day downloads, method
469+20.3% up on the 30 days before, the better direction
Test coverage, method
46%of lines run by tests

Wrapper around the Canadian Mortgage and Housing Corporation (CMHC) web interface. It enables programmatic and reproducible access to a wide variety of housing data from CMHC.

Maintainer
Jens von Bergmann
Latest release
21 Jul 2026
First release
15 Jun 2022

Compare with another package

More details
Releases
11
Needs compilation
No
Needs R
>= 4.1
Config/roxygen2/version
8.0.0
Config/testthat/edition
3
LazyData
true
Subjects (1) Method, Subjects
Cite

Package

Run in R for the authors' preferred citation:

citation("cmhc")
APA
von Bergmann, J. (2026). cmhc: Access, Retrieve, and Work with CMHC Data (Version 0.2.12) [Computer software]. https://doi.org/10.32614/CRAN.package.cmhc
About

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA
Balamuta, J. J. (2026). R Observatory: Metrics for cmhc version 0.2.12 [Data set]. HJJB, LLC. Data release v2026-10-28. https://doi.org/10.5281/zenodo.21843040
About

From data release v2026-10-28, which the citation names so these numbers can be found later.

All 13 check platforms pass.

  • r-devel-linux-x86_64-debian-clang

    The unreleased R on Linux, x86_64, debian-clang

    OK

    Version checked
    0.2.12
    Time taken
    59 s
  • r-devel-linux-x86_64-debian-gcc

    The unreleased R on Linux, x86_64, debian-gcc

    OK

    Version checked
    0.2.12
    Time taken
    46 s
  • r-devel-linux-x86_64-fedora-clang

    The unreleased R on Linux, x86_64, fedora-clang

    OK

    Version checked
    0.2.12
    Time taken
    42 s
  • r-devel-linux-x86_64-fedora-gcc

    The unreleased R on Linux, x86_64, fedora-gcc

    OK

    Version checked
    0.2.12
    Time taken
    46 s
  • r-devel-windows-x86_64

    The unreleased R on Windows, x86_64

    OK

    Version checked
    0.2.12
    Time taken
    85 s
  • r-oldrel-macos-arm64

    The previous release of R on macOS, arm64

    OK

    Version checked
    0.2.12
    Time taken
    25 s
  • r-oldrel-macos-x86_64

    The previous release of R on macOS, x86_64

    OK

    Version checked
    0.2.12
    Time taken
    156 s
  • r-oldrel-windows-x86_64

    The previous release of R on Windows, x86_64

    OK

    Version checked
    0.2.12
    Time taken
    92 s
  • r-patched-linux-x86_64

    The patched release of R on Linux, x86_64

    OK

    Version checked
    0.2.12
    Time taken
    53 s
  • r-release-linux-x86_64

    The current release of R on Linux, x86_64

    OK

    Version checked
    0.2.12
    Time taken
    52 s
  • r-release-macos-arm64

    The current release of R on macOS, arm64

    OK

    Version checked
    0.2.12
    Time taken
    22 s
  • r-release-macos-x86_64

    The current release of R on macOS, x86_64

    OK

    Version checked
    0.2.12
    Time taken
    97 s
  • r-release-windows-x86_64

    The current release of R on Windows, x86_64

    OK

    Version checked
    0.2.12
    Time taken
    85 s
  • 13 OK

Over time

No change since 5 Aug 2026

As a list (3)
ChangedWorst statusOKNotesWarningsErrors
5 Aug 2026OK13000
1 Aug 2026Note12100
10 Mar 2026OK14000

Since March 2026

Check results on CRAN

Total downloads in the last 30 days
482+14% up on the 30 days before, the better directionIt is the sum of 3 channels: CRAN, r2u and autoCRAN.

CRAN rank

6,717 of 26,530

CRAN

469 downloads in the last 30 days

Rank
6,717 of 26,530
Change
+20.3% up on the 30 days before, the better direction

It is in the total. Take it out

r2u

5 downloads in the last 30 days

Rank
9,299 of 30,526
Change
−58.3% down on the 30 days before, the worse direction

It is in the total. Take it out

autoCRAN

8 downloads in the last 30 days

Rank
5,494 of 29,212
Change
−61.9% down on the 30 days before, the worse direction

It is in the total. Take it out

Over time

Compare downloads

Needs
8
Dependent packages
0
Suggested by
0
Needs (8)
Installing it adds
36 packages, 22.0 MB of source
Of those, need compilation
22
Optional extras (8)
Functions
24
Public exports
13
Lines of R code
1,588
Median complexity
3.5
Functions (24)
Size and composition

Lines by kind (2,441)

KindLinesShare
R code1,58865%
Tests1044%
Documentation47019%
Guides27911%

Lines by language

LanguageLinesShare
R1,69269%
Rd47019%
Vignettes27911%

Languages are counted from file extensions.

Files
46
R functions
24
Complexity
Median
3.5
Mean
7.25
Highest
79
Median lines per function
23.5
About complexity

Cyclomatic complexity counts the independent paths through a function: 1 is a straight line, higher is harder to test. R functions only.

Call graph figures
R functions
24
Calls
26
Unconnected
3
Groups
2
Growth (11 releases)
Total lines by release
1,445 on 15 Jun 20222,441 on 21 Jul 2026
Release changes

The tests ran and coverage was measured.

Lines run by tests
46.1%
Expressions run by tests
19.3%
Test cases
10
Exports named in tests
46.2%
Coverage by file (5)
Coverage run
Lines counted
914
Lines the tests ran
421
Tests passed
Yes
Measured with
covr 3.6.5 on R 4.6.1
Test suite
Has tests
Yes
Test frameworks
testthat
Test cases
10
Lines of tests
104
Test lines per line of code
0.07
Exports documented
100%
Arguments documented
100%
Return value documented
92.3%
Help pages with examples
70.6%
Examples run in checks
58.3%
Guides (2)
Other documentation
README
Yes, 417 words
Release notes file
Yes
Help pages
17
Lines of documentation
470
DatasetSizeColumns
cmhc_cma_translation_dataA dataset with geographic identifiers for CMHC and Census at the CMA level153 × 3CMA_UID, METCODE, NAME_EN
cmhc_csd_translation_dataA dataset with geographic identifiers for CMHC and Census at the CSD level5,161 × 4CSDUID, CSDNAME, CSDTYPE, CMHC_CSDUID
cmhc_csd_translation_data_2023A dataset with geographic identifiers for CMHC and Census at the CSD level for 2023 data portal version918 × 2GeoUID, METCODE
cmhc_ct_translation_dataA dataset with geographic identifiers for CMHC and Census at the CT level5,934 × 18CTUID, CMHC_CT, CMHCCT_UID, CSDUID, CSDNAME, CSDTYPE and 12 more

mountainMath / cmhc on github.com

Stars
30+3.5% up on 30 days ago, the better direction
Forks
5
Open issues
3
Last commit
21 Jul 2026
Activity
Commits
155
Open pull requests
1
Tagged releases
10
Latest tagged release
v0.2.12, 21 Jul 2026
Issues closed in
112 days (median)
Pull requests closed in
0 days (median)
Pull requests merged
100%
Created
29 Aug 2017
Licence file reads as
–
Development practices (6)
KindFound
Continuous integrationGitHub Actions, R CMD check workflow
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Docs sourcepkgdown
GitHub Pages site last deployed 2026-07-21
pkgdown site last built 2026-07-21
CRAN release processcran-comments.md
Lint, format, editorRStudio project

Method, repository practices

Across mountainMath

Tools

ToolFirst seenFound
Claude Code21 Jul 2026Seen in the repositoryCLAUDE.mdNamed in .RbuildignoreCLAUDE.md
  • Seen in the repository
  • Named in .Rbuildignore

Across mountainMath

R releases
  • On CRAN
  • Release
VersionReleasedR
0.2.12 current21 Jul 20264.6.1
0.2.104 Feb 20254.4.2
0.2.95 Nov 20244.4.2
0.2.812 Jul 20244.4.1
0.2.713 Dec 20234.3.2
0.2.66 Oct 20234.3.1
0.2.53 Apr 20234.2.3
0.2.420 Jan 20234.2.2
Earlier versions (3)
VersionReleasedR
0.2.310 Oct 20224.2.1
0.2.19 Sep 20224.2.1
0.2.015 Jun 20224.2.0
Release notes (0.2.12)

Minor changes

  • remove dependency on the aws.s3 package, geographic data is now downloaded directly over HTTPS
  • remove a stale hardcoded session cookie from data requests
  • fix a broken error message for invalid named geo_uid values
  • clarify the refresh argument documentation in get_cmhc()
  • silence a spurious many-to-many join warning when building the table list
  • memoize the (static) table registry so it is only assembled once per session
  • add timeouts to all requests to the CMHC and geography servers
  • add a testthat test suite covering the parsing and geography helpers