Several people asked me if I can create a database with countries, states and cities, including their population.
A quick solution, but not so accurate: I downloaded cities5000.zip from https://download.geonames.org/export/dump/, added colored icons according population, and uploaded it to map.
Known errors:
- Not every entry is a city.
- Some provinces in China have lots of cities while others have few.
- Not accurate to determine population in a given area. Singapore is a city-state with no administrative divisions. GeoNames list contain Singapore with 5638700 people plus other 94 places with population ranging from 5360 to 276990 (totalizing 6221493).
Icon | Cities |
---|---|
![]() | 19 |
![]() | 36 |
![]() | 137 |
![]() | 331 |
![]() | 575 |
![]() | 1644 |
![]() | 2715 |
![]() | 5531 |
![]() | 13063 |
![]() | 15071 |
![]() | 20135 |
![]() | 570 |
![]() | 82 |
What s the definition of a city or a municipality
If I would source data from census websites of each country, or Wikipedia, harmonizing all countries into a single database would be a HELL, because:
- Romania have officially 103 municipalities (urban), 217 cities (urban), 2861 communes (rural).
- Germany have 2058 “towns”.
- Italy have 7954 “communes”.
- Spain have 8122 “municipalities”.
- Italy and Spain do not have “city” or “town” designation.
Accurate data can be found on government websites
Most countries provide open data for free download on their government / census websites, example:
- https://www.istat.it/it/archivio/156224 – list of communes in Italy.
- https://www.destatis.de/DE/Themen/Laender-Regionen/Regionales/Gemeindeverzeichnis/Administrativ/05-staedte.html Deutchland Städte nach Fläche, Bevölkerung – list of 2058 cities in Germany.
- http://censusindia.gov.in/Tables_Published/Admin_Units/admin.html – List of Towns in India – 5161 towns.
Some governments may provide also ZIP codes or PIN codes for free. geodatasource
Now, my idea is to take open data from government websites (or scrap from Wikipedia for countries where there is no data available from government), compile all countries into a single database and offer it as paid download for efforts of compiling.
With ~200 countries in the world, this may be a huge effort. Census year vary from country to country so I will probably not include city population. Next problem is that, if I stick database to cities only, Romania would have 320 cities but Italy will have 0. If I include 7954 communes of Italy, I will probably need to include also the 2861 communes of Romania and not just 320 cities. If anyone is interested in this project, or have suggestions how to make it better, please contact me!
Available now:
- Romania: 320 cities and 2861 communes, indicating population for 11 censuses 1912-2021 https://www.teoalida.ro/lista-orase
- United States: 363 cities over 100,000 people, indicating population for 24 censuses 1790-2020. https://www.teoalida.com/database/us-cities