4

I am searching a list of European countries and capitals with populations. This list must include the name of country with its population and area in square kilometer, the capital of country with its population. I want get this data in format of JSON document like

{
    "countryName": "Belgium",
    "countryPopulation": "11258000",
    "area": "30510.0",
    "countryCapital": "Brussels",
    "capitalPopulation": "107307"
} 
2

A source of data in JSON would be a port of the CIA World Factbook.

Github repo

For example, the entry for Belgium

https://github.com/openmundi/factbook.json/blob/master/europe/be-belgium.json

Has dictionary entries:

  "major_urban_areas_population": {
  "text": "BRUSSELS (capital) 1.892 million; Antwerp 961,000 (2009)"}

and

"area": {
  "total": "30,528 sq km",
  "land": "30,278 sq km",
  "water": "250 sq km"
},

and

"population": {
  "text": "10,444,268 (July 2013 est.)"
},

to select a few.

There are other ports of the CIA World Factbook that may better structure that data.

0

You can use the Countries repo on Github, which includes all the fields you want except population. You'll have to filter on "region":"Europe"

https://raw.githubusercontent.com/mledoze/countries/master/dist/countries.json

Example for Belgium entry:

{
   "name":{
      "common":"Belgium",
      "official":"Kingdom of Belgium",
      "native":{
         "deu":{
            "official":"K\u00f6nigreich Belgien",
            "common":"Belgien"
         },
         "fra":{
            "official":"Royaume de Belgique",
            "common":"Belgique"
         },
         "nld":{
            "official":"Koninkrijk Belgi\u00eb",
            "common":"Belgi\u00eb"
         }
      }
   },
   "tld":[
      ".be"
   ],
   "cca2":"BE",
   "ccn3":"056",
   "cca3":"BEL",
   "cioc":"BEL",
   "currency":[
      "EUR"
   ],
   "callingCode":[
      "32"
   ],
   "capital":"Brussels",
   "altSpellings":[
      "BE",
      "Belgi\u00eb",
      "Belgie",
      "Belgien",
      "Belgique",
      "Kingdom of Belgium",
      "Koninkrijk Belgi\u00eb",
      "Royaume de Belgique",
      "K\u00f6nigreich Belgien"
   ],
   "region":"Europe",
   "subregion":"Western Europe",
   "languages":{
      "deu":"German",
      "fra":"French",
      "nld":"Dutch"
   },
   "translations":{
      "cym":{
         "official":"Kingdom of Belgium",
         "common":"Gwlad Belg"
      },
      "deu":{
         "official":"K\u00f6nigreich Belgien",
         "common":"Belgien"
      },
      "fra":{
         "official":"Royaume de Belgique",
         "common":"Belgique"
      },
      "hrv":{
         "official":"Kraljevina Belgija",
         "common":"Belgija"
      },
      "ita":{
         "official":"Regno del Belgio",
         "common":"Belgio"
      },
      "jpn":{
         "official":"\u30d9\u30eb\u30ae\u30fc\u738b\u56fd",
         "common":"\u30d9\u30eb\u30ae\u30fc"
      },
      "nld":{
         "official":"Koninkrijk Belgi\u00eb",
         "common":"Belgi\u00eb"
      },
      "por":{
         "official":"Reino da B\u00e9lgica",
         "common":"B\u00e9lgica"
      },
      "rus":{
         "official":"\u041a\u043e\u0440\u043e\u043b\u0435\u0432\u0441\u0442\u0432\u043e \u0411\u0435\u043b\u044c\u0433\u0438\u044f",
         "common":"\u0411\u0435\u043b\u044c\u0433\u0438\u044f"
      },
      "spa":{
         "official":"Reino de B\u00e9lgica",
         "common":"B\u00e9lgica"
      },
      "fin":{
         "official":"Belgian kuningaskunta",
         "common":"Belgia"
      }
   },
   "latlng":[
      50.83333333,
      4
   ],
   "demonym":"Belgian",
   "landlocked":false,
   "borders":[
      "FRA",
      "DEU",
      "LUX",
      "NLD"
   ],
   "area":30528
}

They don't include population, because

restrain from sending too detailed, regional or changing countries data like financial or economic data (e.g. GDP, population, etc.)

(link to CONTRIBUTING.MD)

  • Thanks, but I looking data with population. I don't need update of population(2015). It can be 2010. I need get a population of country and capital. – Loniks Sep 22 '15 at 19:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.