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: 3 months ago
JSON representation
دیتاست استانها، شهرستانها، بخشها، دهستانها و آبادیهای ایران
- Host: GitHub
- URL: https://github.com/kmirzavaziri/iranCitiesDataset
- Owner: kmirzavaziri
- Created: 2021-08-21T14:54:13.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-20T06:56:18.000Z (about 3 years ago)
- Last Synced: 2024-04-05T23:36:16.277Z (7 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
```