mountainMath / mountainMath/cmhc

Column name variability - MET_CODE versus METCODE

Open
#12 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
R
Stars
29
Forks
5
PR merge metrics
No merged PRs in 30d

Description

The function get_cmhc_geography appears to have differerent column names for the METCODE depending on the level of geography selected.
The ZONE level is called MET_CODE while the MET level is called METCODE.
The latter looks like it might be hardcoded in the internal function census_to_cmhc_geocode, while the former may come from the gdb files.

library(tidyverse)
library(cmhc)
get_cmhc_geography("ZONE") %>%  select(starts_with("MET") )
get_cmhc_geography("MET") %>%    select(starts_with("MET") )

image

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with get_cmhc_geography and inspect the internal census_to_cmhc_geocode path for the ZONE and MET cases shown in the issue. Compare the returned MET-related column names for both geography levels; the work is done when the naming is handled consistently and the examples no longer produce different METCODE columns.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.