dr5hn / countries-states-cities-database

🌍 Discover our global repository of countries, states, and cities! 🏙️ Get comprehensive data in JSON, SQL, PSQL, XML, YAML, and CSV formats. Access ISO2, ISO3 codes, country code, capital, native language, timezones (for countries), and more. #countries #states #cities
https://dr5hn.github.io/countries-states-cities-database/
Open Data Commons Open Database License v1.0
6.81k stars 2.44k forks source link

Bogotá D.C. city is duplicate #793

Open mario-alba opened 6 days ago

mario-alba commented 6 days ago

Hi, I found that "Bogotá D.C." city is duplicate on two diferent states, "Cundinamarca" state with id 2875 and "Bogotá D.C." state with id 4921. The correct state is "Bogotá D.C." state with id 4921. This error is on all sql and json files.

image

image

dosubot[bot] commented 6 days ago

¡Hola @mario-alba! 🌟 Welcome to the repository. I'm here to help you with any bugs, questions, and contributions while we wait for a human maintainer.

To correct the duplication of "Bogotá D.C." city in the SQL and JSON files, you need to update the entries to ensure that "Bogotá D.C." is associated only with the state ID 4921. Here are the steps to make the necessary changes:

SQL File

Update the state ID for "Bogotá D.C." to 4921:

UPDATE cities SET state_id = 4921 WHERE name = 'Bogotá D.C.';

JSON File

Ensure the entry for "Bogotá D.C." has the correct state ID:

{
  "id": 4921,
  "name": "Bogotá D.C.",
  "state_code": "DC",
  "latitude": "4.28204150",
  "longitude": "-74.50270420",
  "type": "capital district"
}

YAML File

Update the YAML file to reflect the correct state ID:

- id: 4921
  name: 'Bogotá D.C.'
  country_id: 48
  country_code: CO
  country_name: Colombia
  state_code: DC
  type: 'capital district'
  latitude: '4.28204150'
  longitude: '-74.50270420'

These updates will ensure that "Bogotá D.C." is correctly associated with state ID 4921 in all relevant files [1][2][3].

To continue talking to Dosu, mention @dosu.