Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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".
  • Loading branch information
toxyl authored Apr 11, 2020
commit e0e66798eef2e19c14de867bd4bfa2be87f27796
2 changes: 1 addition & 1 deletion app/utils/populations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down