Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kmirzavaziri/iranCitiesDataset
دیتاست استانها، شهرستانها، بخشها، دهستانها و آبادیهای ایران
https://github.com/kmirzavaziri/iranCitiesDataset
Last synced: about 1 month ago
JSON representation
دیتاست استانها، شهرستانها، بخشها، دهستانها و آبادیهای ایران
- Host: GitHub
- URL: https://github.com/kmirzavaziri/iranCitiesDataset
- Owner: kmirzavaziri
- Created: 2021-08-21T14:54:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-20T06:56:18.000Z (about 3 years ago)
- Last Synced: 2024-08-03T23:02:41.688Z (5 months ago)
- Language: Python
- Size: 7.18 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-Iran-datasets - استانها و شهرهای ایران
README
# دیتاست استانها، شهرستانها، بخشها، دهستانها و شهر-یا-روستاهای ایران
## How to use
- Create a table with the following DDL.
```
create table %TABLE_NAME%
(
id mediumint auto_increment
primary key,
title varchar(200) charset utf8mb4 not null,
type enum ('ostan', 'shahrestan', 'bakhsh', 'dehestan', 'shahr_roosta') not null,
parent int unsigned null
)
collate = utf8mb4_persian_ci;create index _type_asc_index
on %TABLE_NAME% (type);
```- Clone this repo and enter it.
```
git clone https://github.com/kmirzavaziri/iranCitiesDataset.git
cd iranCitiesDataset
```- Make the `.sql` file with the following script.
```
python3 make.py %TABLE%
```- Import the `.sql` into the database. (Beware that the sql file `TRUNCATE`s the table and then inserts the rows.)
```
nohup mysql %CREDENTIALS% %DATABASE% < iranAdministrativeDivision.sql
```