Giter Club home page Giter Club logo

dr5hn / countries-states-cities-database Goto Github PK

View Code? Open in Web Editor NEW
6.7K 123.0 2.4K 1.46 GB

๐ŸŒ 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

Home Page: https://dr5hn.github.io/countries-states-cities-database/

License: Open Data Commons Open Database License v1.0

PHP 97.56% Python 2.44%
cities countries states city state country json sql regions region

countries-states-cities-database's Introduction

banner

๐ŸŒ Countries States Cities Database

release size

Full Database of city state country available in JSON, SQL, PSQL, XML, YAML & CSV format. All Countries, States & Cities are Covered & Populated with Different Combinations & Versions.

API ๐Ÿš€

๐ŸŽ‰ Introducing API for Countries States Cities Database.

API Documentation

banner

Available Formats

  • JSON
  • SQL
  • PSQL
  • XML
  • YAML
  • CSV

Distribution Files Info

File JSON SQL PSQL XML YAML CSV
Regions โœ… โœ… โœ… โœ… โœ… โœ…
Subregions โœ… โœ… โœ… โœ… โœ… โœ…
Countries โœ… โœ… โœ… โœ… โœ… โœ…
States โœ… โœ… โœ… โœ… โœ… โœ…
Cities โœ… โœ… โœ… โœ… โœ… โœ…
Country+States โœ… NA NA โœ… โœ… NA
Country+Cities โœ… NA NA โœ… โœ… NA
State+Cities โœ… NA NA โœ… โœ… NA
Country+State+Cities/World โœ… โœ… โœ… โœ… โœ… NA

Demo

https://dr5hn.github.io/countries-states-cities-database/

Insights

Total Regions : 6
Total Sub Regions : 22
Total Countries : 250
Total States/Regions/Municipalities : 5,084
Total Cities/Towns/Districts : 150,573

Last Updated On : 15th May 2024

Next API Database Update

The API database is regularly updated to ensure the latest data is available to users. The next scheduled update is on:

Upcoming API Database Update Date: 1st June 2024

Please note that this date is subject to change based on unforeseen circumstances. Although we strive to adhere to the schedule, there may be instances where the update date is missed. We apologize for any inconvenience caused in such cases.

We appreciate your understanding and patience. Thank you for using the Countries States Cities Database!

License

This Countries States Cities Database is made available under the Open Database License. Any rights in individual contents of the database are licensed under the Database Contents License.

Contributing

๐Ÿ‘๐ŸŽ‰ First off, thanks for your interest in contributing! ๐ŸŽ‰๐Ÿ‘

If you want to contribute to the database, please follow the guidelines outlined below:

Contributing Guidelines

  • Fork the repository and clone it to your local machine.
  • Make the necessary changes to the data:
    • To fix cities records, update the sql/world.sql > cities Table.
    • To fix states/provinces records, update the sql/world.sql > states Table.
    • To fix countries records, update the sql/world.sql > countries Table.
    • To fix regions records, update the sql/world.sql > regions Table.
    • To fix subregions records, update the sql/world.sql > subregions Table.
  • Once you've made the changes, create a pull request with a clear description of the modifications you've made.

Please make sure to review the guidelines before making any contributions. They will help ensure that your contributions align with the project's standards and make the process smoother for everyone involved.

You can find the detailed contribution guidelines here.

Repo Activity

Repo Activity

As always, thanks to our amazing contributors!

Made with contrib.rocks.

Sponsors

Make the world more Greener ๐ŸŒด

Contribute towards better earth buy the world a tree

Other Publishings

Find this project on data.world

Follow me at

Github @dr5hn Twitter @dr5hn LinkedIn @dr5hn

๐Ÿ™‹โ€โ™‚๏ธ Support My Work

Github Sponsorship

ko-fi

Suggestions / Feedbacks

Suggestions & Feedbacks are Most Welcome
gadadarshan[at]gmail[dot]com

Disclaimer

Please note that while every effort has been made to ensure the accuracy and completeness of the Countries States Cities Database, it may still contain errors or omissions. The database is continuously being refined and improved based on user feedback and contributions.

Contributors are encouraged to review the Contribution Guidelines and follow the specified guidelines for updating and correcting data in the database. However, due to the collaborative nature of the project, we cannot guarantee the absolute accuracy or reliability of the information provided.

The Countries States Cities Database is made available under the Open Database License, and any rights in individual contents of the database are licensed under the Database Contents License. Users are responsible for independently verifying the data and using it at their own discretion.

We appreciate the efforts of contributors in identifying and addressing issues in the database, and we encourage users to report any inaccuracies or suggest improvements through creating issues. However, please note that the database may not always reflect the latest geopolitical changes or political status.

It is recommended that users consult official sources and corroborate the data from the Countries States Cities Database with other reliable references for critical applications or decision-making processes.

By accessing and using the Countries States Cities Database, users acknowledge and agree to the aforementioned disclaimer and the terms of the Open Database License and the Database Contents License.

