Skip to content

Open Postal Code Correspondence

0packages depend
417downloads / year
66.2%test coverage
13/13flavors OK

Overview

About

An open, fully reproducible alternative to closed postal code conversion files, giving source-qualified many-to-many correspondence between Ontario postal codes and Statistics Canada 2021 census geographies. Every published artifact can be rebuilt step by step from public sources using the included build functions, so any user can reproduce and audit the conversion end to end. Lookup results retain allocation weights, evidence source, lineage, method, and vintage; unmatched postal codes remain explicit, and versioned release artifacts are checksum-verified before use. A built-in 'shiny' application provides a point-and-click interface for joining, mapping, and exporting results. Correspondences are derived from the Statistics Canada National Address Register https://www150.statcan.gc.ca/n1/pub/46-26-0002/462600022022001-eng.htm, the 2021 Census Geographic Attribute File https://www12.statcan.gc.ca/census-recensement/2021/geo/aip-pia/attribute-attribs/index-eng.cfm, and the GeoNames postal code export https://download.geonames.org/export/zip/. The package does not redistribute Canada Post, PCCF, or PCCF+ data and does not claim authoritative postal assignments.

Changes in 1.0.1
  • Release artifacts are no longer cached in the user's home filespace by default. cache_dir now defaults to NULL, which resolves to a session temporary directory unless you pass a path, set OPCC.cache_dir or OPCC_CACHE_DIR, or accept the one-time prompt offered in an interactive session. A non-interactive session is never prompted, and writes nothing outside tempdir() unless permission was granted earlier or one of those settings is present. See ?clear_opcc_cache for the resolution order.
  • DESCRIPTION now cites the Statistics Canada and GeoNames sources the correspondences are derived from.
  • The README and vignette rebuild walkthroughs now pass the required output_dir to build_centroids(), build_db_assignment() and build_m2(). The documented calls previously omitted it and errored.
Show all changes in 1.0.1Hide the rest of the changes in 1.0.1
  • clear_opcc_cache() now also removes the Shiny app's reusable map artifact from the shiny-app subdirectory, which the prompt and README already said it would.
  • README.md and NEWS.md are now included in the package, so they appear on the CRAN package page.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 2.7 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OKNow
  • OK4 OK2026-09-22
Advisories

none known

Documentation

In release 1.0.1
READMEYes · 644 wordsVignettesYes · 1 · dynamicNEWSYes · 100% structured · mentions 1.0.1Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
29includes a package overview page
Examples that run
68%19 run in a plain check (1 of them under a condition) · 9 only when donttest examples are enabled (R CMD check --as-cran)
Exported functions with examples
100%
Documented parameters
100%
Return-value docs
100%
Help pages citing references
0%
Vignettes (1)

Downloads

417
CRAN downloads in the past year
Rank #25,060 · ~1/day · ~35/mo
Daily download trend is not available in this view yet.
41730 days
41790 days
4171 year
Compare downloads with other packages →
Also on5 r2u1 autocran

Repository

0Stars
0Forks
0Open issues
0Open PRs
0Releases
Last activity 2026-09-12
Responsiveness
How these are sampled
PRs merged (all time)
100%
Median days to close, 50 most recently updated closed issues
not measured
Median days to close, 50 most recently updated closed PRs
not measured
PracticesBeta

12 development-tooling and community-health practices detected across 5 families in the upstream repository

Checks run against github.com/lennon-li/opcc on 2026-10-18.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Governance and community (6)
Code of conductContributing guideIssue templatesPR templateSecurity policyGovernance doc
Docs source (1)
pkgdown
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Show all practicesHide 1 practice
Research and citation (1)
CITATION.cff
How this is detected·Detection ruleset v3 (2026-09-26)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-07-17
    Named in .Rbuildignore: .claude
    Named in .gitignore: .claude, .mcp.json, CLAUDE.md
    Commits: at least 22 crediting it in the message
  • Codexfirst seen 2026-08-24
    Named in .Rbuildignore: .codex
    Named in .gitignore: .codex
  • GitHub Copilotfirst seen 2026-08-31
    Commits: at least 6 crediting it in the message
  • Gemini CLIfirst seen 2026-09-11
    Named in .gitignore: GEMINI.md
  • OpenCodefirst seen 2026-09-11
    Named in .gitignore: .opencode, opencode.json
Models named in its commits
  • Claude Opus 519 commits · Aug to Sep 2026
  • Claude Fable 53 commits · Jul 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
20 external dependencies (excludes base and recommended)

Installing OPCC adds 2 packages (2 with compiled code, 1.2 MB of source tarballs). Heaviest: jsonlite 1.0 MB, digest 231 KB.

Depends (1)
R >= 4.1
Imports (2)
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (1)
Author, Maintainer since 1.0.1 (2026), Copyright holder
Releases (1)
  • 1.0.1Latest
    2026-09-22 · current release
  • R
    R 4.6.0 released · 2026-04-24

Package metadata

First published
2026-09-22
Total releases
1 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1
Download size
118 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("OPCC")
Li, L. (2026). OPCC: Open Postal Code Correspondence (Version 1.0.1) [Computer software]. https://doi.org/10.32614/CRAN.package.OPCC

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

The repository also keeps a CITATION.cff.

Cite the 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 OPCC version 1.0.1 [Data set]. HJJB, LLC. Data release v2026-10-22. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy