DOI: 10.5281/zenodo.5148692
title: 1117 Russian cities with city name, region, geographic coordinates and 2020 population estimate

description: 1117 Russian cities with city name, region, geographic coordinates and 2020 population estimate. How to use <pre>from pathlib import Path import requests import pandas as pd url = ("https://raw.githubusercontent.com/" "epogrebnyak/ru-cities/main/assets/towns.csv") # save file locally p = Path("towns.csv") if not p.exists(): content = requests.get(url).text p.write_text(content, encoding="utf-8") # read as dataframe df = pd.read_csv("towns.csv") print(df.sample(5))</pre> Files: towns.csv - city information regions.csv - list of Russian Federation regions alt_city_names.json - alternative city names Сolumns (towns.csv): Basic info: <code>city</code> - city name (several cities have alternative names marked in <code>alt_city_names.json</code>) <code>population</code> - city population, thousand people, Rosstat estimate as of 1.1.2020 <code>lat,lon</code> - city geographic coordinates Region: <code>region_name</code> - subnational region (oblast, republic, krai or AO) <code>region_iso_code</code> - ISO 3166 code, eg <code>RU-VLD</code> <code>federal_district</code>, eg <code>Центральный</code> City codes: <code>okato</code> <code>oktmo</code> <code>fias_id</code> <code>kladr_id</code> Data sources City list and city population collected from Rosstat publication Регионы России. Основные социально-экономические показатели городов and parsed from publication Microsoft Word files. City list corresponds to this Wikipedia article. Alternative dataset is wiki-based Dadata city dataset (no population data). Comments City groups <code>Ханты-Мансийский</code> and <code>Ямало-Ненецкий</code> autonomous regions excluded to avoid duplication as parts of <code>Тюменская область</code>. Several notable towns are classified as administrative part of larger cities (<code>Сестрорецк</code> is a municpality at Saint-Petersburg, <code>Щербинка</code> part of Moscow). They are not and not reported in this dataset. By individual city <code>Белоозерский</code> not found in Rosstat publication, but should be considered a city as of 1.1.2020 Alternative city names We suppressed letter "ё" <code>city</code> columns in towns.csv - we have <code>Орел</code>, but not <code>Орёл</code>. This affected: <code>Белоозёрский</code> <code>Королёв</code> <code>Ликино-Дулёво</code> <code>Озёры</code> <code>Щёлково</code> <code>Орёл</code> <code>Дмитриев</code> and <code>Дмитриев-Льговский</code> are the same city. <code>assets/alt_city_names.json</code> contains these names. Tests <pre><code>poetry install poetry run python -m pytest </code></pre> How to replicate dataset 1. Base dataset Run: download data stro rar/get.sh convert <code>Саратовская область.doc</code> to docx run make.py Creates: <code>_towns.csv</code> <code>assets/regions.csv</code> 2. API calls Note: do not attempt if you do not have to - this runs a while and loads third-party API access. You have the resulting files in repo, so probably does not need to these scripts. Run: <code>cd geocoding</code> run coord_dadata.py (needs token) run coord_osm.py Creates: coord_dadata.csv coord_osm.csv 3. Merge data Run: run merge.py Creates: assets/towns.csv
description: See code at Github: https://github.com/epogrebnyak/ru-cities