That's all Folks. Enjoy.

countries-states-cities-database's People

Contributors

abdo0 avatar adevade avatar agostinofiscale avatar alexandru-bagu avatar aykutbuyukkaya avatar bor0 avatar cesariverit avatar dr5hn avatar freelenzer avatar fzzio avatar gabiito avatar gabrielfs001 avatar gchikovanii avatar github-actions[bot] avatar gorynych avatar hafijul233 avatar jalandis avatar jayesh-mahato avatar joaorb64 avatar jvlomazzi avatar laurentcodes avatar liopoos avatar megadreamsbe avatar mwaijohn avatar naeralys avatar neutrino-dgada avatar scottgigante avatar slackero avatar syihammusoffa avatar valerianpereira avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

countries-states-cities-database's Issues

Cities list STILL incorrect

Cities are still wrong, there are Italian cities duplicated in multiple countries in the JSON file, about 843 of them. Please look at how often "Acquaviva delle Fonti" repeats for example in the states of Korea "Kyeongsangbuk" it is repeated
60200380-027c9e00-9814-11e9-9744-ed77162b517e

United kingdom data is wrong

Some thing is wrong with the United kingdom data. All states have the same cities. Cities and States are also wrong. Check screenshot

Skipped a Step

I uploaded this and began to play with it. Since I live in the United States, I see all 50 states and a few of the U.S. Territories, but I am also seeing cities such as Byram in Mississippi and Trimble in Missouri, and other cities before selecting the proper state.

Missing states for Venezuela

Hello Friend! ๐Ÿ˜

Checking the countries+states.json I realized that the following states were missing for Venezuela:

  • Estate: Apure, Capital: San Fernando de Apure
  • Estate: Falcรณn, Capital: Coro

Also, for the state Federal Dependencies of Venezuela, its correct name would be Distrito Capital, whose capital is Caracas

MySQL characters are not correct

I found that some MySQL city and state characters encoding are wrong can you please fix it and update code.
One example:-
Roร…ยพaje Municipality

Duplicate state names for Germany

  1. There two states named Rheinland-Pfalz and Rhineland-Palatinate, actually both are same state. One is German name and other one is English name. And the cities belongs to both are different, but it can be included in any one of them(I have done a random check in google maps).
  2. Also Niederwerth can be added to Rheinland-Pfalz
  3. The same issue there with Baveria and Bayern
    The issue there in country+states+cities, countries+states json and cties, world sql files. Raising this issue to know if it's intentional or a bug.

Thank you.

Cities lists are incorrect

I've noticed that there are plenty of cities are incorrect, lots of duplicated and added from other countries just check the json file for: "Zirakpur" for example.

Ladakh - India

Ladakh a new U.T. was carved out of Jammu & Kashmir state in India. Leh & Kargil are the two cities in Ladakh. Earlier the two cities were in Jammu & Kashmir state

Thanks!

Writing in the Issue tab... but I actually just wanted to thank you for the Countries and States database. Obviously a lot of research/work went into it, so... Thanks!

Add abbreviations to states and adding zip/postal codes

First of, I'd like to thank you for this great list. it would be great to add states abbreviations as well as postal/zip codes for each city if applicable. I know the list will grow big, but it can be handled through bunch of API calls to size it down.

Wrong States with Australia

The states table contains results for Australia, country ID 14, that are not present in Australia. Will send through an update shortly

Adding Feature : "Search cities b country"

Hello, I'm interested to contribute to this project, How about adding feature :
"Getting all cities by country " I can get all the cities listed for the country I will select

Accents

Good work here,

Just one thing, I have noticed many of the accents are not showing correctly. Is this just me or there is an issue with the encoding? I am referring to the SQL files, for instance, cities.sql.

Missing US cities

I noticed that the United States is missing a list of cities. Is there any chance you'll add them? If not, would you be able to recommend somewhere I could easily get a list to programmatically add to the list?

Counties are not Cities, Misc Stuff...

In cities.sql, I live in id=118291 (a county) and also live in id=121951 (city)

Also, you are missing a Minneapolis listing (KS, MN and NC...) https://en.wikipedia.org/wiki/Minneapolis,_North_Carolina

... and, in countries.sql there are places like Vatican and US Minor Outlying Islands that don't have states/"administration areas" or cities - where I am getting with this is, please add latitude and longitude to records on countries.sql and states.sql

SQL File Encoding Incorrect

The SQL database dumps are not correctly encoded. Therefore, special characters are not exported properly. This results in the data files containing strings like these:

Aร„ยซbak
Montrรƒยฉal
Colรƒยณn Department

Based on the meta data in the SQL files, it seems that you are using utf8mb4 as your DB encoding. To export the data in the correct format, specify the encoding when exporting the data, as shown here:

mysqldump -u user_name -p database_name --default-character-set=utf8mb4 --result-file=date_file_name.sql

If you re-export the SQL files, I will test them for you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.