Skip to content

Commit

Permalink
Adding commodity reconcilation information
Browse files Browse the repository at this point in the history
  • Loading branch information
timgdavies committed Jul 20, 2015
1 parent 069b2bc commit 17b1661
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
3 changes: 3 additions & 0 deletions process/codelist-commodity-match/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.jar
*.txt
*.zip
26 changes: 26 additions & 0 deletions process/codelist-commodity-match/README.md
Original file line number Diff line number Diff line change
@@ -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.

6 changes: 6 additions & 0 deletions process/codelist-commodity-match/endpoint.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 17b1661

Please sign in to comment.