From e0e66798eef2e19c14de867bd4bfa2be87f27796 Mon Sep 17 00:00:00 2001 From: Tox Date: Sat, 11 Apr 2020 11:11:43 +0200 Subject: [PATCH] new source for population info I've compiled a new JSON for population data that I serve on my own server. The file is the same as the one provided by Geonames, but all populations have been updated to the numbers found on Wiki. Territories that have no permanent residents have a population of 0. And I've changed the key "geonames" to "data". --- app/utils/populations.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/populations.py b/app/utils/populations.py index 1d8bd843..a024ac2f 100644 --- a/app/utils/populations.py +++ b/app/utils/populations.py @@ -20,7 +20,7 @@ def fetch_populations(): mappings = {} # Fetch the countries. - countries = requests.get("http://api.geonames.org/countryInfoJSON?username=dperic").json()["geonames"] + countries = requests.get("https://www.webcodesign.de/population").json()["data"] # Go through all the countries and perform the mapping. for country in countries: