@mailwoman/registry 11.3.0 → 11.4.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.
- package/data/manifests/artifacts.json +5 -0
- package/data/manifests/coverage.json +571 -0
- package/data/manifests/sources.lock.json +48 -0
- package/data/normalized/groupings.json +10902 -0
- package/definitions/groupings.json +222 -0
- package/docs/data-policy.md +10 -0
- package/lib/artifacts/groupings/groupings.fixture.json +1222 -0
- package/lib/artifacts/groupings/groupings.ts +77 -0
- package/lib/groupings.ts +127 -0
- package/lib/index.ts +19 -2
- package/lib/types.ts +90 -0
- package/out/artifacts/groupings/groupings.d.ts +28 -0
- package/out/artifacts/groupings/groupings.d.ts.map +1 -0
- package/out/artifacts/groupings/groupings.fixture.json +1222 -0
- package/out/artifacts/groupings/groupings.js +59 -0
- package/out/artifacts/groupings/groupings.js.map +1 -0
- package/out/groupings.d.ts +59 -0
- package/out/groupings.d.ts.map +1 -0
- package/out/groupings.js +92 -0
- package/out/groupings.js.map +1 -0
- package/out/index.d.ts +6 -2
- package/out/index.d.ts.map +1 -1
- package/out/index.js +3 -1
- package/out/index.js.map +1 -1
- package/out/sdk/sources.d.ts +55 -1
- package/out/sdk/sources.d.ts.map +1 -1
- package/out/sdk/sources.js +83 -0
- package/out/sdk/sources.js.map +1 -1
- package/out/tools/generate.run.js +58 -0
- package/out/tools/generate.run.js.map +1 -1
- package/out/tools/groupings.d.ts +101 -0
- package/out/tools/groupings.d.ts.map +1 -0
- package/out/tools/groupings.js +295 -0
- package/out/tools/groupings.js.map +1 -0
- package/out/tools/normalize.d.ts +17 -3
- package/out/tools/normalize.d.ts.map +1 -1
- package/out/tools/normalize.js +6 -1
- package/out/tools/normalize.js.map +1 -1
- package/out/tools/normalize.run.js +50 -3
- package/out/tools/normalize.run.js.map +1 -1
- package/out/types.d.ts +81 -0
- package/out/types.d.ts.map +1 -1
- package/out/types.js +29 -0
- package/out/types.js.map +1 -1
- package/package.json +4 -2
- package/sdk/sources.ts +119 -0
- package/tools/generate.run.ts +65 -0
- package/tools/groupings.ts +428 -0
- package/tools/normalize.run.ts +64 -4
- package/tools/normalize.ts +16 -2
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$comment": "The country groupings the registry answers. An organization reads its members from Wikidata through `property` (P463 'member of' on the member, P527 'has part(s)' on the organization, or `both` for an organization whose statements are split between them), and the normalizer cross-checks the other property. A classification reads its members from its publisher's list. The normalizer, the generator and the TypeScript reader read this file.",
|
|
3
|
+
"schemaVersion": 1,
|
|
4
|
+
"groupings": [
|
|
5
|
+
{
|
|
6
|
+
"id": "g7",
|
|
7
|
+
"name": "Group of Seven",
|
|
8
|
+
"kind": "organization",
|
|
9
|
+
"source": { "type": "wikidata", "item": "Q1764511", "property": "P463" }
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"id": "g20",
|
|
13
|
+
"name": "G20",
|
|
14
|
+
"kind": "organization",
|
|
15
|
+
"source": { "type": "wikidata", "item": "Q19771", "property": "P463" }
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"id": "eu",
|
|
19
|
+
"name": "European Union",
|
|
20
|
+
"kind": "organization",
|
|
21
|
+
"source": { "type": "wikidata", "item": "Q458", "property": "P463" }
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"id": "eurozone",
|
|
25
|
+
"name": "Eurozone",
|
|
26
|
+
"kind": "organization",
|
|
27
|
+
"source": { "type": "wikidata", "item": "Q8268", "property": "P527" }
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "schengen",
|
|
31
|
+
"name": "Schengen Area",
|
|
32
|
+
"kind": "organization",
|
|
33
|
+
"source": { "type": "wikidata", "item": "Q1969730", "property": "P463" }
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"id": "eea",
|
|
37
|
+
"name": "European Economic Area",
|
|
38
|
+
"kind": "organization",
|
|
39
|
+
"source": { "type": "wikidata", "item": "Q8932", "property": "P463" }
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"id": "efta",
|
|
43
|
+
"name": "European Free Trade Association",
|
|
44
|
+
"kind": "organization",
|
|
45
|
+
"source": { "type": "wikidata", "item": "Q166546", "property": "P463" }
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"id": "council-of-europe",
|
|
49
|
+
"name": "Council of Europe",
|
|
50
|
+
"kind": "organization",
|
|
51
|
+
"source": { "type": "wikidata", "item": "Q8908", "property": "P463" }
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "oecd",
|
|
55
|
+
"name": "Organisation for Economic Co-operation and Development",
|
|
56
|
+
"kind": "organization",
|
|
57
|
+
"source": { "type": "wikidata", "item": "Q41550", "property": "P463" }
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"id": "nato",
|
|
61
|
+
"name": "NATO",
|
|
62
|
+
"kind": "organization",
|
|
63
|
+
"source": { "type": "wikidata", "item": "Q7184", "property": "P463" }
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"id": "un",
|
|
67
|
+
"name": "United Nations",
|
|
68
|
+
"kind": "organization",
|
|
69
|
+
"source": { "type": "wikidata", "item": "Q1065", "property": "P463" }
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"id": "wto",
|
|
73
|
+
"name": "World Trade Organization",
|
|
74
|
+
"kind": "organization",
|
|
75
|
+
"source": { "type": "wikidata", "item": "Q7825", "property": "P463" }
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"id": "commonwealth",
|
|
79
|
+
"name": "Commonwealth of Nations",
|
|
80
|
+
"kind": "organization",
|
|
81
|
+
"source": { "type": "wikidata", "item": "Q7785", "property": "P463" }
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"id": "brics",
|
|
85
|
+
"name": "BRICS",
|
|
86
|
+
"kind": "organization",
|
|
87
|
+
"source": { "type": "wikidata", "item": "Q243630", "property": "P463" }
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"id": "apec",
|
|
91
|
+
"name": "Asia-Pacific Economic Cooperation",
|
|
92
|
+
"kind": "organization",
|
|
93
|
+
"source": { "type": "wikidata", "item": "Q170481", "property": "P463" }
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"id": "asean",
|
|
97
|
+
"name": "Association of Southeast Asian Nations",
|
|
98
|
+
"kind": "organization",
|
|
99
|
+
"source": { "type": "wikidata", "item": "Q7768", "property": "P463" }
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"id": "mercosur",
|
|
103
|
+
"name": "Mercosur",
|
|
104
|
+
"kind": "organization",
|
|
105
|
+
"source": { "type": "wikidata", "item": "Q4264", "property": "P463" }
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"id": "andean-community",
|
|
109
|
+
"name": "Andean Community",
|
|
110
|
+
"kind": "organization",
|
|
111
|
+
"source": { "type": "wikidata", "item": "Q471690", "property": "P463" }
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"id": "caricom",
|
|
115
|
+
"name": "Caribbean Community",
|
|
116
|
+
"kind": "organization",
|
|
117
|
+
"source": { "type": "wikidata", "item": "Q205995", "property": "P463" }
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"id": "oas",
|
|
121
|
+
"name": "Organization of American States",
|
|
122
|
+
"kind": "organization",
|
|
123
|
+
"source": { "type": "wikidata", "item": "Q123759", "property": "P463" }
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"id": "african-union",
|
|
127
|
+
"name": "African Union",
|
|
128
|
+
"kind": "organization",
|
|
129
|
+
"source": { "type": "wikidata", "item": "Q7159", "property": "P463" }
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"id": "ecowas",
|
|
133
|
+
"name": "Economic Community of West African States",
|
|
134
|
+
"kind": "organization",
|
|
135
|
+
"source": { "type": "wikidata", "item": "Q193272", "property": "P463" }
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"id": "sadc",
|
|
139
|
+
"name": "Southern African Development Community",
|
|
140
|
+
"kind": "organization",
|
|
141
|
+
"source": { "type": "wikidata", "item": "Q816706", "property": "P463" }
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"id": "arab-league",
|
|
145
|
+
"name": "Arab League",
|
|
146
|
+
"kind": "organization",
|
|
147
|
+
"source": { "type": "wikidata", "item": "Q7172", "property": "P463" }
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"id": "gcc",
|
|
151
|
+
"name": "Gulf Cooperation Council",
|
|
152
|
+
"kind": "organization",
|
|
153
|
+
"source": { "type": "wikidata", "item": "Q217172", "property": "both" }
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
"id": "opec",
|
|
157
|
+
"name": "Organization of the Petroleum Exporting Countries",
|
|
158
|
+
"kind": "organization",
|
|
159
|
+
"source": { "type": "wikidata", "item": "Q7795", "property": "P463" }
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"id": "cis",
|
|
163
|
+
"name": "Commonwealth of Independent States",
|
|
164
|
+
"kind": "organization",
|
|
165
|
+
"source": { "type": "wikidata", "item": "Q7779", "property": "P463" }
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"id": "imf-advanced",
|
|
169
|
+
"name": "IMF advanced economies",
|
|
170
|
+
"kind": "classification",
|
|
171
|
+
"source": {
|
|
172
|
+
"type": "wikipedia-imf-advanced",
|
|
173
|
+
"$comment": "The names the article spells differently from the ISO record's Wikidata label, mapped to the record's alpha-2 code. A name in neither the records nor this table blocks the grouping.",
|
|
174
|
+
"aliases": { "Czechia": "CZ", "Netherlands": "NL" }
|
|
175
|
+
}
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
"id": "wb-high-income",
|
|
179
|
+
"name": "World Bank high income",
|
|
180
|
+
"kind": "classification",
|
|
181
|
+
"source": { "type": "worldbank-income", "level": "HIC" }
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"id": "wb-upper-middle-income",
|
|
185
|
+
"name": "World Bank upper middle income",
|
|
186
|
+
"kind": "classification",
|
|
187
|
+
"source": { "type": "worldbank-income", "level": "UMC" }
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"id": "wb-lower-middle-income",
|
|
191
|
+
"name": "World Bank lower middle income",
|
|
192
|
+
"kind": "classification",
|
|
193
|
+
"source": { "type": "worldbank-income", "level": "LMC" }
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"id": "wb-low-income",
|
|
197
|
+
"name": "World Bank low income",
|
|
198
|
+
"kind": "classification",
|
|
199
|
+
"source": { "type": "worldbank-income", "level": "LIC" }
|
|
200
|
+
}
|
|
201
|
+
],
|
|
202
|
+
"entities": {
|
|
203
|
+
"$comment": "Wikidata items that hold a membership for an ISO 3166-1 entry whose code sits on another item, mapped to that entry's alpha-2 code. The Netherlands country item holds the EU seat while NL sits on the Kingdom of the Netherlands; the Danish Realm holds the UN and NATO seats while DK sits on Denmark; West Germany's UN seat continued as Germany's; Taiwan holds WTO and APEC seats under two names.",
|
|
204
|
+
"Q55": "NL",
|
|
205
|
+
"Q756617": "DK",
|
|
206
|
+
"Q713750": "DE",
|
|
207
|
+
"Q10915215": "TW",
|
|
208
|
+
"Q216923": "TW"
|
|
209
|
+
},
|
|
210
|
+
"roles": {
|
|
211
|
+
"$comment": "Wikidata P2868 ('subject has role') values on a membership statement. `member` counts as membership. A name role, such as Chinese Taipei, is the name a member holds its seat under. A value outside this table blocks its grouping until it is classified here.",
|
|
212
|
+
"Q160016": "member",
|
|
213
|
+
"Q15140392": "member",
|
|
214
|
+
"Q6688521": "member",
|
|
215
|
+
"Q26234937": "member",
|
|
216
|
+
"Q10915215": "member",
|
|
217
|
+
"Q216923": "member",
|
|
218
|
+
"Q47165448": "associate",
|
|
219
|
+
"Q15978655": "other",
|
|
220
|
+
"Q381160": "other"
|
|
221
|
+
}
|
|
222
|
+
}
|
package/docs/data-policy.md
CHANGED
|
@@ -26,6 +26,8 @@ marker the server stated, and the publisher's statement of terms with the page i
|
|
|
26
26
|
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
|
27
27
|
| Wikidata (SPARQL) | Structured data under CC0 1.0 (https://www.wikidata.org/wiki/Wikidata:Licensing) | yes |
|
|
28
28
|
| OurAirports | "All data is released to the Public Domain, and comes with no guarantee of accuracy or fitness for use." (https://ourairports.com/data/) | yes |
|
|
29
|
+
| World Bank country API | Datasets under CC BY 4.0, attributed as "The World Bank: Dataset name: Data source (if known)." (https://www.worldbank.org/ext/en/legal/terms-conditions/datasets) | yes |
|
|
30
|
+
| Wikipedia, one revision | The IMF advanced-economy list in "Developed country" is read as a list of facts. The article's prose is CC BY-SA 4.0 and stays out of every artifact. | yes |
|
|
29
31
|
| UN Statistics Division M49 | "personal, non-commercial use, without any right to resell or redistribute them or to compile or create derivative works therefrom" (https://www.un.org/en/about-us/terms-of-use) | no |
|
|
30
32
|
|
|
31
33
|
The lock records the UN crosswalk under `$notElected`. The repository's rule
|
|
@@ -51,6 +53,14 @@ pinned bytes. At the pinned publication:
|
|
|
51
53
|
when the code is a current alpha-2 entry, `source-extension` for a code such as `XK`, `unstated` when
|
|
52
54
|
the column is empty. The `airport-located-in-country` relation holds only the first kind.
|
|
53
55
|
|
|
56
|
+
- `country-grouping`: the groupings `definitions/groupings.json` declares. An organization's members are
|
|
57
|
+
Wikidata statements through P463 ("member of") or P527 ("has part(s)"), with their role, start and end
|
|
58
|
+
qualifiers, read by two pinned queries. The World Bank income groups come from the World Bank country API, and
|
|
59
|
+
the IMF advanced economies from a pinned Wikipedia revision whose section cites the IMF World Economic Outlook
|
|
60
|
+
statistical appendix. `data/manifests/coverage.json` records, per grouping, the statements without a role or a
|
|
61
|
+
start, the Wikidata members with no ISO record, and the codes on which P463 and P527 disagree. A defect there is
|
|
62
|
+
corrected on Wikidata and repinned.
|
|
63
|
+
|
|
54
64
|
A miss means `not-found-in-snapshot`: the source holds no such code. It doesn't claim that the issuing
|
|
55
65
|
authority never assigned the code.
|
|
56
66
|
|