factbook 1.1.1 → 2.0.1
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.
- checksums.yaml +4 -4
- data/{HISTORY.md → CHANGELOG.md} +3 -3
- data/Manifest.txt +1 -58
- data/README.md +50 -575
- data/Rakefile +29 -33
- data/lib/factbook.rb +8 -75
- metadata +20 -114
- data/data/attributes.yml +0 -337
- data/data/categories.csv +0 -164
- data/data/codes.csv +0 -262
- data/data/codesxref.csv +0 -280
- data/data/comparisons.csv +0 -75
- data/lib/factbook/almanac.rb +0 -72
- data/lib/factbook/attributes.rb +0 -74
- data/lib/factbook/builder.rb +0 -214
- data/lib/factbook/builder_item.rb +0 -92
- data/lib/factbook/builder_json.rb +0 -79
- data/lib/factbook/codes.rb +0 -119
- data/lib/factbook/comparisons.rb +0 -50
- data/lib/factbook/counter.rb +0 -48
- data/lib/factbook/db/importer.rb +0 -92
- data/lib/factbook/db/models.rb +0 -11
- data/lib/factbook/db/schema.rb +0 -36
- data/lib/factbook/normalize.rb +0 -43
- data/lib/factbook/page.rb +0 -185
- data/lib/factbook/page_info.rb +0 -12
- data/lib/factbook/reader_json.rb +0 -51
- data/lib/factbook/sanitizer.rb +0 -207
- data/lib/factbook/sect.rb +0 -29
- data/lib/factbook/subsect.rb +0 -18
- data/lib/factbook/table.rb +0 -52
- data/lib/factbook/utils.rb +0 -85
- data/lib/factbook/utils_info.rb +0 -102
- data/lib/factbook/version.rb +0 -22
- data/script/almanac.rb +0 -48
- data/script/attributes.rb +0 -34
- data/script/build.rb +0 -28
- data/script/counter.rb +0 -145
- data/script/json.rb +0 -18
- data/script/testbr.rb +0 -33
- data/script/testcodes.rb +0 -11
- data/test/data/au.html +0 -579
- data/test/data/au.yml +0 -8
- data/test/data/be.html +0 -596
- data/test/data/be.yml +0 -8
- data/test/data/json/au.json +0 -892
- data/test/data/src/au.html +0 -2006
- data/test/data/src/be.html +0 -2011
- data/test/helper.rb +0 -11
- data/test/test_attribs.rb +0 -82
- data/test/test_attribs_def.rb +0 -20
- data/test/test_builder.rb +0 -35
- data/test/test_codes.rb +0 -76
- data/test/test_comparisons.rb +0 -19
- data/test/test_convert.rb +0 -30
- data/test/test_counter.rb +0 -31
- data/test/test_fields.rb +0 -52
- data/test/test_importer.rb +0 -55
- data/test/test_item_builder.rb +0 -99
- data/test/test_json.rb +0 -44
- data/test/test_json_builder.rb +0 -25
- data/test/test_normalize.rb +0 -23
- data/test/test_page.rb +0 -38
- data/test/test_sanitizer.rb +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 803eeea496771f3aa1270492a1c4cbadf4732e68
|
4
|
+
data.tar.gz: 1ab08bf6938912090394fef275bb472876051c09
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a93698f9cc92495e59bdc1ef65100dfbf73a9143459377919f967adc3cfc6e658610eeade7e58cc53e01776337a99fda786fb3a625aa735ea02aa5e232f30f7
|
7
|
+
data.tar.gz: 54a74b57d4d210c69d48dfc98b8d7d9b82a2109e56b77ac3691af252ec174b6dc7c5634cdc8d3c9f35d5236d538566c510d300e935d245e0c99875b051dced82
|
data/{HISTORY.md → CHANGELOG.md}
RENAMED
@@ -1,3 +1,3 @@
|
|
1
|
-
### 0.0.1 /
|
2
|
-
|
3
|
-
* Everything is new. First release.
|
1
|
+
### 0.0.1 / 2020-11-27
|
2
|
+
|
3
|
+
* Everything is new. First release.
|
data/Manifest.txt
CHANGED
@@ -1,62 +1,5 @@
|
|
1
|
-
|
1
|
+
CHANGELOG.md
|
2
2
|
Manifest.txt
|
3
3
|
README.md
|
4
4
|
Rakefile
|
5
|
-
data/attributes.yml
|
6
|
-
data/categories.csv
|
7
|
-
data/codes.csv
|
8
|
-
data/codesxref.csv
|
9
|
-
data/comparisons.csv
|
10
5
|
lib/factbook.rb
|
11
|
-
lib/factbook/almanac.rb
|
12
|
-
lib/factbook/attributes.rb
|
13
|
-
lib/factbook/builder.rb
|
14
|
-
lib/factbook/builder_item.rb
|
15
|
-
lib/factbook/builder_json.rb
|
16
|
-
lib/factbook/codes.rb
|
17
|
-
lib/factbook/comparisons.rb
|
18
|
-
lib/factbook/counter.rb
|
19
|
-
lib/factbook/db/importer.rb
|
20
|
-
lib/factbook/db/models.rb
|
21
|
-
lib/factbook/db/schema.rb
|
22
|
-
lib/factbook/normalize.rb
|
23
|
-
lib/factbook/page.rb
|
24
|
-
lib/factbook/page_info.rb
|
25
|
-
lib/factbook/reader_json.rb
|
26
|
-
lib/factbook/sanitizer.rb
|
27
|
-
lib/factbook/sect.rb
|
28
|
-
lib/factbook/subsect.rb
|
29
|
-
lib/factbook/table.rb
|
30
|
-
lib/factbook/utils.rb
|
31
|
-
lib/factbook/utils_info.rb
|
32
|
-
lib/factbook/version.rb
|
33
|
-
script/almanac.rb
|
34
|
-
script/attributes.rb
|
35
|
-
script/build.rb
|
36
|
-
script/counter.rb
|
37
|
-
script/json.rb
|
38
|
-
script/testbr.rb
|
39
|
-
script/testcodes.rb
|
40
|
-
test/data/au.html
|
41
|
-
test/data/au.yml
|
42
|
-
test/data/be.html
|
43
|
-
test/data/be.yml
|
44
|
-
test/data/json/au.json
|
45
|
-
test/data/src/au.html
|
46
|
-
test/data/src/be.html
|
47
|
-
test/helper.rb
|
48
|
-
test/test_attribs.rb
|
49
|
-
test/test_attribs_def.rb
|
50
|
-
test/test_builder.rb
|
51
|
-
test/test_codes.rb
|
52
|
-
test/test_comparisons.rb
|
53
|
-
test/test_convert.rb
|
54
|
-
test/test_counter.rb
|
55
|
-
test/test_fields.rb
|
56
|
-
test/test_importer.rb
|
57
|
-
test/test_item_builder.rb
|
58
|
-
test/test_json.rb
|
59
|
-
test/test_json_builder.rb
|
60
|
-
test/test_normalize.rb
|
61
|
-
test/test_page.rb
|
62
|
-
test/test_sanitizer.rb
|
data/README.md
CHANGED
@@ -1,575 +1,50 @@
|
|
1
|
-
# factbook -
|
2
|
-
|
3
|
-
* home :: [github.com/
|
4
|
-
* bugs :: [github.com/
|
5
|
-
* gem :: [rubygems.org/gems/factbook](https://rubygems.org/gems/factbook)
|
6
|
-
* rdoc :: [rubydoc.info/gems/factbook](http://rubydoc.info/gems/factbook)
|
7
|
-
* forum :: [groups.google.com/group/openmundi](https://groups.google.com/group/openmundi)
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
## What's the World Factbook?
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
{"total"=>{"text"=>"16,145 km"},
|
52
|
-
"border countries (10)"=>
|
53
|
-
{"text"=>
|
54
|
-
"Argentina 1,263 km, Bolivia 3,403 km, Colombia 1,790 km,
|
55
|
-
French Guiana 649 km, Guyana 1,308 km, Paraguay 1,371 km, Peru 2,659 km,
|
56
|
-
Suriname 515 km, Uruguay 1,050 km, Venezuela 2,137 km"}},
|
57
|
-
"Climate"=>{"text"=>"mostly tropical, but temperate in south"},
|
58
|
-
"Elevation extremes"=>
|
59
|
-
{"lowest point"=>{"text"=>"Atlantic Ocean 0 m"},
|
60
|
-
"highest point"=>{"text"=>"Pico da Neblina 2,994 m"}},
|
61
|
-
"Natural resources"=>
|
62
|
-
{"text"=>
|
63
|
-
"bauxite, gold, iron ore, manganese, nickel, phosphates, ..."},
|
64
|
-
...
|
65
|
-
```
|
66
|
-
|
67
|
-
### Use shortcut attribute accessors
|
68
|
-
|
69
|
-
```ruby
|
70
|
-
pp page.background ## same as page['Introduction']['Background']['text']
|
71
|
-
# => "Following more than three centuries..."
|
72
|
-
pp page.area ## same as page['Geography'][''Area']['total']['text']
|
73
|
-
# => "8,515,770 sq km"
|
74
|
-
pp page.area_land ## same as page['Geography'][''Area']['land']['text']
|
75
|
-
# => "8,358,140 sq km"
|
76
|
-
pp page.area_water ## same as page['Geography'][''Area']['water']['text']
|
77
|
-
# => "157,630 sq km"
|
78
|
-
pp page.area_note ## same as page['Geography'][''Area']['note']['text']
|
79
|
-
# => "includes Arquipelago de Fernando de Noronha, Atol das Rocas, ..."
|
80
|
-
pp page.area_comparative ## same as page['Geography']['Area - comparative']['text']
|
81
|
-
# => "slightly smaller than the US"
|
82
|
-
pp page.climate ## same as page['Geography']['Climate']['text']
|
83
|
-
# => "mostly tropical, but temperate in south"
|
84
|
-
pp page.terrain ## same as page['Geography']['Terrain']['text']
|
85
|
-
# => "mostly flat to rolling lowlands in north; ..."
|
86
|
-
pp page.elevation_lowest ## same as page['Geography']['Elevation extremes']['lowest point']['text']
|
87
|
-
# => "Atlantic Ocean 0 m"
|
88
|
-
pp page.elevation_highest ## same as page['Geography']['Elevation extremes']['highest point']['text']
|
89
|
-
# => "Pico da Neblina 2,994 m"
|
90
|
-
pp page.resources ## same as page['Geography'][Natural resources']['text']
|
91
|
-
# => "bauxite, gold, iron ore, manganese, nickel, phosphates, ..."
|
92
|
-
...
|
93
|
-
```
|
94
|
-
|
95
|
-
See [`data/attributes.yml`](data/attributes.yml) for the full listing of all built-in attribute shortcut accessors.
|
96
|
-
See [Attributes](ATTRIBUTES.md) for a quick reference listing.
|
97
|
-
|
98
|
-
|
99
|
-
### Save to disk as JSON
|
100
|
-
|
101
|
-
```ruby
|
102
|
-
page = Factbook::Page.new( 'br' )
|
103
|
-
File.open( 'br.json', 'w') do |f|
|
104
|
-
f.write page.to_json
|
105
|
-
end
|
106
|
-
```
|
107
|
-
|
108
|
-
|
109
|
-
### List all codes
|
110
|
-
|
111
|
-
```ruby
|
112
|
-
Factbook.codes.each do |code|
|
113
|
-
pp code
|
114
|
-
end
|
115
|
-
```
|
116
|
-
|
117
|
-
resulting in:
|
118
|
-
|
119
|
-
```ruby
|
120
|
-
#<struct Factbook::Codes::Code
|
121
|
-
code="af",
|
122
|
-
name="Afghanistan",
|
123
|
-
category="Countries",
|
124
|
-
region="South Asia">
|
125
|
-
#<struct Factbook::Codes::Code
|
126
|
-
code="al",
|
127
|
-
name="Albania",
|
128
|
-
category="Countries",
|
129
|
-
region="Europe">
|
130
|
-
#<struct Factbook::Codes::Code
|
131
|
-
code="ag",
|
132
|
-
name="Algeria",
|
133
|
-
category="Countries",
|
134
|
-
region="Africa">
|
135
|
-
#<struct Factbook::Codes::Code
|
136
|
-
code="an",
|
137
|
-
name="Andorra",
|
138
|
-
category="Countries",
|
139
|
-
region="Europe">
|
140
|
-
...
|
141
|
-
```
|
142
|
-
|
143
|
-
Note: You can filter codes by category e.g. Countries, Dependencies, Miscellaneous, Oceans, etc.
|
144
|
-
and/or by region e.g. Africa, Europe, South Asia, Central America and Caribbean, etc.
|
145
|
-
|
146
|
-
|
147
|
-
```ruby
|
148
|
-
|
149
|
-
assert_equal 261, Factbook.codes.size
|
150
|
-
|
151
|
-
## categories
|
152
|
-
assert_equal 195, Factbook.codes.countries.size
|
153
|
-
assert_equal 52, Factbook.codes.dependencies.size
|
154
|
-
assert_equal 5, Factbook.codes.oceans.size
|
155
|
-
assert_equal 1, Factbook.codes.world.size
|
156
|
-
assert_equal 2, Factbook.codes.others.size
|
157
|
-
assert_equal 6, Factbook.codes.misc.size
|
158
|
-
|
159
|
-
## regions
|
160
|
-
assert_equal 55, Factbook.codes.europe.size
|
161
|
-
assert_equal 9, Factbook.codes.south_asia.size
|
162
|
-
assert_equal 6, Factbook.codes.central_asia.size
|
163
|
-
assert_equal 22, Factbook.codes.east_n_souteast_asia.size
|
164
|
-
assert_equal 19, Factbook.codes.middle_east.size
|
165
|
-
assert_equal 56, Factbook.codes.africa.size
|
166
|
-
assert_equal 7, Factbook.codes.north_america.size
|
167
|
-
assert_equal 33, Factbook.codes.central_america_n_caribbean.size
|
168
|
-
assert_equal 14, Factbook.codes.south_america.size
|
169
|
-
assert_equal 30, Factbook.codes.australia_oceania.size
|
170
|
-
assert_equal 4, Factbook.codes.antartica.size
|
171
|
-
assert_equal 5, Factbook.codes.region('Oceans').size
|
172
|
-
assert_equal 1, Factbook.codes.region('World').size
|
173
|
-
|
174
|
-
## categories + regions
|
175
|
-
assert_equal 45, Factbook.codes.countries.europe.size
|
176
|
-
...
|
177
|
-
```
|
178
|
-
|
179
|
-
See [`data/codes.csv`](data/codes.csv) for the built-in listing of all codes with categories and regions.
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
## The World Factbook Summary (267 Entries)
|
184
|
-
|
185
|
-
The World Factbook includes 267 entries -
|
186
|
-
195 sovereign countries /
|
187
|
-
2 others /
|
188
|
-
58 dependencies /
|
189
|
-
6 miscellaneous /
|
190
|
-
5 oceans /
|
191
|
-
1 world:
|
192
|
-
|
193
|
-
|
194
|
-
### Sovereign Countries (195)
|
195
|
-
|
196
|
-
**A**
|
197
|
-
`af` Afghanistan
|
198
|
-
`al` Albania
|
199
|
-
`ag` Algeria
|
200
|
-
`an` Andorra
|
201
|
-
`ao` Angola
|
202
|
-
`ac` Antigua and Barbuda
|
203
|
-
`ar` Argentina
|
204
|
-
`am` Armenia
|
205
|
-
`as` Australia
|
206
|
-
`au` Austria
|
207
|
-
`aj` Azerbaijan
|
208
|
-
**B**
|
209
|
-
`bf` The Bahamas
|
210
|
-
`ba` Bahrain
|
211
|
-
`bg` Bangladesh
|
212
|
-
`bb` Barbados
|
213
|
-
`bo` Belarus
|
214
|
-
`be` Belgium
|
215
|
-
`bh` Belize
|
216
|
-
`bn` Benin
|
217
|
-
`bt` Bhutan
|
218
|
-
`bl` Bolivia
|
219
|
-
`bk` Bosnia and Herzegovina
|
220
|
-
`bc` Botswana
|
221
|
-
`br` Brazil
|
222
|
-
`bx` Brunei
|
223
|
-
`bu` Bulgaria
|
224
|
-
`uv` Burkina Faso
|
225
|
-
`bm` Burma
|
226
|
-
`by` Burundi
|
227
|
-
**C**
|
228
|
-
`cb` Cambodia
|
229
|
-
`cm` Cameroon
|
230
|
-
`ca` Canada
|
231
|
-
`cv` Cape Verde
|
232
|
-
`ct` Central African Republic
|
233
|
-
`cd` Chad
|
234
|
-
`ci` Chile
|
235
|
-
`ch` China
|
236
|
-
`co` Colombia
|
237
|
-
`cn` Comoros
|
238
|
-
`cg` Congo DR
|
239
|
-
`cf` Congo
|
240
|
-
`cs` Costa Rica
|
241
|
-
`iv` Cote d'Ivoire
|
242
|
-
`hr` Croatia
|
243
|
-
`cu` Cuba
|
244
|
-
`cy` Cyprus
|
245
|
-
`ez` Czech Republic
|
246
|
-
**D**
|
247
|
-
`da` Denmark
|
248
|
-
`dj` Djibouti
|
249
|
-
`do` Dominica
|
250
|
-
`dr` Dominican Republic
|
251
|
-
**E**
|
252
|
-
`ec` Ecuador
|
253
|
-
`eg` Egypt
|
254
|
-
`es` El Salvador
|
255
|
-
`ek` Equatorial Guinea
|
256
|
-
`er` Eritrea
|
257
|
-
`en` Estonia
|
258
|
-
`et` Ethiopia
|
259
|
-
**F**
|
260
|
-
`fj` Fiji
|
261
|
-
`fi` Finland
|
262
|
-
`fr` France
|
263
|
-
**G**
|
264
|
-
`gb` Gabon
|
265
|
-
`ga` The Gambia
|
266
|
-
`gg` Georgia
|
267
|
-
`gm` Germany
|
268
|
-
`gh` Ghana
|
269
|
-
`gr` Greece
|
270
|
-
`gj` Grenada
|
271
|
-
`gt` Guatemala
|
272
|
-
`gv` Guinea
|
273
|
-
`pu` Guinea-Bissau
|
274
|
-
`gy` Guyana
|
275
|
-
**H**
|
276
|
-
`ha` Haiti
|
277
|
-
`ho` Honduras
|
278
|
-
`hu` Hungary
|
279
|
-
**I**
|
280
|
-
`ic` Iceland
|
281
|
-
`in` India
|
282
|
-
`id` Indonesia
|
283
|
-
`ir` Iran
|
284
|
-
`iz` Iraq
|
285
|
-
`ei` Ireland
|
286
|
-
`is` Israel
|
287
|
-
`it` Italy
|
288
|
-
**J**
|
289
|
-
`jm` Jamaica
|
290
|
-
`ja` Japan
|
291
|
-
`jo` Jordan
|
292
|
-
**K**
|
293
|
-
`kz` Kazakhstan
|
294
|
-
`ke` Kenya
|
295
|
-
`kr` Kiribati
|
296
|
-
`kn` North Korea
|
297
|
-
`ks` South Korea
|
298
|
-
`kv` Kosovo
|
299
|
-
`ku` Kuwait
|
300
|
-
`kg` Kyrgyzstan
|
301
|
-
**L**
|
302
|
-
`la` Laos
|
303
|
-
`lg` Latvia
|
304
|
-
`le` Lebanon
|
305
|
-
`lt` Lesotho
|
306
|
-
`li` Liberia
|
307
|
-
`ly` Libya
|
308
|
-
`ls` Liechtenstein
|
309
|
-
`lh` Lithuania
|
310
|
-
`lu` Luxembourg
|
311
|
-
**M**
|
312
|
-
`mk` Macedonia
|
313
|
-
`ma` Madagascar
|
314
|
-
`mi` Malawi
|
315
|
-
`my` Malaysia
|
316
|
-
`mv` Maldives
|
317
|
-
`ml` Mali
|
318
|
-
`mt` Malta
|
319
|
-
`rm` Marshall Islands
|
320
|
-
`mr` Mauritania
|
321
|
-
`mp` Mauritius
|
322
|
-
`mx` Mexico
|
323
|
-
`fm` Micronesia
|
324
|
-
`md` Moldova
|
325
|
-
`mn` Monaco
|
326
|
-
`mg` Mongolia
|
327
|
-
`mj` Montenegro
|
328
|
-
`mo` Morocco
|
329
|
-
`mz` Mozambique
|
330
|
-
**N**
|
331
|
-
`wa` Namibia
|
332
|
-
`nr` Nauru
|
333
|
-
`np` Nepal
|
334
|
-
`nl` Netherlands
|
335
|
-
`nz` New Zealand
|
336
|
-
`nu` Nicaragua
|
337
|
-
`ng` Niger
|
338
|
-
`ni` Nigeria
|
339
|
-
`no` Norway
|
340
|
-
**O**
|
341
|
-
`mu` Oman
|
342
|
-
**P**
|
343
|
-
`pk` Pakistan
|
344
|
-
`ps` Palau
|
345
|
-
`pm` Panama
|
346
|
-
`pp` Papua New Guinea
|
347
|
-
`pa` Paraguay
|
348
|
-
`pe` Peru
|
349
|
-
`rp` Philippines
|
350
|
-
`pl` Poland
|
351
|
-
`po` Portugal
|
352
|
-
**Q**
|
353
|
-
`qa` Qatar
|
354
|
-
**R**
|
355
|
-
`ro` Romania
|
356
|
-
`rs` Russia
|
357
|
-
`rw` Rwanda
|
358
|
-
**S**
|
359
|
-
`sc` Saint Kitts and Nevis
|
360
|
-
`st` Saint Lucia
|
361
|
-
`vc` Saint Vincent and the Grenadines
|
362
|
-
`ws` Samoa
|
363
|
-
`sm` San Marino
|
364
|
-
`tp` Sao Tome and Principe
|
365
|
-
`sa` Saudi Arabia
|
366
|
-
`sg` Senegal
|
367
|
-
`ri` Serbia
|
368
|
-
`se` Seychelles
|
369
|
-
`sl` Sierra Leone
|
370
|
-
`sn` Singapore
|
371
|
-
`lo` Slovakia
|
372
|
-
`si` Slovenia
|
373
|
-
`bp` Solomon Islands
|
374
|
-
`so` Somalia
|
375
|
-
`sf` South Africa
|
376
|
-
`od` South Sudan
|
377
|
-
`sp` Spain
|
378
|
-
`ce` Sri Lanka
|
379
|
-
`su` Sudan
|
380
|
-
`ns` Suriname
|
381
|
-
`wz` Swaziland
|
382
|
-
`sw` Sweden
|
383
|
-
`sz` Switzerland
|
384
|
-
`sy` Syria
|
385
|
-
**T**
|
386
|
-
`ti` Tajikistan
|
387
|
-
`tz` Tanzania
|
388
|
-
`th` Thailand
|
389
|
-
`tt` Timor-Leste
|
390
|
-
`to` Togo
|
391
|
-
`tn` Tonga
|
392
|
-
`td` Trinidad and Tobago
|
393
|
-
`ts` Tunisia
|
394
|
-
`tu` Turkey
|
395
|
-
`tx` Turkmenistan
|
396
|
-
`tv` Tuvalu
|
397
|
-
**U**
|
398
|
-
`ug` Uganda
|
399
|
-
`up` Ukraine
|
400
|
-
`ae` United Arab Emirates
|
401
|
-
`uk` United Kingdom
|
402
|
-
`us` United States
|
403
|
-
`uy` Uruguay
|
404
|
-
`uz` Uzbekistan
|
405
|
-
**V**
|
406
|
-
`nh` Vanuatu
|
407
|
-
`vt` Vatican City (Holy See)
|
408
|
-
`ve` Venezuela
|
409
|
-
`vm` Vietnam
|
410
|
-
**Y**
|
411
|
-
`ym` Yemen
|
412
|
-
**Z**
|
413
|
-
`za` Zambia
|
414
|
-
`zi` Zimbabwe
|
415
|
-
|
416
|
-
|
417
|
-
### Other (2)
|
418
|
-
|
419
|
-
`tw` Taiwan
|
420
|
-
`ee` European Union
|
421
|
-
|
422
|
-
### Dependencies (58)
|
423
|
-
|
424
|
-
Australia (6):
|
425
|
-
`at` Ashmore and Cartier Islands
|
426
|
-
`kt` Christmas Island
|
427
|
-
`ck` Cocos (Keeling) Islands
|
428
|
-
`cr` Coral Sea Islands
|
429
|
-
`hm` Heard Island and McDonald Islands
|
430
|
-
`nf` Norfolk Island
|
431
|
-
|
432
|
-
China (2):
|
433
|
-
`hk` Hong Kong
|
434
|
-
`mc` Macau
|
435
|
-
|
436
|
-
Denmark (2):
|
437
|
-
`fo` Faroe Islands
|
438
|
-
`gl` Greenland
|
439
|
-
|
440
|
-
France (8):
|
441
|
-
`ip` Clipperton Island
|
442
|
-
`fp` French Polynesia
|
443
|
-
`fs` French Southern and Antarctic Lands
|
444
|
-
`nc` New Caledonia
|
445
|
-
`tb` Saint Barthelemy
|
446
|
-
`rn` Saint Martin
|
447
|
-
`sb` Saint Pierre and Miquelon
|
448
|
-
`wf` Wallis and Futuna
|
449
|
-
|
450
|
-
Netherlands (3):
|
451
|
-
`aa` Aruba
|
452
|
-
`uc` Curacao
|
453
|
-
`nn` Sint Maarten
|
454
|
-
|
455
|
-
New Zealand (3):
|
456
|
-
`cw` Cook Islands
|
457
|
-
`ne` Niue
|
458
|
-
`tl` Tokelau
|
459
|
-
|
460
|
-
Norway (3):
|
461
|
-
`bv` Bouvet Island
|
462
|
-
`jn` Jan Mayen
|
463
|
-
`sv` Svalbard
|
464
|
-
|
465
|
-
Great Britain (17):
|
466
|
-
`ax` Akrotiri (Sovereign Base)
|
467
|
-
`av` Anguilla
|
468
|
-
`bd` Bermuda
|
469
|
-
`io` British Indian Ocean Territory
|
470
|
-
`vi` British Virgin Islands
|
471
|
-
`cj` Cayman Islands
|
472
|
-
`dx` Dhekelia (Sovereign Base)
|
473
|
-
`fk` Falkland Islands
|
474
|
-
`gi` Gibraltar
|
475
|
-
`gk` Guernsey
|
476
|
-
`je` Jersey
|
477
|
-
`im` Isle of Man
|
478
|
-
`mh` Montserrat
|
479
|
-
`pc` Pitcairn Islands
|
480
|
-
`sh` Saint Helena
|
481
|
-
`sx` South Georgia and the South Sandwich Islands
|
482
|
-
`tk` Turks and Caicos Islands
|
483
|
-
|
484
|
-
United States (14):
|
485
|
-
`aq` American Samoa
|
486
|
-
`gq` Guam
|
487
|
-
`bq` Navassa Island
|
488
|
-
`cq` Northern Mariana Islands
|
489
|
-
`rq` Puerto Rico
|
490
|
-
`vq` US Virgin Islands
|
491
|
-
`wq` Wake Island
|
492
|
-
`um` US Pacific Island Wildlife Refuges
|
493
|
-
(Baker Island, Howland Island, Jarvis Island, Johnston Atoll, Kingman Reef, Midway Islands, Palmyra Atoll)
|
494
|
-
|
495
|
-
|
496
|
-
### Miscellaneous (6)
|
497
|
-
|
498
|
-
`ay` Antarctica
|
499
|
-
`gz` Gaza Strip
|
500
|
-
`pf` Paracel Islands
|
501
|
-
`pg` Spratly Islands
|
502
|
-
`we` West Bank
|
503
|
-
`wi` Western Sahara
|
504
|
-
|
505
|
-
### Oceans (5)
|
506
|
-
|
507
|
-
`xq` Arctic Ocean
|
508
|
-
`zh` Atlantic Ocean
|
509
|
-
`xo` Indian Ocean
|
510
|
-
`zn` Pacific Ocean
|
511
|
-
`oo` Southern Ocean
|
512
|
-
|
513
|
-
### World (1)
|
514
|
-
|
515
|
-
`xx` World
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
## Ready-To-Use Public Domain Factbook Datasets
|
521
|
-
|
522
|
-
[factbook/factbook.json](https://github.com/factbook/factbook.json) - open (public domain)
|
523
|
-
factbook country profiles in JSON for all the world's countries (using internet domain names
|
524
|
-
for country codes e.g. Austria is `at.json` not `au.json`, Germany is `de.json` not `gm.json` and so on)
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
## Alternatives (Libraries and Gems)
|
529
|
-
|
530
|
-
Ruby
|
531
|
-
|
532
|
-
- [worldfactbook gem](https://github.com/sayem/worldfactbook)
|
533
|
-
by Sayem Khan (aka sayem);
|
534
|
-
fetches data from its own mirror, that is, [rubyworldfactbook.com](http://rubyworldfactbook.com)
|
535
|
-
(last updated 2011?)
|
536
|
-
|
537
|
-
- [the_country_identity gem](https://github.com/p1nox/the_country_identity)
|
538
|
-
by Raul Pino (aka p1nox);
|
539
|
-
fetches data from an [RDF Turtle endpoint](http://wifo5-03.informatik.uni-mannheim.de/factbook/)
|
540
|
-
hosted by the Research Group Data and Web Science at the University of Mannheim, Germany
|
541
|
-
|
542
|
-
JavaScript
|
543
|
-
|
544
|
-
- [worldfactbook-dataset](https://github.com/twigkit/worldfactbook-dataset)
|
545
|
-
by Richard Marr (aka richmarr); fetches data using Node.js
|
546
|
-
(last updated 2013)
|
547
|
-
|
548
|
-
Python
|
549
|
-
|
550
|
-
- [openfactbook datasets & tools](https://github.com/openfactbook)
|
551
|
-
by Eckhard Licher; uses official (offline) download archive (last updated 2014); incl. flags, maps, and more
|
552
|
-
|
553
|
-
Others
|
554
|
-
|
555
|
-
TBD
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
## Install
|
560
|
-
|
561
|
-
Just install the gem:
|
562
|
-
|
563
|
-
$ gem install factbook
|
564
|
-
|
565
|
-
|
566
|
-
## License
|
567
|
-
|
568
|
-
The `factbook` scripts are dedicated to the public domain.
|
569
|
-
Use it as you please with no restrictions whatsoever.
|
570
|
-
|
571
|
-
|
572
|
-
## Questions? Comments?
|
573
|
-
|
574
|
-
Send them along to the [Open Mundi (world.db) Database Forum/Mailing List](http://groups.google.com/group/openmundi).
|
575
|
-
Thanks!
|
1
|
+
# factbook - umbrella - all together incl. factbook readers, writers 'n' importers
|
2
|
+
|
3
|
+
* home :: [github.com/factbook/factbook](https://github.com/factbook/factbook)
|
4
|
+
* bugs :: [github.com/factbook/factbook/issues](https://github.com/factbook/factbook/issues)
|
5
|
+
* gem :: [rubygems.org/gems/factbook](https://rubygems.org/gems/factbook)
|
6
|
+
* rdoc :: [rubydoc.info/gems/factbook](http://rubydoc.info/gems/factbook)
|
7
|
+
* forum :: [groups.google.com/group/openmundi](https://groups.google.com/group/openmundi)
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
## What's the World Factbook?
|
12
|
+
|
13
|
+
See [factbook/factbook.json »](https://github.com/factbook/factbook.json)
|
14
|
+
|
15
|
+
|
16
|
+
## Usage
|
17
|
+
|
18
|
+
It's an umbrella gem that (auto-)includes:
|
19
|
+
|
20
|
+
- [**factbook-readers**](../factbook-readers) - turn the country profile web pages into open structured data e.g JSON
|
21
|
+
- [factbook-writers](../factbook-writers) - produce your own personal world almanac
|
22
|
+
- [factbook-importers](../factbook-importers) - import (semi-)structured data into database for SQL queries, etc.
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
## Install
|
28
|
+
|
29
|
+
Use
|
30
|
+
|
31
|
+
gem install factbook
|
32
|
+
|
33
|
+
or add to your Gemfile
|
34
|
+
|
35
|
+
gem 'factbook'
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
## License
|
40
|
+
|
41
|
+
The `factbook` scripts are dedicated to the public domain.
|
42
|
+
Use it as you please with no restrictions whatsoever.
|
43
|
+
|
44
|
+
|
45
|
+
## Questions? Comments?
|
46
|
+
|
47
|
+
Send them along to the [Open Mundi (world.db) Database Forum/Mailing List](http://groups.google.com/group/openmundi).
|
48
|
+
Thanks!
|
49
|
+
|
50
|
+
|