Commit 630cce09 authored by Michał Woźniak's avatar Michał Woźniak
Browse files

hard-coding population data for infection sites (as of today)

parent 475d7bec
Pipeline #121 passed with stage
in 0 seconds
......@@ -2,7 +2,564 @@
* available sites array and site-to-data mapping
*/
var sites = []
var siteData = {}
/*
* yes, population is hard-coded
* doesn't change that much, removes one failure mode, and removes one request to Wikipedia
*
* for new infection sites machinery of getting population from WP remains in-place
*/
var siteData = {
"Afghanistan": {
"population": 32225560
},
"Albania": {
"population": 2876591
},
"Algeria": {
"population": 43000000
},
"Andorra": {
"population": 76177
},
"Angola": {
"population": 25789024
},
"Antigua and Barbuda": {
"population": 81799
},
"Argentina": {
"population": 44938712
},
"Armenia": {
"population": 3018854
},
"Australia": {
"population": 23401892
},
"Austria": {
"population": 8902600
},
"Azerbaijan": {
"population": 10027874
},
"Bahamas": {
"population": 351461
},
"Bahrain": {
"population": 1234571
},
"Bangladesh": {
"population": 149772364
},
"Barbados": {
"population": 277821
},
"Belarus": {
"population": 9491800
},
"Belgium": {
"population": 11515793
},
"Belize": {
"population": 408487
},
"Benin": {
"population": 10008749
},
"Bhutan": {
"population": 741700
},
"Bolivia": {
"population": 11428245
},
"Bosnia and Herzegovina": {
"population": 3511372
},
"Brazil": {
"population": 210147125
},
"Brunei": {
"population": 442400
},
"Bulgaria": {
"population": 7000039
},
"Burkina Faso": {
"population": 20107509
},
"Cambodia": {
"population": 15288489
},
"Cameroon": {
"population": 17463836
},
"Canada": {
"population": 37894799
},
"Cape Verde": {
"population": 543767
},
"Central African Republic": {
"population": 4987640
},
"Chad": {
"population": 13670084
},
"Chile": {
"population": 17574003
},
"China": {
"population": 1339724852
},
"Colombia": {
"population": 50372424
},
"Costa Rica": {
"population": 4999441
},
"Croatia": {
"population": 4076246
},
"Cuba": {
"population": 11209628
},
"Cyprus": {
"population": 838897
},
"Czech Republic": {
"population": 10649800
},
"DR Congo": {
"population": 91931000
},
"Denmark": {
"population": 5822763
},
"Diamond Princess": {
"population": 3711
},
"Djibouti": {
"population": 921804
},
"Dominica": {
"population": 71293
},
"Dominican Republic": {
"population": 10735896
},
"East Timor": {
"population": 1183643
},
"Ecuador": {
"population": 17300000
},
"Egypt": {
"population": 100075480
},
"El Salvador": {
"population": 6420746
},
"Equatorial Guinea": {
"population": 1222442
},
"Eritrea": {
"population": 5750433
},
"Estonia": {
"population": 1328360
},
"Eswatini": {
"population": 1093238
},
"Ethiopia": {
"population": 73750932
},
"Fiji": {
"population": 926276
},
"Finland": {
"population": 5521158
},
"France": {
"population": 67022000
},
"Gabon": {
"population": 2119275
},
"Gambia": {
"population": 2051363
},
"Georgia": {
"population": 3723464
},
"Germany": {
"population": 83149300
},
"Ghana": {
"population": 31072940
},
"Greece": {
"population": 10768477
},
"Grenada": {
"population": 111454
},
"Guinea-Bissau": {
"population": 1874303
},
"Guatemala": {
"population": 17263239
},
"Guernsey": {
"population": 63026
},
"Guinea": {
"population": 11628972
},
"Guyana": {
"population": 786391
},
"Haiti": {
"population": 11123178
},
"Honduras": {
"population": 8303771
},
"Hong Kong": {
"population": 7482500
},
"Hungary": {
"population": 9772756
},
"Iceland": {
"population": 364260
},
"Ireland": {
"population": 4921500
},
"India": {
"population": 1210854977
},
"Indonesia": {
"population": 237641326
},
"Iran": {
"population": 83183741
},
"Iraq": {
"population": 40194216
},
"Isle of Man": {
"population": 83314
},
"Israel": {
"population": 7412200
},
"Italy": {
"population": 60317546
},
"Ivory Coast": {
"population": 23740424
},
"Jamaica": {
"population": 2890299
},
"Japan": {
"population": 126150000
},
"Jersey": {
"population": 106800
},
"Jordan": {
"population": 10407793
},
"Kazakhstan": {
"population": 18448600
},
"Kenya": {
"population": 47564296
},
"Kosovo": {
"population": 1810463
},
"Kuwait": {
"population": 4621638
},
"Kyrgyzstan": {
"population": 6389500
},
"Laos": {
"population": 7096376
},
"Latvia": {
"population": 1919968
},
"Lebanon": {
"population": 6859408
},
"Liberia": {
"population": 4809768
},
"Libya": {
"population": 6653210
},
"Liechtenstein": {
"population": 38557
},
"Lithuania": {
"population": 2794329
},
"Luxembourg": {
"population": 613894
},
"Macau": {
"population": 667400
},
"Madagascar": {
"population": 26262313
},
"Malaysia": {
"population": 32772100
},
"Maldives": {
"population": 392473
},
"Mali": {
"population": 19329841
},
"Malta": {
"population": 493559
},
"Mauritania": {
"population": 3537368
},
"Mauritius": {
"population": 1265985
},
"Mexico": {
"population": 126577691
},
"Moldova": {
"population": 2681735
},
"Monaco": {
"population": 38300
},
"Mongolia": {
"population": 3278290
},
"Montenegro": {
"population": 631219
},
"Morocco": {
"population": 35581294
},
"Mozambique": {
"population": 27909798
},
"MS Zaandam": {
"population": 1829
},
"Myanmar": {
"population": 53582855
},
"Namibia": {
"population": 2606971
},
"Nepal": {
"population": 26494504
},
"Netherlands": {
"population": 17424978
},
"New Zealand": {
"population": 0
},
"Nicaragua": {
"population": 6167237
},
"Niger": {
"population": 17138707
},
"Nigeria": {
"population": 204630242
},
"North Macedonia": {
"population": 2077132
},
"Northern Cyprus": {
"population": 326000
},
"Norway": {
"population": 5367580
},
"Oman": {
"population": 2773479
},
"Pakistan": {
"population": 207
},
"Palestine": {
"population": 4952168
},
"Panama": {
"population": 3405813
},
"Papua New Guinea": {
"population": 8606323
},
"Paraguay": {
"population": 7152703
},
"Peru": {
"population": 32824358
},
"Philippines": {
"population": 100981437
},
"Poland": {
"population": 38386000
},
"Portugal": {
"population": 10276617
},
"Qatar": {
"population": 2641669
},
"Republic of the Congo": {
"population": 5244359
},
"Romania": {
"population": 19401658
},
"Russia": {
"population": 146745098
},
"Rwanda": {
"population": 12374397
},
"Saint Kitts and Nevis": {
"population": 46204
},
"Saint Lucia": {
"population": 165595
},
"San Marino": {
"population": 33344
},
"Saudi Arabia": {
"population": 34218169
},
"Senegal": {
"population": 14668522
},
"Serbia": {
"population": 6963764
},
"Seychelles": {
"population": 97096
},
"Singapore": {
"population": 5638700
},
"Slovakia": {
"population": 5450421
},
"Slovenia": {
"population": 2094060
},
"Somalia": {
"population": 11031386
},
"South Africa": {
"population": 58775022
},
"South Korea": {
"population": 51709098
},
"Spain": {
"population": 46733038
},
"Sri Lanka": {
"population": 21670000
},
"St. Vincent and the Grenadines": {
"population": 109991
},
"Sudan": {
"population": 41592539
},
"Suriname": {
"population": 541638
},
"Sweden": {
"population": 10333456
},
"Switzerland": {
"population": 8570146
},
"Syria": {
"population": 17070135
},
"Taiwan": {
"population": 23780452
},
"Tanzania": {
"population": 44928923
},
"Thailand": {
"population": 64785909
},
"Togo": {
"population": 7965055
},
"Trinidad and Tobago": {
"population": 1363985
},
"Tunisia": {
"population": 11722038
},
"Turkey": {
"population": 83154997
},
"Uganda": {
"population": 34634650
},
"Ukraine": {
"population": 42030832
},
"United Arab Emirates": {
"population": 9599353
},
"United Kingdom": {
"population": 67545757
},
"United States": {
"population": 328239523
},
"Uruguay": {
"population": 3390077
},
"Uzbekistan": {
"population": 33961708
},
"Vatican City": {
"population": 1000
},
"Venezuela": {
"population": 28887118
},
"Vietnam": {
"population": 95545962
},
"Zambia": {
"population": 13092666
},
"Zimbabwe": {
"population": 12973808
}
}
/*
* get the global pandemic data
......@@ -235,7 +792,10 @@ let getSiteCases = (site) => {
}
// cache the cases data in case we need it later
siteData[site] = site_data
if ( ! ( site in siteData ) ) {
siteData[site] = {}
}
siteData[site] = {...siteData[site], ...site_data }
// return it
return site_data
})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment