Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/import.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ jobs:
repo: Unofficial-Codelists
- importer: humanitarian_plan
repo: Unofficial-Codelists
- importer: sector_humanitarian_cluster
repo: Unofficial-Codelists
name: "Run importer: ${{ matrix.importer }}"
runs-on: ubuntu-latest
steps:
Expand Down
19 changes: 19 additions & 0 deletions importers/sector_humanitarian_cluster.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import csv

from .helpers import Importer, fetch


def run():
url = 'https://gist.githubusercontent.com/markbrough/57106a152dbb26a6f4544a77c6768a64/raw/dac5-clusters-mapping.csv'
lookup = [
('code', 'code'),
('name', 'name'),
('category', 'cluster_code'),
('codeforiati:cluster', 'cluster_name'),
]

Importer('SectorCategoryHumanitarianGlobalCluster', url, lookup)


if __name__ == '__main__':
run()
14 changes: 14 additions & 0 deletions templates/SectorCategoryHumanitarianGlobalCluster.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<codelist xmlns:codeforiati="https://codeforiati.org/" name="SectorCategoryHumanitarianGlobalCluster" category-codelist="HumanitarianGlobalClusters" xml:lang="en" complete="1" embedded="0">
<metadata>
<name>
<narrative>DAC Sector Category and Humanitarian Cluster Mappings</narrative>
</name>
<description>
<narrative>Mapping between DAC Sector Categories and Humanitarian Clusters. Improvements to this codelist are welcome!</narrative>
</description>
<category>
<narrative>Maintained</narrative>
</category>
</metadata>
<codelist-items/>
</codelist>