Open Postal Code Correspondence
Overview
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.
- Release artifacts are no longer cached in the user's home filespace by default.
cache_dirnow defaults toNULL, which resolves to a session temporary directory unless you pass a path, setOPCC.cache_dirorOPCC_CACHE_DIR, or accept the one-time prompt offered in an interactive session. A non-interactive session is never prompted, and writes nothing outsidetempdir()unless permission was granted earlier or one of those settings is present. See?clear_opcc_cachefor the resolution order. DESCRIPTIONnow cites the Statistics Canada and GeoNames sources the correspondences are derived from.- The README and vignette rebuild walkthroughs now pass the required
output_dirtobuild_centroids(),build_db_assignment()andbuild_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 theshiny-appsubdirectory, 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
- OK13 OKNow
- OK4 OK2026-09-22
Documentation
- 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%
- Using OPCC HTML
Downloads
Repository
- 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
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.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
Show all practicesHide 1 practice
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-07-17Named in .Rbuildignore: .claudeNamed in .gitignore: .claude, .mcp.json, CLAUDE.mdCommits: at least 22 crediting it in the message
- Codexfirst seen 2026-08-24Named in .Rbuildignore: .codexNamed in .gitignore: .codex
- GitHub Copilotfirst seen 2026-08-31Commits: at least 6 crediting it in the message
- Gemini CLIfirst seen 2026-09-11Named in .gitignore: GEMINI.md
- OpenCodefirst seen 2026-09-11Named in .gitignore: .opencode, opencode.json
- Claude Opus 519 commits · Aug to Sep 2026
- Claude Fable 53 commits · Jul 2026
Dependencies
Code & Tests
People & History
- 1.0.1Latest2026-09-22 · current release
- RR 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")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.
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.