You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
👍🎉 First off, thanks for taking the time to contribute! 🎉👍
The following is a set of guidelines for contributing to Contributing to Country State City Database. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request.
How Can I Contribute?
Fixing Data By Yourself
If you want to fix some data and raise a pull request
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.
Glance at Table Structure
regions.sql
Column
Data type
Explanation
Required
id
integer
Unique ID used internally, just increment by one when adding entries to the list.
required
name
string
The official name of the region. Use WikiData or Wikipedia or some other legitimate source.
required
translations
text
An array of region name translations
created_at
timestamp
Set it using NOW()
updated_at
timestamp
Automatically Updated
flag
tinyint
1/0 (automatically set to 1 by default)
wikiDataId
string
The unique ID from wikiData.org
subregions.sql
Column
Data type
Explanation
Required
id
integer
Unique ID used internally, just increment by one when adding entries to the list.
required
name
string
The official name of the subregion. Use WikiData or Wikipedia or some other legitimate source.
required
translations
text
An array of subregion name translations
region_id
string
Unique id of region from regions.sql
created_at
timestamp
Set it using NOW()
updated_at
timestamp
Automatically Updated
flag
tinyint
1/0 (automatically set to 1 by default)
wikiDataId
string
The unique ID from wikiData.org
countries.sql
Column
Data type
Explanation
Required
id
integer
Unique ID used internally, just increment by one when adding entries to the list.
required
name
string
The official name of the country. Use WikiData or Wikipedia or some other legitimate source.
ISO-3166-2 subdivision code for the state. Can be found in wikipedia articles such as this: ISO_3166-2:NO. FIPS county codes were deprecated in 2008, so surely we aren't using them?