Skip to content

Commit

Permalink
Add natural resources to HS classification (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
bleonard33 authored Jun 18, 2019
1 parent 541e461 commit 9c8e899
Show file tree
Hide file tree
Showing 4 changed files with 6,488 additions and 6,407 deletions.
8 changes: 8 additions & 0 deletions product/HS/IntlAtlas/clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,17 @@ def get_hs_services(file="./in/Services_Hierarchy.csv"):
# Append to main table and sort on combined spread out indices
parent_id_table = parent_id_table.append(services).sort_index()

# Hidden products (e.g., garbage, scrap metal)
hidden = pd.read_csv("./in/hidden_products.csv", dtype={"code": str})
## Is shown == Not hidden
parent_id_table["is_shown"] = (~parent_id_table.code.isin(hidden.code)).astype(int)

# Natural Resources
nat_resources = pd.read_csv("./in/natural_resources.csv", dtype={"code": str})
parent_id_table["natural_resource"] = (
parent_id_table.code.isin(nat_resources.code)
).astype(int)

c = Classification(parent_id_table, h)

c.to_csv("out/hs92_atlas.csv")
Expand Down
73 changes: 73 additions & 0 deletions product/HS/IntlAtlas/in/natural_resources.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
code
2502
2509
2511
2512
2526
2528
2530
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2713
2714
2715
2818
3104
7102
7106
7107
7108
7109
7110
7111
7112
7401
7402
7403
7405
7501
7502
7601
7801
7901
8001
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8474
Loading

0 comments on commit 9c8e899

Please sign in to comment.