PAD Showcase
All tags/Map

People per country

The world in seven steps by rank - scale=quantile - from an array in the page's PHP; hover a country for its number.

1 The data map/population.php php
<?php

  // Population in millions, 2023, rounded - UN World Population Prospects.

  $population = [];

  foreach ( [ 'India' => 1428, 'China' => 1410, 'United States' => 340, 'Indonesia' => 277, 'Pakistan' => 240,
              'Nigeria' => 224, 'Brazil' => 216, 'Bangladesh' => 173, 'Russia' => 144, 'Mexico' => 128,
              'Ethiopia' => 127, 'Japan' => 124, 'Philippines' => 117, 'Egypt' => 113, 'DR Congo' => 102,
              'Vietnam' => 99, 'Iran' => 89, 'Turkey' => 85, 'Germany' => 84, 'Thailand' => 72,
              'United Kingdom' => 68, 'Tanzania' => 67, 'France' => 65, 'South Africa' => 60, 'Italy' => 59,
              'Kenya' => 55, 'Myanmar' => 54, 'Colombia' => 52, 'South Korea' => 52, 'Sudan' => 48,
              'Uganda' => 48, 'Spain' => 48, 'Argentina' => 46, 'Algeria' => 45, 'Iraq' => 45,
              'Afghanistan' => 42, 'Canada' => 39, 'Poland' => 37, 'Morocco' => 37, 'Saudi Arabia' => 37,
              'Ukraine' => 37, 'Angola' => 37, 'Uzbekistan' => 35, 'Peru' => 34, 'Malaysia' => 34,
              'Mozambique' => 34, 'Ghana' => 34, 'Yemen' => 34, 'Nepal' => 31, 'Venezuela' => 28,
              'Madagascar' => 30, 'Cameroon' => 28, 'Australia' => 26, 'North Korea' => 26, 'Niger' => 27,
              'Mali' => 23, 'Kazakhstan' => 20, 'Chile' => 20, 'Romania' => 19, 'Netherlands' => 18,
              'Ecuador' => 18, 'Guatemala' => 18, 'Zambia' => 21, 'Chad' => 18, 'Somalia' => 18,
              'Sweden' => 10, 'Norway' => 5, 'Finland' => 6, 'New Zealand' => 5, 'Mongolia' => 3,
              'Bolivia' => 12, 'Paraguay' => 7, 'Libya' => 7, 'Mauritania' => 5, 'Namibia' => 3,
              'Botswana' => 3, 'Greenland' => 0.06, 'Iceland' => 0.4, 'Papua New Guinea' => 10, 'Cuba' => 11 ] as $country => $millions )
    $population [] = [ 'country' => $country, 'millions' => $millions ];

