File Naming Convention

File Naming Convention

Data for Canada: File Naming Convention (DFC-FNC)

Background

You will need to understand these concepts to fully grasp the file naming convention.

See Statistics Canada’s geographic hiearchy and use the Census of Population 2021 Dictionary to understand their conceptual model of representing Canada.

geographic hierarchy.

1. The Current Schema

All published datasets must adhere to the following structure to ensure files are machine-parsable, sortable by region, and identifiable by human readers. This file naming convention will be modified as we solidify our processes.

We are open to feedback on the current file naming convention.

Syntax

[iso-region]_[source-identifier]-[DGUID]_[packages_collection]_[iso-date]_[variant]_[version].[extension]

Example: ca-ab_city-of-edmonton-2023A00054811061_orthoimagery_2023_075mm_v0.0.1.pmtiles

Component Breakdown

SegmentDefinitionFormat / RulesExample
1. ISO RegionThe ISO 3166-1 alpha-2, which is a two-letter country code, or ISO 3166-2 which identifies the principal subdivisions (ex. provinces, states, etc.)Lowercase. Hyphenated.ca, ca-ab
_SeparatorUnderscore
2. Data Source and DGUIDData Source and DGUID.Use [data-source-name] for the data source and the DGUID for the geographic area it covers.city-of-edmonton-2023A00054811061, statcan-2021A000011124
_SeparatorUnderscore
3. PackageThe package name for the dataset (see High-Level Overview).Lowercase. snake_case allowed for longer titles.orthoimagery
_SeparatorUnderscore
4. ISO DateThe vintage of the data source.ISO 8601. Flexible precision.2023, 2023-06, 2023-06-01, 2026-02-11T19:50:58
_SeparatorUnderscore
5. VariantResolution or specific subset info.No Projections. Alphanumeric. Units included.075mm, 30cm
_SeparatorUnderscore
6. VersionSemantic Versioning.v[Major].[Minor].[Patch]v0.0.1

2. Component Detail

A. Source / Location ID (Flexible)

This segment defines the “Who” of the dataset.

  • Use the Data Source Name + Hyphen + DGUID.
    • Example: city-of-edmonton-2023A00054811061

B. The DGUID (Capitalization Exception)

If using a DGUID (Dissemination Geography Unique Identifier), you must adhere to Statistics Canada standards.

  • Link: Statistics Canada: DGUID Definition
  • Rule: While the rest of the filename is lowercase, you must capitalize the structural type letter (e.g., ‘A’ for Administrative areas, ‘S’ for Statistical areas) within the DGUID.
  • Example: 2021A0005... (Correct) vs 2021a0005... (Incorrect).

C. ISO Date Flexibility

Dates follow strictly ISO 8601, but the precision can vary based on the nature of the data (Year, Month, or Day).

Examples of Date Precision:

  • Month Precision: ca_statcan-2024A000011124_2024-12_v0.0.1.parquet
  • Day Precision: ca_statcan-2025A000011124_2025-04-15_v0.0.1.parquet

D. Variant

This field is strictly for resolution (e.g., 075mm, 1m) or content subsets.

  • Rule: Do not include projection information (e.g., EPSG:3857, NAD83) in the filename.
  • Reasoning: Projection details are handled exclusively in the file format metadata or the accompanying FAIR Data Catalogue item.

E. Semantic Versioning

We use SemVer (vMAJOR.MINOR.PATCH) to track changes to datasets.

ComponentLogic for DataExample Scenario
MAJORBreaking Change. The schema changed, columns were renamed/removed, or the meaning of the data changed significantly. Old code will break.v0.0.1 β†’ v1.0.0
(Renamed column geo_id to dguid)
MINORNew Feature (Non-Breaking). New columns were added, or coverage was expanded, but old columns remain. Old code still runs.v0.0.1 β†’ v0.1.0
(Added a population_density column)
PATCHBug Fix. Incorrect data values were fixed, but the schema (columns) is identical.v0.0.1 β†’ v0.0.2
(Fixed typo in metadata or coordinate precision)

3. Helper Tools

Statistics Canada Geography Search

In the tool below, you can click on each individual DGUID to see their associated geography.

To accurately populate the DGUID segment of the schema, use this tool to find 2021 Census geographies and their corresponding DGUIDs.

Last updated on