Skip to content

Commit

Permalink
Add six-digit (all work done by Brendan!)
Browse files Browse the repository at this point in the history
  • Loading branch information
makmanalp committed Jun 12, 2018
1 parent c090619 commit 233f2ae
Show file tree
Hide file tree
Showing 6 changed files with 15,126 additions and 1,248 deletions.
7 changes: 4 additions & 3 deletions product/HS/IntlAtlas/clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"section": [],
"2digit": [],
"4digit": [],
"6digit": [],
}

h = Hierarchy(["section", "2digit", "4digit"])
h = Hierarchy(["section", "2digit", "4digit", "6digit"])
parent_code_table = repeated_table_to_parent_id_table(hierarchy, h, fields)
parent_code_table.code = parent_code_table.code.astype(str)
parent_code_table = parent_code_table.merge(names, on=["code", "level"])

# Sort by level order (not necessarily alphabetical)
Expand All @@ -36,7 +36,8 @@
level_starts = {
"section": 0,
"2digit": 100,
"4digit": 650
"4digit": 650,
"6digit": 5000,
}
parent_id_table = spread_out_entries(parent_id_table, level_starts, h)

Expand Down
Loading

0 comments on commit 233f2ae

Please sign in to comment.