@mailwoman/un-locode-lookup 11.1.0 → 11.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +16 -7
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,19 +1,19 @@
1
1
  # @mailwoman/un-locode-lookup
2
2
 
3
- Place → **UN/LOCODE** (the UNECE Code for Trade and Transport Locations — `US NYC`, `NL RTM`). Look up
4
- by country + place name, or by nearest coordinate. `node:sqlite` over the UNECE code list. An
5
- [`@mailwoman/annotations`](../annotations) `Annotator`.
3
+ This package maps places to **UN/LOCODE** (the UNECE Code for Trade and Transport Locations — `US NYC`,
4
+ `NL RTM`). It looks up entries by country and place name or by nearest coordinate. It uses `node:sqlite`
5
+ over the UNECE code list and provides an [`@mailwoman/annotations`](../annotations) `Annotator`.
6
6
 
7
7
  ## Build the DB
8
8
 
9
- ```bash
9
+ ```sh
10
10
  # from the UNECE code list (e.g. datasets/un-locode code-list.csv)
11
11
  npx @mailwoman/un-locode-lookup build --csv code-list.csv --out un-locode.db
12
12
  ```
13
13
 
14
14
  ## Look up
15
15
 
16
- ```bash
16
+ ```sh
17
17
  npx @mailwoman/un-locode-lookup --db un-locode.db --country NL --name "Rotterdam"
18
18
  # {"unLocode":"NL RTM"}
19
19
 
@@ -34,5 +34,14 @@ const annotator = makeUnLocodeAnnotator(lookup) // fills AnnotationSet.unLocode
34
34
  ```
35
35
 
36
36
  Name matching is diacritic-folded and case-insensitive. ~80% of UN/LOCODE entries have coordinates
37
- (93k of 116k), so `nearest` is broadly useful; `byName` is exact. Data: UNECE UN/LOCODE (public domain
38
- code list).
37
+ (93k of 116k), so `nearest` is broadly useful; `byName` is exact.
38
+
39
+ ## Data terms
40
+
41
+ The code list is UNECE's UN/LOCODE, and this package ships no copy of it. The UN/LOCODE site's terms
42
+ grant use "for the User’s personal, non-commercial use, without any right to resell or redistribute
43
+ them or to compile or create derivative works therefrom". The site's footer also states "All
44
+ UN/CEFACT standards are free to use under CC By 4.0 license". The repository elects the stricter
45
+ reading, under which every commercial purpose is refused. The decision is
46
+ `unchecked-access-free-ch-united-nations-economic-commission-for-europe` in
47
+ `packages/corpus/data/license-decisions.json`, and it records the reasoning.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mailwoman/un-locode-lookup",
3
- "version": "11.1.0",
3
+ "version": "11.3.0",
4
4
  "description": "Place → UN/LOCODE (UNECE Code for Trade and Transport Locations), by country + name or nearest coordinate. node:sqlite over the UNECE code list. An @mailwoman/annotations Annotator.",
5
5
  "license": "AGPL-3.0-only OR LicenseRef-Commercial",
6
6
  "repository": {
@@ -90,9 +90,9 @@
90
90
  }
91
91
  },
92
92
  "dependencies": {
93
- "@mailwoman/annotations": "11.1.0",
94
- "@mailwoman/spatial": "11.1.0",
95
- "@mailwoman/sqlite": "11.1.0",
93
+ "@mailwoman/annotations": "11.3.0",
94
+ "@mailwoman/spatial": "11.3.0",
95
+ "@mailwoman/sqlite": "11.3.0",
96
96
  "spliterator": "^10.1.1"
97
97
  }
98
98
  }