Skip to content

Postal Code Conversion Files

Dataset name Postal Code Conversion File and Postal Code Conversion File Plus
Permanent URL There are multiple PCCF/PCCF+ records in Abacus; this Abacus search URL will return many of them
Data access rules Restricted to researchers currently affiliated with SFU, UBC, UNBC, and UVic

Postal Code Conversion Files allow researchers to map postal codes to Census geographies. Data with postal codes can be aggregated to standard geographies for reporting purposes or combined with other data available by Census geography (e.g. census tract, census subdivision).

Note

PCCF files do not contain any socioeconomic or demographic data themselves, they are just a key for aggregating or combining data files from other sources.

Postal Code Conversion Files come in two flavours, the PCCF and PCCF+. Postal Code boundaries do not perfectly match census boundaries: one postal code may span multiple census subdivisions, for example. The PCCF and PCCF+ differ in how they handle this kind of overlap.

  • The PCCF file contains a Single Link Indicator (SLI) field to indicate the geographic area with the majority of dwellings assigned to a particular postal code.
  • The PCCF+ is a SAS program using a population weighted random algorithm to increase accuracy where postal codes span over more than one geographic area

from Queen's University Library's Guide to the PCCF/PCCF+

Which PCCF/PCCF+ file should I use?

There are more than 50 PCCF/PCCF+ files in Abacus with different dates. This is because Postal Code and Census geographies change over time. Choose a PCCF/PCCF+ file with a Postal Code date as close as possible to the collection date of the data that contains the Postal Codes.

Guides to the PCCF/PCCF+

Queens University Library maintains an excellent guide on PCCF and PCCF+ files, including step-by-step instructions for using the PCCF+ with SAS: https://guides.library.queensu.ca/PCCF/PCCF.

PCCF helper scripts

Recent PCCF files in Abacus include an SPSS syntax file to parse the data and assigns labels, making it easier to work with. Older PCCF records may only come with data files (e.g. this 2003 version).

When no syntax file is available researchers can use other tools to parse the data. The R script below provides an example that can be adapted to other files and contexts.

pccf_prep_script.R
# PCCF processing script, for June 2003 postal codes, 2001 Census
# source files at https://hdl.handle.net/11272.1/AB2/QA758U
# script assumes source files are in R working directory:
#
#   - pccf59_JUN03_fccp59.txt
#   - fed02.dat
#   - cd02.dat
#   - sac03.dat

# install readr package
install.packages("readr")

# load readr for use
library(readr)

# read pccf data file and parse into columns based on 'record layout' on p13 of PCCF reference guide
# store output as 'formatted_pccf'

formatted_pccf <- read_fwf(
  "pccf59_JUN03_fccp59.txt",
  fwf_widths(
    c(6,3,8,2,9,11,1,2,4,3,70,3,3,3,1,7,2,4,5,4,1,1,1,30,1,1,8,8),
    c("Postal Code", "FSA", "DAuid", "Block", "Lat", "Long", "SLI", "PR",
      "CDuid", "CSD", "CSDname", "CSDtype", "CCS", "SAC", "SACtype", "CTname",
      "ER", "DPL", "FED96uid", "UARA", "UARAtype", "Rep_Point", "PCtype",
      "Comm_Name", "DMT", "H_DMT", "Birth_Date", "Ref_Date")))

# import and format label files

FED96 <- read_fwf(
  "fed02.dat",
  fwf_widths(
    c(5,100),
    c("FED96uid", "FED96name")))

SAC <- read_fwf(
    "sac02.dat",
  fwf_widths(
    c(3,100),
    c("SAC", "SACname")))

CD <- read_fwf(
  "cd02.dat",
  fwf_widths(
    c(4,100),
    c("CDuid", "CDname")))

# merge to add labels

tmp_pccf_1 <- merge (
  formatted_pccf, 
  FED96, 
  by="FED96uid", 
  all.formatted_pccf=TRUE, 
  all.FED96=FALSE
)

tmp_pccf_2 <- merge (
  tmp_pccf_1,
  SAC,
  by="SAC",
  all.tmp_pccf_1=TRUE,
  all.SAC=FALSE
)

pccf_with_labels <- merge (
  tmp_pccf_2,
  CD,
  by="CDuid",
  all.tmp_pccf_2=TRUE,
  all.SAC=FALSE
)

## save merged and formatted data as .csv

write.csv(pccf_with_labels,"pccf_with_labels.csv")
Back to top