Skip to content

Fix city assignments: Move 130 Irkutsk Oblast cities from Sevastopol to correct state#1136

Merged
dr5hn merged 4 commits into
masterfrom
copilot/fix-sevastopol-municipality-issue
Oct 14, 2025
Merged

Fix city assignments: Move 130 Irkutsk Oblast cities from Sevastopol to correct state#1136
dr5hn merged 4 commits into
masterfrom
copilot/fix-sevastopol-municipality-issue

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Oct 13, 2025

Problem

The database contained a critical geographic assignment error affecting 130 cities in Russia:

  • Sevastopol municipality (Ukraine, state_id 1912) incorrectly contained 147 cities instead of ~17
  • Irkutsk Oblast (Russia, state_id 1880) showed 0 cities when it should contain ~130 cities including major Siberian cities

Cities like Irkutsk, Angarsk, Bratsk, and Bodaybo were wrongly assigned to Sevastopol municipality in Ukraine instead of Irkutsk Oblast in Russia.

Root Cause

130 cities from Irkutsk Oblast (Siberian Russia, latitude 50-61°N) were incorrectly assigned with:

  • state_id: 1912 (Sevastopol, Ukraine)
  • country_id: 230 (Ukraine)
  • country_code: "UA"
  • state_code: "40"

Solution

This PR corrects the geographic assignments by:

  1. Identifying misplaced cities using geographic coordinates (latitude >= 46°N indicated Siberian cities, not Crimean)
  2. Updating 130 cities with correct attributes:
    • state_id: 1912 → 1880 (Sevastopol → Irkutsk Oblast)
    • country_id: 230 → 182 (Ukraine → Russia)
    • country_code: "UA" → "RU"
    • state_code: "40" → "IRK"
  3. Moving cities from contributions/cities/UA.json to contributions/cities/RU.json

Changes

contributions/cities/RU.json:

  • Added 130 Irkutsk Oblast cities
  • Total: 5,393 → 5,523 cities (+130)

contributions/cities/UA.json:

  • Removed 130 misassigned Irkutsk cities
  • Total: 1,949 → 1,819 cities (-130)

Verification

Sevastopol (state_id 1912): Now contains 17 cities

  • Geographic range: 44.4°N - 44.8°N (Crimean Peninsula)
  • Includes: Sevastopol, Balaklava, Inkerman, and proper districts
  • All correctly assigned to Ukraine (UA)

Irkutsk Oblast (state_id 1880): Now contains 130 cities

  • Geographic range: 51.5°N - 61.3°N (Siberian Russia)
  • Includes: Irkutsk (capital), Angarsk, Bratsk, Bodaybo, Ust-Ilimsk
  • All correctly assigned to Russia (RU)

Fixes issue where Sevastopol municipality contained cities from Irkutsk oblast, and Irkutsk showed as a municipality without cities.

Original prompt

This section details on the original issue you should resolve

<issue_title>Sevastopol municipality contains cities and districts from Irkutsk oblast. The city of Irkutsk showed as a municipality without any cities</issue_title>
<issue_description>Sevastopol municipality contains cities and districts from Irkutsk oblast.
Sevastopol is municipality and should contain only Sevastopol city

The city of Irkutsk showed as a municipality without any cities
Irkutsk is the capital of Irkutsk oblast and contains a lot of towns(currently they are in Sevastopol municipality )</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #706


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

…tsk Oblast

Co-authored-by: dr5hn <6929121+dr5hn@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Sevastopol municipality to include only Sevastopol city Fix city assignments: Move 130 Irkutsk Oblast cities from Sevastopol to correct state Oct 13, 2025
Copilot AI requested a review from dr5hn October 13, 2025 13:40
@dr5hn dr5hn requested a review from Aakash315 October 14, 2025 04:06
@dr5hn dr5hn marked this pull request as ready for review October 14, 2025 07:22
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. fixed Issue has been fixed labels Oct 14, 2025
@dr5hn
Copy link
Copy Markdown
Owner

dr5hn commented Oct 14, 2025

@copilot I've resolved conflicts, can you please take a look if the issue we fixed all the data is in correct place?

@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Oct 14, 2025
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Oct 14, 2025

@copilot I've resolved conflicts, can you please take a look if the issue we fixed all the data is in correct place?

Yes, I've verified all data is in the correct place after the conflict resolution. ✅

Verification Results:

City Counts:

  • Sevastopol (state_id 1912): 17 cities ✓
  • Irkutsk Oblast (state_id 1880): 130 cities ✓

Geographic Distribution:

  • Sevastopol cities: 44.4°N - 44.8°N (Crimean Peninsula) ✓
  • Irkutsk Oblast cities: 51.5°N - 61.3°N (Siberian Russia) ✓

Key Cities Verified:

  • Sevastopol city → correctly in state_id 1912 (Ukraine)
  • Irkutsk city → correctly in state_id 1880 (Russia)
  • Angarsk, Bratsk, Bodaybo → all correctly in Irkutsk Oblast (Russia)

Data Integrity:

  • Zero cities with mismatched country codes ✓
  • No geographic anomalies (no high-latitude cities in Sevastopol, no low-latitude cities in Irkutsk) ✓

The fix survived the merge successfully. All 130 Irkutsk Oblast cities remain correctly assigned to Russia, and Sevastopol contains only its 17 proper cities/districts from Crimea.

@dr5hn dr5hn merged commit 79887e8 into master Oct 14, 2025
1 check failed
@dr5hn dr5hn deleted the copilot/fix-sevastopol-municipality-issue branch October 14, 2025 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fixed Issue has been fixed size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sevastopol municipality contains cities and districts from Irkutsk oblast. The city of Irkutsk showed as a municipality without any cities

2 participants