Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

World Locations SQLite Database

This dataset contains a comprehensive, ready-to-use SQLite database (world_locations.db) of all geographical locations in the world, built using the GeoNames dataset.

Features

  • Contains over 13 million locations (Countries, Cities, Villages, Points of Interest).
  • Includes over 15 million alternate names, fully supporting Arabic and English location names.
  • Pre-configured with SQLite FTS5 (Full-Text Search) for extremely fast location lookups.
  • Ready to be downloaded and integrated into any Python application, Web App, or API.

How to use in Python

You can download and use it directly using the huggingface_hub library:

from huggingface_hub import hf_hub_download
import sqlite3

# Download the database
db_path = hf_hub_download(repo_id="aborasheed/world-locations-db", filename="world_locations.db", repo_type="dataset")

# Connect to the database
conn = sqlite3.connect(db_path)
cursor = conn.cursor()

# Search for a location (e.g., 'الرياض')
cursor.execute('''
    SELECT p.name, p.country_code, p.population 
    FROM places_fts f
    JOIN places p ON f.geonameid = p.geonameid
    WHERE places_fts MATCH ?
    ORDER BY p.population DESC
    LIMIT 5
''', ('الرياض',))

print(cursor.fetchall())
Downloads last month
38