factbook-readers 0.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.
Files changed (58) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG.md +3 -0
  3. data/Manifest.txt +56 -0
  4. data/README.md +196 -0
  5. data/Rakefile +34 -0
  6. data/data/attributes.yml +337 -0
  7. data/data/categories.csv +164 -0
  8. data/data/codes.csv +262 -0
  9. data/data/codesxref.csv +280 -0
  10. data/data/comparisons.csv +75 -0
  11. data/lib/factbook-readers.rb +59 -0
  12. data/lib/factbook-readers/attributes.rb +74 -0
  13. data/lib/factbook-readers/builder.rb +212 -0
  14. data/lib/factbook-readers/builder_item.rb +185 -0
  15. data/lib/factbook-readers/builder_json.rb +79 -0
  16. data/lib/factbook-readers/codes.rb +122 -0
  17. data/lib/factbook-readers/comparisons.rb +50 -0
  18. data/lib/factbook-readers/counter.rb +48 -0
  19. data/lib/factbook-readers/normalize.rb +43 -0
  20. data/lib/factbook-readers/page.rb +148 -0
  21. data/lib/factbook-readers/page_info.rb +12 -0
  22. data/lib/factbook-readers/reader_json.rb +51 -0
  23. data/lib/factbook-readers/sanitizer.rb +307 -0
  24. data/lib/factbook-readers/sect.rb +29 -0
  25. data/lib/factbook-readers/subsect.rb +18 -0
  26. data/lib/factbook-readers/table.rb +52 -0
  27. data/lib/factbook-readers/utils.rb +47 -0
  28. data/lib/factbook-readers/utils_info.rb +129 -0
  29. data/lib/factbook-readers/version.rb +24 -0
  30. data/lib/factbook/readers.rb +5 -0
  31. data/test/data/au.html +579 -0
  32. data/test/data/au.yml +8 -0
  33. data/test/data/be.html +596 -0
  34. data/test/data/be.yml +8 -0
  35. data/test/data/json/au.json +892 -0
  36. data/test/data/src/ag.html +716 -0
  37. data/test/data/src/au-2015-09-24.html +2006 -0
  38. data/test/data/src/au.html +658 -0
  39. data/test/data/src/be-2015-09-24.html +2011 -0
  40. data/test/data/src/be.html +648 -0
  41. data/test/helper.rb +11 -0
  42. data/test/test_attribs.rb +87 -0
  43. data/test/test_attribs_def.rb +20 -0
  44. data/test/test_builder.rb +35 -0
  45. data/test/test_codes.rb +76 -0
  46. data/test/test_comparisons.rb +19 -0
  47. data/test/test_convert.rb +30 -0
  48. data/test/test_counter.rb +31 -0
  49. data/test/test_fields.rb +52 -0
  50. data/test/test_importer.rb +56 -0
  51. data/test/test_item_builder.rb +99 -0
  52. data/test/test_json.rb +45 -0
  53. data/test/test_json_builder.rb +25 -0
  54. data/test/test_normalize.rb +23 -0
  55. data/test/test_page.rb +38 -0
  56. data/test/test_sanitizer.rb +39 -0
  57. data/test/test_sanitizer_regex.rb +89 -0
  58. metadata +196 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: dc307d415f957d373118337b72baa5ca9c0b5686