?>
2 The tag map/population.pad pad
{map 'world', data='population', key='country', value='millions', scale='quantile', title='Population in millions, 2023'}
3 The result rendered on the server
Population in millions, 2023 India: 1,428; China: 1,410; United States of America: 340; Indonesia: 277; Pakistan: 240; Nigeria: 224; Brazil: 216; Bangladesh: 173; Russia: 144; Mexico: 128; Ethiopia: 127; Japan: 124; Philippines: 117; Egypt: 113; Democratic Republic of the Congo: 102; Vietnam: 99; Iran: 89; Turkey: 85; Germany: 84; Thailand: 72; United Kingdom: 68; Tanzania: 67; France: 65; South Africa: 60; Italy: 59; Kenya: 55; Myanmar: 54; Colombia: 52; South Korea: 52; Sudan: 48; Uganda: 48; Spain: 48; Argentina: 46; Algeria: 45; Iraq: 45; Afghanistan: 42; Canada: 39; Poland: 37; Morocco: 37; Saudi Arabia: 37; Ukraine: 37; Angola: 37; Uzbekistan: 35; Peru: 34; Malaysia: 34; Mozambique: 34; Ghana: 34; Yemen: 34; Nepal: 31; Venezuela: 28; Madagascar: 30; Cameroon: 28; Australia: 26; North Korea: 26; Niger: 27; Mali: 23; Kazakhstan: 20; Chile: 20; Romania: 19; Netherlands: 18; and 20 more Andorra United Arab Emirates Antigua and Barb. Anguilla Albania Armenia American Samoa Austria Aruba Åland Azerbaijan Bosnia and Herzegovina Barbados Belgium Burkina Faso Bulgaria Bahrain Burundi Benin St-Barthélemy Bermuda Brunei Bahamas Bhutan Belarus Belize Central African Republic Congo Switzerland Côte d&#039;Ivoire Cook Is. Costa Rica Cabo Verde Curaçao Cyprus Czechia Djibouti Denmark Dominica Dominican Republic Estonia Western Sahara Eritrea Fiji Falkland Islands Micronesia Faeroe Is. Gabon Grenada Georgia Guernsey Gambia Guinea Equatorial Guinea Greece S. Geo. and the Is. Guam Guinea-Bissau Guyana Hong Kong Heard I. and McDonald Is. Honduras Croatia Haiti Hungary Ireland Israel Isle of Man Br. Indian Ocean Ter. Jersey Jamaica Jordan Kyrgyzstan Cambodia Kiribati Comoros St. Kitts and Nevis Kuwait Cayman Is. Laos Lebanon Saint Lucia Liechtenstein Sri Lanka Liberia Lesotho Lithuania Luxembourg Latvia Monaco Moldova Montenegro St-Martin Marshall Is. North Macedonia Macao N. Mariana Is. Montserrat Malta Mauritius Maldives Malawi New Caledonia Norfolk Island Nicaragua Nauru Niue Oman Panama Fr. Polynesia St. Pierre and Miquelon Pitcairn Is. Puerto Rico Palestine Portugal Palau Qatar Serbia Rwanda Solomon Islands Seychelles Singapore Saint Helena Slovenia Slovakia Sierra Leone San Marino Senegal Suriname South Sudan São Tomé and Principe El Salvador Sint Maarten Syria Eswatini Turks and Caicos Is. French Southern Territories Togo Tajikistan Timor-Leste Turkmenistan Tunisia Tonga Trinidad and Tobago Taiwan Uruguay Vatican St. Vin. and Gren. British Virgin Is. U.S. Virgin Is. Vanuatu Wallis and Futuna Is. Samoa Kosovo Zimbabwe Afghanistan: 42 Angola: 37 Argentina: 46 Australia: 26 Bangladesh: 173 Bolivia: 12 Brazil: 216 Botswana: 3 Canada: 39 Democratic Republic of the Congo: 102 Chile: 20 Cameroon: 28 China: 1,410 Colombia: 52 Cuba: 11 Germany: 84 Algeria: 45 Ecuador: 18 Egypt: 113 Spain: 48 Ethiopia: 127 Finland: 6 France: 65 United Kingdom: 68 Ghana: 34 Greenland: 0.06 Guatemala: 18 Indonesia: 277 India: 1,428 Iraq: 45 Iran: 89 Iceland: 0.4 Italy: 59 Japan: 124 Kenya: 55 North Korea: 26 South Korea: 52 Kazakhstan: 20 Libya: 7 Morocco: 37 Madagascar: 30 Mali: 23 Myanmar: 54 Mongolia: 3 Mauritania: 5 Mexico: 128 Malaysia: 34 Mozambique: 34 Namibia: 3 Niger: 27 Nigeria: 224 Netherlands: 18 Norway: 5 Nepal: 31 New Zealand: 5 Peru: 34 Papua New Guinea: 10 Philippines: 117 Pakistan: 240 Poland: 37 Paraguay: 7 Romania: 19 Russia: 144 Saudi Arabia: 37 Sudan: 48 Sweden: 10 Somalia: 18 Chad: 18 Thailand: 72 Turkey: 85 Tanzania: 67 Ukraine: 37 Uganda: 48 United States of America: 340 Uzbekistan: 35 Venezuela: 28 Vietnam: 99 Yemen: 34 South Africa: 60 Zambia: 21 0.06 1,428 no value