From 17b1661428d55746a58abb2e9f0ec37dc218ae36 Mon Sep 17 00:00:00 2001 From: timgdavies Date: Mon, 20 Jul 2015 15:04:53 +0100 Subject: [PATCH] Adding commodity reconcilation information --- process/codelist-commodity-match/.gitignore | 3 +++ process/codelist-commodity-match/README.md | 26 ++++++++++++++++++++ process/codelist-commodity-match/endpoint.sh | 6 +++++ 3 files changed, 35 insertions(+) create mode 100644 process/codelist-commodity-match/.gitignore create mode 100644 process/codelist-commodity-match/README.md create mode 100644 process/codelist-commodity-match/endpoint.sh diff --git a/process/codelist-commodity-match/.gitignore b/process/codelist-commodity-match/.gitignore new file mode 100644 index 0000000..dd419be --- /dev/null +++ b/process/codelist-commodity-match/.gitignore @@ -0,0 +1,3 @@ +*.jar +*.txt +*.zip \ No newline at end of file diff --git a/process/codelist-commodity-match/README.md b/process/codelist-commodity-match/README.md new file mode 100644 index 0000000..c6a0a35 --- /dev/null +++ b/process/codelist-commodity-match/README.md @@ -0,0 +1,26 @@ +# Commodity codelist + +The process in this folder describes how to map a list of commodities to the [UN Central Product Classification (CPC) Version 2](http://unstats.un.org/unsd/cr/registry/cpc-2.asp) + +It can be used to set-up a CSV reconciliation endpoint, using [Reconcile CSV](http://okfnlabs.org/reconcile-csv/) against the CPC V 2. database. + +## Related issues: + +* [ResourceProjects.org #19](https://github.com/NRGI/resourceprojects.org/issues/19) + +## Usage + +(1) Run endpoint.sh to download and run the reconcilation endpoint + +(2) In [Open Refine](http://openrefine.org/) create a project with the list of commodity names you want to map + +(3) Against the column of commodity names, choose 'Reconcile > Start Reconciling'. + +(4) If this is the first time you have carried out a CSV reconciliation, choose 'Add standard service' and enter ```http://localhost:8000/reconcile/``` as the address; + +(5) Run the reconciliation process; + +(6) Review the reconciliation to look for matches and set them; + +(7) Add a new column based on the reconciled column, with the grel expression ```cell.recon.match.id``` to extract the code. + diff --git a/process/codelist-commodity-match/endpoint.sh b/process/codelist-commodity-match/endpoint.sh new file mode 100644 index 0000000..cf5dcef --- /dev/null +++ b/process/codelist-commodity-match/endpoint.sh @@ -0,0 +1,6 @@ +echo "Setting up reconciliation endpoint at http://localhost:8000 against UN CPC" +wget http://okfnlabs.org/reconcile-csv/dist/reconcile-csv-0.1.2.jar +wget http://unstats.un.org/unsd/cr/registry/regdntransfer.asp?f=130 +unzip regdntransfer.asp?f=130 +rm regdntransfer.asp?f=130 +java -Xmx2g -jar reconcile-csv-0.1.2.jar CPC_Ver_2_english_structure.txt Description Code \ No newline at end of file