Skip to content

Latest commit

ย 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ‡ฉ๐Ÿ‡ฟ Algeria Cities Data (Wilayas, Dairas, Communes) for PostgreSQL

A simple CLI tool to import structured data of Algerian


Features:

  • Automatically creates tables: wilaya, daira, communes
  • Populates them with full official data from a structured JSON file
  • Minimal setup โ€“ just provide your database credentials

Installation:

npm install -g algeriacitiesdata

Usage:

algeriacitiesdata

You will be prompted to enter your database connection:

DB_HOST: 127.0.0.1
DB_PORT: 5432
DB_USER: your_user
DB_PASSWORD: your_password
DB_NAME: your_database

If the connection is valid, the tool will:

  • Create necessary tables if they don't exist
  • Insert all wilayas, their dairas, and communes

Example Output:

โœ” Tables created successfully  
โœ” All data inserted successfully

Tables created:

  • wilaya(id, code, name, name_ar)
  • daira(id, name, name_ar, wilaya_id)
  • communes(id, name, name_ar, wilaya_id, daira_id)

Author: Fares Djefaflia GitHub: https://github.com/faresdjefaflia


License: MIT

About

A Node.js script to import Algerian administrative data (wilayas, dairas, and communes) into a PostgreSQL database.

Resources

Stars

9 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages