iancoleman / cia_world_factbook_api

Converts the CIA World Factbook into a json data structure
MIT License
199 stars 28 forks source link

Question: inconsistency between data/factbook.json and CIA website #14

Closed Avivhdr closed 4 years ago

Avivhdr commented 4 years ago

From you expirience, can you explain why a certain value exists in the CIA website but is missing in the updated json file? could it be because they updated the value after your last update?

CIA website: (South-Africa) image

factbook.json (Johannesburg doesn't have population property):

          "major_urban_areas": {
            "places": [
              {
                "place": "Johannesburg",
                "note": "includes Ekurhuleni"
              },
              {
                "place": "Cape Town",
                "population": 4618000,
                "note": "legislative capital"
              },
              {
                "place": "Durban",
                "population": 3158000
              },
              {
                "place": "Pretoria",
                "population": 2566000,
                "note": "administrative capital"
              },
              {
                "place": "Port Elizabeth",
                "population": 1254000
              },
              {
                "place": "West Rand",
                "population": 898000
              }
            ],
            "date": "2020"
          },

Thank you!

iancoleman commented 4 years ago

Thanks for this. I'll have a look and see why it isn't picking up this value.

For my future reference it'll be something to do with https://github.com/iancoleman/cia_world_factbook_api/blob/c1e83acf9e35adf29d73c1145b24835ec159cb5e/src/country/page.go#L1051

Avivhdr commented 4 years ago

Great! Thanks

Avivhdr commented 4 years ago

@iancoleman I see another inconsistency:

Iraq -- > Transnational Issues :

I think it is because the last 2 countries have 'year' and the first 2 do not.

image

image

Avivhdr commented 4 years ago

Same Issue for Israel:

image

image

Avivhdr commented 4 years ago

Geography --> coastline:

Most countries have: image

some countries have an extra 'note' property: image

Iran is the only one with a '__note' property: image

Reference: Coastline table from factbook

Avivhdr commented 4 years ago

Hi @iancoleman I want to send you a private message regarding this project but i can not find your email / social media.

I would appriciate if you could email me @ avivhdr@gmail.com or give me you email adress.

Thank you!

Avivhdr commented 4 years ago

People and Society :: INDIA image

Error of the same kind in this property (major_urban_areas) exists also in these countries:

  1. Brunei
  2. Iraq
  3. South Africa
  4. United States
  5. India
iancoleman commented 4 years ago

Also needs attention: Iran > Transnational Issues > Refugees

https://web.archive.org/web/20200112004424/https://www.cia.gov/library/publications/the-world-factbook/geos/ir.html

refugees (country of origin): 2.5-3.0 (1 million registered, 1.5-2.0 million undocumented) (Afghanistan) (2017); 28,268 (Iraq) (2018)

iancoleman commented 4 years ago

Major Urban Areas (South Africa and India etc)

See https://github.com/iancoleman/cia_world_factbook_api/commit/bb80e2967ebc9e3ff7d534196488ff909cb52a97

Iraq -- > Transnational Issues (and Israel)

See https://github.com/iancoleman/cia_world_factbook_api/commit/99c160ede8bfb4fdbc17d432b822c3102d8aa17e

Geography --> coastline:

See https://github.com/iancoleman/cia_world_factbook_api/commit/bc01d8bd1b7c2552204377951476f6ea74854303


Still to fix

Any more you find please post here, and thanks again for the reports so far.

Avivhdr commented 4 years ago

Transnational Issues > Refugees > by_country: I filtered for all the items in "by_country" that doesn't match people: number & country_of_origin: string


[
  {
    "country": "Algeria",
    "value": [
      {
        "people": 100000
      },
      {
        "people": "mostly living in Algerian-sponsored camps in the southwestern Algerian town of Tindouf"
      }
    ]
  },
  {
    "country": "Angola",
    "value": [
      {
        "people": 5709,
        "country_of_origin": 2020
      }
    ]
  },
  {
    "country": "Argentina",
    "value": [
      {
        "people": "are recognized as refugees, or have received alternative legal stay"
      }
    ]
  },
  {
    "country": "Bangladesh",
    "value": [
      {
        "people": 914998,
        "country_of_origin": 744400
      }
    ]
  },
  {
    "country": "Brazil",
    "value": [
      {
        "people": "are recognized as refugees, or received alternative legal stay"
      }
    ]
  },
  {
    "country": "Chad",
    "value": [
      {
        "people": 330725,
        "country_of_origin": 2020
      }
    ]
  },
  {
    "country": "China",
    "value": [
      {
        "people": "undetermined",
        "country_of_origin": "North Korea"
      }
    ]
  },
  {
    "country": "Colombia",
    "value": [
      {
        "people": "are recognized as refugees, or received alternative legal stay"
      }
    ]
  },
  {
    "country": "Costa Rica",
    "value": [
      },
      {
        "people": "are recognized as refugees, or received alternative legal stay"
      }
    ]
  },
  {
    "country": "Egypt",
    "value": [
      {
        "people": 6752,
        "country_of_origin": 2020
      }
    ]
  },
  {
    "country": "Ethiopia",
    "value": [
      {
        "people": 198670,
        "country_of_origin": 2020
      }
    ]
  },
  {
    "country": "Ghana",
    "value": [
      {
        "people": 6351,
        "country_of_origin": 2010
      }
    ]
  },
  {
    "country": "Iran",
    "value": [
      {
        "people": 2.5
      },
      {
        "people": 1.5,
        "country_of_origin": "; ; ; "
      }
    ]
  },
  {
    "country": "Iraq",
    "value": [
      {
        "people": 7026,
        "country_of_origin": 2020
      }
    ]
  },
  {
    "country": "Israel",
    "value": [
      {
        "people": 7857,
        "country_of_origin": 2019
      }
    ]
  },
  {
    "country": "Jordan",
    "value": [
      {
        "people": 67266,
        "country_of_origin": 2020
      }
    ]
  },
  {
    "country": "Kenya",
    "value": [
      {
        "people": 44238,
        "country_of_origin": 2020
      }
    ]
  },
  {
    "country": "Malawi",
    "value": [
      {
        "people": 6606,
        "country_of_origin": 2020
      }
    ]
  },
  {
    "country": "Mauritania",
    "value": [
      {
        "people": 26001,
        "country_of_origin": 2020
      }
    ]
  },
  {
    "country": "Mozambique",
    "value": [
      {
        "people": 7841,
        "country_of_origin": 2020
      }
    ]
  },
  {
    "country": "Niger",
    "value": [
      {
        "people": 120619,
        "country_of_origin": 2020
      }
    ]
  },
  {
    "country": "Pakistan",
    "value": [
      {
        "people": 2.58
      },
      {
        "people": 1.18,
        "country_of_origin": "; "
      }
    ]
  },
  {
    "country": "Panama",
    "value": [
      {
        "people": 82661,
        "country_of_origin": 2019
      }
    ]
  },
  {
    "country": "Peru",
    "value": [
      {
        "people": "are recognized as refugees, or have received alternative legal stay"
      }
    ]
  },
  {
    "country": "Rwanda",
    "value": [
      {
        "people": 73327,
        "country_of_origin": 2020
      }
    ]
  },
  {
    "country": "South Africa",
    "value": [
      {
        "people": 5273,
        "country_of_origin": 2020
      }
    ]
  },
  {
    "country": "South Sudan",
    "value": [
      {
        "people": 274916,
        "country_of_origin": 2020
      }
    ]
  },
  {
    "country": "Sudan",
    "value": [
      {
        "people": 815052,
        "country_of_origin": 2020
      }
    ]
  },
  {
    "country": "Syria",
    "value": [
      {
        "people": 15699,
        "country_of_origin": 2019
      }
    ]
  },
  {
    "country": "Trinidad and Tobago",
    "value": [
      {
        "people": "are recognized as refugees, or have received alternative legal stay"
      }
    ]
  },
  {
    "country": "Uganda",
    "value": [
      {
        "people": "409,882  , 48,119 , 40,181",
        "country_of_origin": "Democratic Republic of the Congo; refugees and asylum seekers; Burundi; Somalia; refugees and asylum seekers"
      },
    ]
  },
  {
    "country": "Yemen",
    "value": [
      {
        "people": 14638,
        "country_of_origin": 2020
      }
    ]
  },
  {
    "country": "Zambia",
    "value": [
      {
        "people": 5849,
        "country_of_origin": 2020
      }
    ]
  },
  {
    "country": "Zimbabwe",
    "value": [
      {
        "people": 8060,
        "country_of_origin": 2020
      }
    ]
  }
]
iancoleman commented 4 years ago

Transnational Issues > Refugees > by_country

See https://github.com/iancoleman/cia_world_factbook_api/commit/e2c3c5d61bf695e6bef81b2e26eb7507042e2991 and https://github.com/iancoleman/cia_world_factbook_api/commit/0d28c6caf4f6831a90f4b704f0a8891dda172e2d

Thanks for reporting these inconsistencies. Always happy to see more if you find them!