Crandore Hub

canpumf

Parse StatCan PUMF Files

Facilitate working with Statistics Canada (StatCan) Public Use Microdata Files (PUMF). Enables downloading of available PUMF data, parsing of metadata from command files or other sources to infer the layout structure, variable labels and value labels as well as missing data values, and returns a connection to a 'DuckDB' database with the labelled data. Data and documentation come from Statistics Canada's Public Use Microdata Files <https://www.statcan.gc.ca/en/microdata/pumf>, distributed under the Statistics Canada Open Licence <https://www.statcan.gc.ca/en/terms-conditions/open-licence>.

README

# Bundled extdata resources

Files under `inst/extdata/` are internal package resources used by the metadata
parser. They are **not** user-facing data objects and are loaded programmatically
via `system.file("extdata", ..., package = "canpumf")`.

## `census_1991/`

English SPSS/XMF command files for the 1991 Census of Population Public Use
Microdata Files (PUMF):

| File         | PUMF type    |
|--------------|--------------|
| `IND91.XMF`  | Individuals  |
| `HHOLD91.XMF`| Households   |
| `CNCF91.XMF` | Families     |

**Why they are bundled:** the 1991 Census PUMF is distributed by Statistics
Canada as French-only EFT archives, and the downloaded `.XMF` command files
(encoded CP850) therefore carry only French variable and value labels. These
bundled English command files supply the corresponding English labels so that
`get_pumf("Census", "1991 (...)")` populates both `label_en` and `label_fr`.

They are referenced from the survey registry via the `bundled_eng_sps` field
(see `R/registry.R`, the `Census/1991 (...)` entries) and read by the SPSS
command-file parser (`R/metadata_parsers.R`).

**Source:** Statistics Canada, 1991 Census Public Use Microdata Files.

Versions across snapshots

VersionRepositoryFileSize
0.5.2 rolling linux/jammy R-4.5 canpumf_0.5.2.tar.gz 1.0 MiB
0.5.2 rolling linux/noble R-4.5 canpumf_0.5.2.tar.gz 1.0 MiB
0.5.2 rolling source/ R- canpumf_0.5.2.tar.gz 919.4 KiB
0.5.2 latest linux/jammy R-4.5 canpumf_0.5.2.tar.gz 1.0 MiB
0.5.2 latest linux/noble R-4.5 canpumf_0.5.2.tar.gz 1.0 MiB
0.5.2 latest source/ R- canpumf_0.5.2.tar.gz 919.4 KiB
0.5.2 2026-04-23 source/ R- canpumf_0.5.2.tar.gz 0 B

Dependencies (latest)

Imports

Suggests