4
+ data.tar.gz: f5241909514a895878e29b1e9e3dd0f3fddf9088
5
+ SHA512:
6
+ metadata.gz: cd89c3f31089bb3256969076a69fe2dcc3e04f762033cec14e621d5bbff289f72aecd4f6a67e0c32b864588c56f3a57e8059f9957f885293875a95695dd22059
7
+ data.tar.gz: 5f55a31397cbfa186cb85597ec280a2fc94fe63e8b595ccf18e36e2168dff531e19d0a64a63281fba380356df23b56769318aecf1d84c52277e511e5cb21998f
@@ -0,0 +1,3 @@
1
+ ### 0.0.1 / 2014-07-07
2
+
3
+ * Everything is new. First release.
@@ -0,0 +1,56 @@
1
+ CHANGELOG.md
2
+ Manifest.txt
3
+ README.md
4
+ Rakefile
5
+ data/attributes.yml
6
+ data/categories.csv
7
+ data/codes.csv
8
+ data/codesxref.csv
9
+ data/comparisons.csv
10
+ lib/factbook-readers.rb
11
+ lib/factbook-readers/attributes.rb
12
+ lib/factbook-readers/builder.rb
13
+ lib/factbook-readers/builder_item.rb
14
+ lib/factbook-readers/builder_json.rb
15
+ lib/factbook-readers/codes.rb
16
+ lib/factbook-readers/comparisons.rb
17
+ lib/factbook-readers/counter.rb
18
+ lib/factbook-readers/normalize.rb
19
+ lib/factbook-readers/page.rb
20
+ lib/factbook-readers/page_info.rb
21
+ lib/factbook-readers/reader_json.rb
22
+ lib/factbook-readers/sanitizer.rb
23
+ lib/factbook-readers/sect.rb
24
+ lib/factbook-readers/subsect.rb
25
+ lib/factbook-readers/table.rb
26
+ lib/factbook-readers/utils.rb
27
+ lib/factbook-readers/utils_info.rb
28
+ lib/factbook-readers/version.rb
29
+ lib/factbook/readers.rb
30
+ test/data/au.html
31
+ test/data/au.yml
32
+ test/data/be.html
33
+ test/data/be.yml
34
+ test/data/json/au.json
35
+ test/data/src/ag.html
36
+ test/data/src/au-2015-09-24.html
37
+ test/data/src/au.html
38
+ test/data/src/be-2015-09-24.html
39
+ test/data/src/be.html
40
+ test/helper.rb
41
+ test/test_attribs.rb
42
+ test/test_attribs_def.rb
43
+ test/test_builder.rb
44
+ test/test_codes.rb
45
+ test/test_comparisons.rb
46
+ test/test_convert.rb
47
+ test/test_counter.rb
48
+ test/test_fields.rb
49
+ test/test_importer.rb
50
+ test/test_item_builder.rb
51
+ test/test_json.rb
52
+ test/test_json_builder.rb
53
+ test/test_normalize.rb
54
+ test/test_page.rb
55
+ test/test_sanitizer.rb
56
+ test/test_sanitizer_regex.rb
@@ -0,0 +1,196 @@
1
+ # factbook-readers - turn thee world factbook country profile pages into open structured data e.g JSON
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-readers](https://rubygems.org/gems/factbook-readers)
6
+ * rdoc :: [rubydoc.info/gems/factbook-readers](http://rubydoc.info/gems/factbook-readers)
7
+ * forum :: [groups.google.com/group/openmundi](https://groups.google.com/group/openmundi)
8
+
9
+
10
+
11
+ ## Usage
12
+
13
+ ### Get country profile page as a hash (that is, structured data e.g. nested key/values)
14
+
15
+ ```ruby
16
+ page = Factbook::Page.new( 'br' ) # br is the country code for Brazil
17
+ pp page.data # pretty print hash
18
+ ```
19
+
20
+ resulting in:
21
+
22
+ ```ruby
23
+ {"Introduction"=>
24
+ {"Background"=>
25
+ {"text"=>
26
+ "Following more than three centuries under Portuguese rule,
27
+ Brazil gained its independence in 1822, ..."}},
28
+ "Geography"=>
29
+ {"Location"=>{"text"=>"Eastern South America, bordering the Atlantic Ocean"},
30
+ "Geographic coordinates"=>{"text"=>"10 00 S, 55 00 W"},
31
+ "Map references"=>{"text"=>"South America"},
32
+ "Area"=>
33
+ {"total"=>{"text"=>"8,515,770 sq km"},
34
+ "land"=>{"text"=>"8,358,140 sq km"},
35
+ "water"=>{"text"=>"157,630 sq km"},
36
+ "note"=>
37
+ {"text"=>
38
+ "includes Arquipelago de Fernando de Noronha, Atol das Rocas, ..."}},
39
+ "Area - comparative"=>
40
+ {"text"=>"slightly smaller than the US"},
41
+ "Land boundaries"=>
42
+ {"total"=>{"text"=>"16,145 km"},
43
+ "border countries (10)"=>
44
+ {"text"=>
45
+ "Argentina 1,263 km, Bolivia 3,403 km, Colombia 1,790 km,
46
+ French Guiana 649 km, Guyana 1,308 km, Paraguay 1,371 km, Peru 2,659 km,
47
+ Suriname 515 km, Uruguay 1,050 km, Venezuela 2,137 km"}},
48
+ "Climate"=>{"text"=>"mostly tropical, but temperate in south"},
49
+ "Elevation extremes"=>
50
+ {"lowest point"=>{"text"=>"Atlantic Ocean 0 m"},
51
+ "highest point"=>{"text"=>"Pico da Neblina 2,994 m"}},
52
+ "Natural resources"=>
53
+ {"text"=>
54
+ "bauxite, gold, iron ore, manganese, nickel, phosphates, ..."},
55
+ ...
56
+ ```
57
+
58
+ ### Use shortcut attribute accessors
59
+
60
+ ```ruby
61
+ pp page.background ## same as page['Introduction']['Background']['text']
62
+ # => "Following more than three centuries..."
63
+ pp page.area ## same as page['Geography'][''Area']['total']['text']
64
+ # => "8,515,770 sq km"
65
+ pp page.area_land ## same as page['Geography'][''Area']['land']['text']
66
+ # => "8,358,140 sq km"
67
+ pp page.area_water ## same as page['Geography'][''Area']['water']['text']
68
+ # => "157,630 sq km"
69
+ pp page.area_note ## same as page['Geography'][''Area']['note']['text']
70
+ # => "includes Arquipelago de Fernando de Noronha, Atol das Rocas, ..."
71
+ pp page.area_comparative ## same as page['Geography']['Area - comparative']['text']
72
+ # => "slightly smaller than the US"
73
+ pp page.climate ## same as page['Geography']['Climate']['text']
74
+ # => "mostly tropical, but temperate in south"
75
+ pp page.terrain ## same as page['Geography']['Terrain']['text']
76
+ # => "mostly flat to rolling lowlands in north; ..."
77
+ pp page.elevation_lowest ## same as page['Geography']['Elevation extremes']['lowest point']['text']
78
+ # => "Atlantic Ocean 0 m"
79
+ pp page.elevation_highest ## same as page['Geography']['Elevation extremes']['highest point']['text']
80
+ # => "Pico da Neblina 2,994 m"
81
+ pp page.resources ## same as page['Geography'][Natural resources']['text']
82
+ # => "bauxite, gold, iron ore, manganese, nickel, phosphates, ..."
83
+ ...
84
+ ```
85
+
86
+ See [`data/attributes.yml`](data/attributes.yml) for the full listing of all built-in attribute shortcut accessors.
87
+ See [Attributes](ATTRIBUTES.md) for a quick reference listing.
88
+
89
+
90
+ ### Save to disk as JSON
91
+
92
+ ```ruby
93
+ page = Factbook::Page.new( 'br' )
94
+ File.open( 'br.json', 'w:utf-8') do |f|
95
+ f.write page.to_json
96
+ end
97
+ ```
98
+
99
+
100
+ ### List all codes
101
+
102
+ ```ruby
103
+ Factbook.codes.each do |code|
104
+ pp code
105
+ end
106
+ ```
107
+
108
+ resulting in:
109
+
110
+ ```
111
+ #<struct Factbook::Codes::Code
112
+ code ="af",
113
+ name ="Afghanistan",
114
+ category="Countries",
115
+ region ="South Asia">
116
+ #<struct Factbook::Codes::Code
117
+ code ="al",
118
+ name ="Albania",
119
+ category="Countries",
120
+ region ="Europe">
121
+ #<struct Factbook::Codes::Code
122
+ code ="ag",
123
+ name ="Algeria",
124
+ category="Countries",
125
+ region ="Africa">
126
+ #<struct Factbook::Codes::Code
127
+ code ="an",
128
+ name ="Andorra",
129
+ category="Countries",
130
+ region ="Europe">
131
+ ...
132
+ ```
133
+
134
+ Note: You can filter codes by category e.g. Countries, Dependencies, Miscellaneous, Oceans, etc.
135
+ and/or by region e.g. Africa, Europe, South Asia, Central America and Caribbean, etc.
136
+
137
+
138
+ ```ruby
139
+
140
+ assert_equal 261, Factbook.codes.size
141
+
142
+ ## categories
143
+ assert_equal 195, Factbook.codes.countries.size
144
+ assert_equal 52, Factbook.codes.dependencies.size
145
+ assert_equal 5, Factbook.codes.oceans.size
146
+ assert_equal 1, Factbook.codes.world.size
147
+ assert_equal 2, Factbook.codes.others.size
148
+ assert_equal 6, Factbook.codes.misc.size
149
+
150
+ ## regions
151
+ assert_equal 55, Factbook.codes.europe.size
152
+ assert_equal 9, Factbook.codes.south_asia.size
153
+ assert_equal 6, Factbook.codes.central_asia.size
154
+ assert_equal 22, Factbook.codes.east_n_souteast_asia.size
155
+ assert_equal 19, Factbook.codes.middle_east.size
156
+ assert_equal 56, Factbook.codes.africa.size
157
+ assert_equal 7, Factbook.codes.north_america.size
158
+ assert_equal 33, Factbook.codes.central_america_n_caribbean.size
159
+ assert_equal 14, Factbook.codes.south_america.size
160
+ assert_equal 30, Factbook.codes.australia_oceania.size
161
+ assert_equal 4, Factbook.codes.antartica.size
162
+ assert_equal 5, Factbook.codes.region('Oceans').size
163
+ assert_equal 1, Factbook.codes.region('World').size
164
+
165
+ ## categories + regions
166
+ assert_equal 45, Factbook.codes.countries.europe.size
167
+ ...
168
+ ```
169
+
170
+ See [`data/codes.csv`](data/codes.csv) for the built-in listing of all codes with categories and regions.
171
+
172
+
173
+
174
+
175
+ ## Install
176
+
177
+ Use
178
+
179
+ gem install factbook-readers
180
+
181
+ or add to your Gemfile
182
+
183
+ gem 'factbook-readers'
184
+
185
+
186
+
187
+ ## License
188
+
189
+ The `factbook` scripts are dedicated to the public domain.
190
+ Use it as you please with no restrictions whatsoever.
191
+
192
+
193
+ ## Questions? Comments?
194
+
195
+ Send them along to the [Open Mundi (world.db) Database Forum/Mailing List](http://groups.google.com/group/openmundi).
196
+ Thanks!
@@ -0,0 +1,34 @@
1
+ require 'hoe'
2
+ require './lib/factbook-readers/version.rb'
3
+
4
+ Hoe.spec 'factbook-readers' do
5
+
6
+ self.version = Factbook::Module::Readers::VERSION
7
+
8
+ self.summary = 'factbook-readers - turn thee world factbook country profile pages into open structured data e.g JSON'
9
+ self.description = summary
10
+
11
+ self.urls = { home: 'https://github.com/factbook/factbook' }
12
+
13
+ self.author = 'Gerald Bauer'
14
+ self.email = 'openmundi@googlegroups.com'
15
+
16
+ # switch extension to .markdown for gihub formatting
17
+ self.readme_file = 'README.md'
18
+ self.history_file = 'CHANGELOG.md'
19
+
20
+ self.extra_deps = [
21
+ ['logutils' ],
22
+ ['csvreader'],
23
+ ['webget'],
24
+ ['nokogiri'],
25
+ ## ['activerecord'] # note: will include activesupport,etc.
26
+ ]
27
+
28
+ self.licenses = ['Public Domain']
29
+
30
+ self.spec_extras = {
31
+ required_ruby_version: '>= 2.2.2'
32
+ }
33
+
34
+ end
@@ -0,0 +1,337 @@
1
+ ############################
2
+ # attributes
3
+
4
+ Introduction:
5
+ Background: { name: background }
6
+
7
+ Geography:
8
+ Location: { name: location }
9
+ Geographic coordinates: { name: coords } ## use geo_coords - why, why not??
10
+ Map references: { name: map } ## use map_ref - why, why not??
11
+ Area:
12
+ total: { name: area }
13
+ land: { name: area_land }
14
+ water: { name: area_water }
15
+ note: { name: area_note }
16
+ Area - comparative: { name: area_comparative }
17
+ Land boundaries:
18
+ total: { name: border_land }
19
+ border countries: { name: border_countries } ## todo/fix: remove count from key e.g. border countries (8)
20
+ Coastline: { name: coastline } ## use border_water - why, why not??
21
+ Maritime claims:
22
+ territorial sea: { name: maritime_claims_territorial_sea }
23
+ contiguous zone: { name: maritime_claims_contiguous_zone }
24
+ exclusive economic zone: { name: maritime_claims_exclusive_economic_zone }
25
+ continental shelf: { name: maritime_claims_continental_shelf }
26
+ Climate: { name: climate }
27
+ Terrain: { name: terrain }
28
+ Elevation extremes:
29
+ lowest point: { name: elevation_lowest }
30
+ highest point: { name: elevation_highest }
31
+ Natural resources: { name: resources }
32
+ Land use:
33
+ agricultural land: { name: land_use_agriculture }
34
+ forest: { name: land_use_forest }
35
+ other: { name: land_use_other }
36
+ Irrigated land: { name: land_irrigated }
37
+ Total renewable water resources: { name: water_renewable }
38
+ Freshwater withdrawal (domestic/industrial/agricultural):
39
+ total: { name: water_withdrawal }
40
+ per capita: { name: water_withdrawal_capita }
41
+ Natural hazards:
42
+ name: natural_hazards ## note: "special" attribute case with "mixed" content
43
+ volcanism: { name: natural_hazards_volcanism }
44
+ Environment - current issues: { name: environment_issues }
45
+ Environment - international agreements:
46
+ party to: { name: environment_agreements }
47
+ "signed, but not ratified": { name: environment_agreements_note } ## use _ratified - why, why not??
48
+ Geography - note: { name: geography_note } ## use geo_note or geography - why, why not??
49
+
50
+ People and Society:
51
+ Nationality:
52
+ noun: { name: nationality }
53
+ adjective: { name: nationality_adjective }
54
+ Ethnic groups: { name: ethnic_groups }
55
+ Languages:
56
+ name: languages ## note: "special" attribute case with "mixed" content
57
+ note: { name: languages_note }
58
+ Religions: { name: religions }
59
+ Demographic profile: { name: demographic }
60
+ Population: { name: population }
61
+ Age structure:
62
+ 0-14 years: { name: age_0_14yrs }
63
+ 15-24 years: { name: age_15_24yrs }
64
+ 25-54 years: { name: age_25_54yrs }
65
+ 55-64 years: { name: age_55_64yrs }
66
+ 65 years and over: { name: age_65yrs_plus }
67
+ Dependency ratios:
68
+ total: { name: dependency_ratio }
69
+ youth dependency ratio: { name: dependency_youth_ratio }
70
+ elderly dependency ratio: { name: dependency_elderly_ratio }
71
+ potential support ratio: { name: dependency_support_ratio }
72
+ Median age:
73
+ total: { name: median_age }
74
+ male: { name: median_age_male }
75
+ female: { name: median_age_female }
76
+ Population growth rate: { name: population_growth }
77
+ Birth rate: { name: birth_rate }
78
+ Death rate: { name: death_rate }
79
+ Net migration rate: { name: migration_rate }
80
+ Urbanization:
81
+ urban population: { name: urbanization }
82
+ rate of urbanization: { name: urbanization_growth } ## use _rate - why, why not??
83
+ Major urban areas - population: { name: major_cities }
84
+ Sex ratio:
85
+ at birth: { name: sex_ratio_birth }
86
+ 0-14 years: { name: sex_ratio_0_14yrs }
87
+ 15-24 years: { name: sex_ratio_15_24yrs }
88
+ 25-54 years: { name: sex_ratio_25_54yrs }
89
+ 55-64 years: { name: sex_ratio_55_64yrs }
90
+ 65 years and over: { name: sex_ratio_65yrs_plus }
91
+ total population: { name: sex_ratio }
92
+ Infant mortality rate:
93
+ total: { name: infant_mortality } ## add _rate - why, why not??
94
+ male: { name: infant_mortality_male }
95
+ female: { name: infant_mortality_female }
96
+ Life expectancy at birth:
97
+ total population: { name: life_expectancy }
98
+ male: { name: life_expectancy_male }
99
+ female: { name: life_expectancy_female }
100
+ Total fertility rate: { name: fertility }
101
+ Contraceptive prevalence rate:
102
+ name: contraceptive_rate ## note: "special" attribute case with "mixed" content
103
+ note: { name: contraceptive_rate_note }
104
+ Health expenditures: { name: health_expenditures } ## todo: change to health ??
105
+ Physicians density: { name: density_physicians }
106
+ Hospital bed density: { name: density_hospital_bed }
107
+ Drinking water source:
108
+ improved: { name: drinking_water_improved } ## todo:split into urban/rural/total ??
109
+ unimproved: { name: drinking_water_unimproved }
110
+ Sanitation facility access:
111
+ improved: { name: sanitation_improved } ## todo:split into urban/rural/total ??
112
+ unimproved: { name: sanitation_unimproved }
113
+ HIV/AIDS - adult prevalence rate: { name: aids }
114
+ HIV/AIDS - people living with HIV/AIDS: { name: aids_people }
115
+ HIV/AIDS - deaths: { name: aids_deaths }
116
+ Obesity - adult prevalence rate: { name: obesity }
117
+ Children under the age of 5 years underweight: { name: underweight_children_under_5yrs }
118
+ Education expenditures: { name: education_expenditures } ## change to education ??
119
+ Literacy:
120
+ definition: { name: literacy_def }
121
+ total population: { name: literacy }
122
+ male: { name: literacy_male }
123
+ female: { name: literacy_female }
124
+ School life expectancy (primary to tertiary education):
125
+ total: { name: school_life }
126
+ male: { name: school_life_male }
127
+ female: { name: school_life_female }
128
+ Child labor - children ages 5-14:
129
+ total number: { name: child_labor }
130
+ percentage: { name: child_labor_rate }
131
+ note: { name: child_labor_note }
132
+ "Unemployment, youth ages 15-24":
133
+ total: { name: unemployment_youth }
134
+ male: { name: unemployment_youth_male }
135
+ female: { name: unemployment_youth_female }
136
+
137
+ Government:
138
+ Country name:
139
+ conventional long form: { name: name_long }
140
+ conventional short form: { name: name }
141
+ local long form: { name: name_long_local }
142
+ local short form: { name: name_local }
143
+ note: { name: name_note }
144
+ ## add name_former ( see gm) ?? add abbreviations (see us)
145
+ Government type: { name: government_type }
146
+ Capital:
147
+ name: { name: capital }
148
+ geographic coordinates: { name: capital_coords }
149
+ time difference: { name: capital_time_diff }
150
+ daylight saving time: { name: capital_dst }
151
+ Administrative divisions: { name: admins }
152
+ Independence: { name: independence }
153
+ National holiday: { name: natinal_holiday }
154
+ Constitution: { name: constitution }
155
+ Legal system: { name: legal_system }
156
+ International law organization participation: { name: legal_intl_orgs }
157
+ Suffrage: { name: suffrage }
158
+ ## note: skip Executive,Legislative,Judicial,... entries for now
159
+ International organization participation: { name: intl_orgs }
160
+ Flag description: { name: flag }
161
+ National symbol(s): { name: national_symbols }
162
+ National anthem:
163
+ name: { name: national_anthem}
164
+ lyrics/music: { name: national_anthem_by }
165
+ note: { name: national_anthem_note }
166
+
167
+ Economy:
168
+ Economy - overview: { name: economy_overview }
169
+ GDP (purchasing power parity):
170
+ name: gdp_ppp ## note: "special" attribute case with "mixed" content
171
+ note: { name: gdp_ppp_note }
172
+ GDP (official exchange rate): { name: gdp }
173
+ GDP - real growth rate: { name: gdp_growth }
174
+ GDP - per capita (PPP):
175
+ name: gdp_ppp_capita ## note: "special" attribute case with "mixed" content
176
+ note: { name: gdp_ppp_capita_note }
177
+ Gross national saving: { name: saving }
178
+ "GDP - composition, by end use":
179
+ household consumption: { name: consumption_household }
180
+ government consumption: { name: consumption_government }
181
+ investment in fixed capital: { name: investment_fixed }
182
+ investment in inventories: { name: investment_inventories }
183
+ exports of goods and services: { name: exports_gdp_rate }
184
+ imports of goods and services: { name: imports_gdb_rate }
185
+ "GDP - composition, by sector of origin":
186
+ agriculture: { name: agriculture_gdb_rate }
187
+ industry: { name: industry_gdb_rate }
188
+ services: { name: services_gdb_rate }
189
+ Agriculture - products: { name: agriculture_products }
190
+ Industries: { name: industries }
191
+ Industrial production growth rate: { name: industry_growth }
192
+ Labor force: { name: labor }
193
+ Labor force - by occupation:
194
+ agriculture: { name: labor_agriculture }
195
+ industry: { name: labor_industry }
196
+ services: { name: labor_services }
197
+ Unemployment rate: { name: unemployment }
198
+ Population below poverty line:
199
+ name: poverty ## note: "special" attribute case with "mixed" content
200
+ note: { name: poverty_note }
201
+ Household income or consumption by percentage share:
202
+ "lowest 10%": { name: household_income_lowest } ## use _poorest, _bottom ???
203
+ "highest 10%": { name: household_income_highest } ## use _richest, _top ???
204
+ Distribution of family income - Gini index: { name: gini }
205
+ Budget:
206
+ revenues: { name: budget_revenues }
207
+ expenditures: { name: budget_expenditures }
208
+ Taxes and other revenues: { name: taxes }
209
+ Budget surplus (+) or deficit (-): { name: budget_balance }
210
+ Public debt:
211
+ name: public_debt ## note: "special" attribute case with "mixed" content
212
+ note: { name: public_debt_note }
213
+ Fiscal year: { name: fiscal_year }
214
+ Inflation rate (consumer prices): { name: inflation }
215
+ Central bank discount rate: { name: central_bank_discount_rate } ## use discount_rate - why? why not??
216
+ Commercial bank prime lending rate: { name: prime_rate }
217
+ Stock of narrow money:
218
+ name: narrow_money ## note: "special" attribute case with "mixed" content
219
+ note: { name: narrow_money_note }
220
+ Stock of broad money: { name: broad_money }
221
+ Stock of domestic credit: { name: domestic_credit }
222
+ Market value of publicly traded shares: { name: shares_market_value }
223
+ Current account balance: { name: current_account_balance }
224
+ Exports: { name: exports }
225
+ Exports - commodities: { name: exports_commodities }
226
+ Exports - partners: { name: exports_partners }
227
+ Imports: { name: imports }
228
+ Imports - commodities: { name: imports_commodities }
229
+ Imports - partners: { name: imports_partners }
230
+ Reserves of foreign exchange and gold: { name: foreign_exchange_reserves }
231
+ Debt - external: { name: debt_external }
232
+ Stock of direct foreign investment - at home: { name: direct_foreign_investment_home }
233
+ Stock of direct foreign investment - abroad: { name: direct_foreign_investment_abroad }
234
+ Exchange rates: { name: exchange_rates }
235
+
236
+ Energy:
237
+ Electricity - production: { name: electricity_production }
238
+ Electricity - consumption: { name: electricity_consumption }
239
+ Electricity - exports: { name: electricity_exports }
240
+ Electricity - imports: { name: electricity_imports }
241
+ Electricity - installed generating capacity: { name: electricity_capacity }
242
+ Electricity - from fossil fuels: { name: electricity_fossil }
243
+ Electricity - from nuclear fuels: { name: electricity_nuclear }
244
+ Electricity - from hydroelectric plants: { name: electricity_hydro }
245
+ Electricity - from other renewable sources: { name: electricity_other }
246
+ Crude oil - production: { name: oil_production }
247
+ Crude oil - exports: { name: oil_exports }
248
+ Crude oil - imports: { name: oil_imports }
249
+ Crude oil - proved reserves: { name: oil_reserves }
250
+ Refined petroleum products - production: { name: petroleum_production }
251
+ Refined petroleum products - consumption: { name: petroleum_consumption }
252
+ Refined petroleum products - exports: { name: petroleum_exports }
253
+ Refined petroleum products - imports: { name: petroleum_imports }
254
+ Natural gas - production: { name: natural_gas_production }
255
+ Natural gas - consumption: { name: natural_gas_consumpiton }
256
+ Natural gas - exports: { name: natural_gas_exports }
257
+ Natural gas - imports: { name: natural_gas_imports }
258
+ Natural gas - proved reserves: { name: natural_gas_reserves }
259
+ Carbon dioxide emissions from consumption of energy: { name: carbon_dioxide }
260
+
261
+ Communications:
262
+ Telephones - fixed lines:
263
+ total subscriptions: { name: telephones }
264
+ subscriptions per 100 inhabitants: { name: telephones_subscriptions }
265
+ Telephones - mobile cellular:
266
+ total: { name: telephones_mobile }
267
+ subscriptions per 100 inhabitants: { name: telephones_mobile_subscriptions }
268
+ Telephone system:
269
+ general assessment: { name: telephone_system }
270
+ domestic: { name: telephone_system_domestic }
271
+ international: { name: telephone_system_intl }
272
+ Broadcast media: { name: broadcast_media }
273
+ Radio broadcast stations: { name: radio_broadcast_stations }
274
+ Television broadcast stations: { name: tv_broadcast_stations }
275
+ Internet country code: { name: internet }
276
+ Internet users:
277
+ total: { name: internet_users }
278
+ percent of population: { name: internet_users_rate }
279
+
280
+ Transportation:
281
+ Airports: { name: airports }
282
+ Airports - with paved runways:
283
+ total: { name: airports_paved }
284
+ "over 3,047 m": { name: airports_paved_over_10000ft }
285
+ "2,438 to 3,047 m": { name: airports_paved_8000_10000ft }
286
+ "1,524 to 2,437 m": { name: airports_paved_5000_8000ft }
287
+ "914 to 1,523 m": { name: airports_paved_3000_5000ft }
288
+ "under 914 m": { name: airports_paved_under_3000ft }
289
+ Airports - with unpaved runways:
290
+ total: { name: airports_unpaved }
291
+ "1,524 to 2,437 m": { name: airports_unpaved_5000_8000ft }
292
+ "914 to 1,523 m": { name: airports_unpaved_3000_5000ft }
293
+ "under 914 m": { name: airports_unpaved_under_3000ft }
294
+ Heliports: { name: heliports }
295
+ Pipelines: { name: pipelines }
296
+ Railways:
297
+ total: { name: railways }
298
+ standard gauge: { name: railways_standard_gauge }
299
+ narrow gauge: { name: railways_narrow_gauge }
300
+ broad gauge: { name: railways_broad_gauge }
301
+ dual gauge: { name: railways_dual_gauge }
302
+ Roadways:
303
+ total: { name: roadways }
304
+ paved: { name: roadways_paved }
305
+ unpaved: { name: roadways_unpaved }
306
+ note: { name: roadways_note }
307
+ Waterways: { name: waterways }
308
+ Merchant marine:
309
+ total: { name: merchant_marine }
310
+ by type: { name: merchant_marine_by_type }
311
+ foreign-owned: { name: merchant_marine_foreign }
312
+ registered in other countries: { name: merchant_marine_others }
313
+ Ports and terminals:
314
+ major seaport(s): { name: sea_ports }
315
+ river port(s): { name: river_ports }
316
+
317
+ Military:
318
+ Military branches: { name: military_branches }
319
+ Military service age and obligation: { name: military_age }
320
+ Manpower available for military service:
321
+ males age 16-49: { name: military_manpower_males }
322
+ females age 16-49: { name: military_manpower_females }
323
+ Manpower fit for military service:
324
+ males age 16-49: { name: military_manpower_males_fit }
325
+ females age 16-49: { name: military_manpower_females_fit }
326
+ Manpower reaching militarily significant age annually:
327
+ male: { name: military_manpower_male_annual }
328
+ female: { name: military_manpower_female_annual }
329
+ Military expenditures: { name: military_expenditures }
330
+
331
+ Transnational Issues:
332
+ Disputes - international: { name: disputes }
333
+ Refugees and internally displaced persons:
334
+ refugees (country of origin): { name: refugees }
335
+ IDPs: { name: refugees_idps }
336
+ stateless persons: { name: refugess_stateless }
337
+ Illicit drugs: { name: drugs }