All Projects → kelvins → Us Cities Database

kelvins / Us Cities Database

Licence: mit
🇺🇸 SQL dump of U.S. cities data containing latitude and longitude

Labels

Projects that are alternatives of or similar to Us Cities Database

Archer
基于inception的自动化SQL操作平台,支持SQL执行、LDAP认证、发邮件、OSC、SQL查询、SQL优化建议、权限管理等功能,支持docker镜像
Stars: ✭ 1,239 (+1292.13%)
Mutual labels:  sql
Evolutility Server Node
Model-driven REST or GraphQL backend for CRUD and more, written in Javascript, using Node.js, Express, and PostgreSQL.
Stars: ✭ 84 (-5.62%)
Mutual labels:  sql
Electrocrud
Database CRUD Application Built on Electron | MySQL, Postgres, SQLite
Stars: ✭ 1,267 (+1323.6%)
Mutual labels:  sql
Fluent Plugin Sql
SQL input/output plugin for Fluentd
Stars: ✭ 82 (-7.87%)
Mutual labels:  sql
Starhackit
StarHackIt: React/Native/Node fullstack starter kit with authentication and authorisation, data backed by SQL, the infrastructure deployed with GruCloud
Stars: ✭ 1,253 (+1307.87%)
Mutual labels:  sql
Graphjin
GraphJin - Build APIs in 5 minutes with GraphQL. An instant GraphQL to SQL compiler.
Stars: ✭ 1,264 (+1320.22%)
Mutual labels:  sql
Pg activity
pg_activity is a top like application for PostgreSQL server activity monitoring.
Stars: ✭ 1,232 (+1284.27%)
Mutual labels:  sql
Plsql And Sql Coding Guidelines
Trivadis PL/SQL & SQL Coding Guidelines
Stars: ✭ 89 (+0%)
Mutual labels:  sql
Eval Sql.net
SQL Eval Function | Dynamically Evaluate Expression in SQL Server using C# Syntax
Stars: ✭ 84 (-5.62%)
Mutual labels:  sql
Docker Superset
Repository for Docker Image of Apache-Superset. [Docker Image: https://hub.docker.com/r/abhioncbr/docker-superset]
Stars: ✭ 86 (-3.37%)
Mutual labels:  sql
Sql Database Management System
SQL is a domain-specific language used in programming and designed for managing data held in a relational database management system, or for stream processing in a relational data stream management system.
Stars: ✭ 83 (-6.74%)
Mutual labels:  sql
Snowflake Jdbc
Snowflake JDBC Driver
Stars: ✭ 83 (-6.74%)
Mutual labels:  sql
Jsql
jSQL is the "official" Javascript Query Language - A database written in Javascript for use in a browser or Node.
Stars: ✭ 85 (-4.49%)
Mutual labels:  sql
Cs Books
超过1000本的计算机经典书籍、个人笔记资料以及本人在各平台发表文章中所涉及的资源等。书籍资源包括C/C++、Java、Python、Go语言、数据结构与算法、操作系统、后端架构、计算机系统知识、数据库、计算机网络、设计模式、前端、汇编以及校招社招各种面经~
Stars: ✭ 1,215 (+1265.17%)
Mutual labels:  sql
Iysql
IYSQL - Improve Your SQL
Stars: ✭ 87 (-2.25%)
Mutual labels:  sql
Clickhouse Go
Golang driver for ClickHouse
Stars: ✭ 1,234 (+1286.52%)
Mutual labels:  sql
Xeus Sql
xeus-sql is a Jupyter kernel for general SQL implementations.
Stars: ✭ 85 (-4.49%)
Mutual labels:  sql
Sql
A delightful SQL ORM ☺️
Stars: ✭ 89 (+0%)
Mutual labels:  sql
Sequelize
Sequelize module for Nest framework (node.js) 🍈
Stars: ✭ 88 (-1.12%)
Mutual labels:  sql
Training Material
A collection of code examples as well as presentations for training purposes
Stars: ✭ 85 (-4.49%)
Mutual labels:  sql

U.S. Cities Database

The SQL file has 29.880 registered cities. All cities are located in the United States.

The SQL file contains two tables:

  • US_STATES: ID, STATE_CODE and STATE_NAME.

  • US_CITIES: ID, ID_STATE, CITY, COUNTY, LATITUDE and LONGITUDE.

The US_CITIES table has all (or almost all) cities from the United States.

Compatibility

The us_cities.sql file is compatible with MySQL. See sqlite for the sqlite3 compatible version.

Samples

US_STATES

ID STATE_CODE STATE_NAME
1 AL Alabama
2 AK Alaska
3 AZ Arizona

US_CITIES

ID ID_STATE CITY COUNTY LATITUDE LONGITUDE
1 2 Adak Aleutians West 55.999722 -161.20777
2 2 Akiachak Bethel 60.891854 -161.39233
3 2 Akiak Bethel 60.890632 -161.19932
4 2 Akutan Aleutians East 54.143012 -165.78536
5 2 Alakanuk Wade Hampton 62.746967 -164.60228

Export Data

You can use the following SQL command to export the data to a CSV file.

SELECT
	US_CITIES.ID, US_STATES.STATE_CODE, US_STATES.STATE_NAME, US_CITIES.CITY, US_CITIES.COUNTY, US_CITIES.LATITUDE, US_CITIES.LONGITUDE
FROM
	US_STATES
INNER JOIN
	US_CITIES
ON
	US_STATES.ID = US_CITIES.ID_STATE
ORDER BY
	US_CITIES.ID ASC
INTO OUTFILE
	'C:/US_Cities.csv'
FIELDS TERMINATED BY
	';'
ENCLOSED BY
	''
LINES TERMINATED BY
	'\n';

For convenience, the generated CSV file is here.

License

This project was created under the MIT license.

If you find some inconsistent data, such as a duplicated city, please open an issue explaining what is happening or directly fix the problem and send a Pull Request.

References

This SQL dump was created based on the SQL dump that can be found at the following link: http://www.farinspace.com/us-cities-and-state-sql-dump/

Some changes that have been made:

  • The zip column was deleted.
  • Some duplicated cities were deleted.
  • All data were reorganized (rows and columns).
  • It was included the Puerto Rico state name that was missing in the original SQL.
  • It was included the US_STATES table.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].