GitHub

DuckDB Sudan Extension إضافة DuckDB للسودان

Unified SQL access to Sudan's humanitarian, development, and geospatial data from 5 international APIs. وصول موحد عبر SQL لبيانات السودان الإنسانية والتنموية والجغرافية من 5 واجهات برمجة دولية.

0
Population (2024) عدد السكان
0
Refugees (2025) لاجئون
0
States ولاية
0
APIs واجهات برمجة
0
SQL Functions دوال SQL
Install — DuckDB v1.4.4+ (Windows) التثبيت — DuckDB v1.4.4+ (ويندوز)
-- Enable HTTPS downloads INSTALL httpfs; LOAD httpfs; -- Set the custom extension repository SET custom_extension_repository = 'https://osman-geomatics93.github.io/duckdb-sudan-'; -- Install and load INSTALL sudan; LOAD sudan;
Alternative — Build from source بديل — البناء من المصدر
git clone --recurse-submodules https://github.com/Osman-Geomatics93/duckdb-sudan-.git cd duckdb-sudan- build_release.bat build\release\duckdb.exe -unsigned
Coming soon — Community registry قريباً — سجل المجتمع
INSTALL sudan FROM community; LOAD sudan;

Data Providers مزودو البيانات

Live connections to 5 international APIs. Green dot = API reachable. اتصالات مباشرة بـ 5 واجهات برمجة دولية. النقطة الخضراء = API متاح.

World Bank

البنك الدولي

Development indicators, GDP, population, education

SUDAN_WorldBank('SP.POP.TOTL')

World Health Organization

منظمة الصحة العالمية

Health indicators, disease burden, mortality rates

SUDAN_WHO('MDG_0000000026')

FAO

منظمة الأغذية والزراعة

Agricultural production, food security, land use

SUDAN_FAO('QCL', 'production')

UNHCR

المفوضية السامية

Refugees, IDPs, asylum seekers, displacement data

SUDAN_UNHCR('refugees')

ILO

منظمة العمل الدولية

Employment, labor force, unemployment statistics

SUDAN_ILO('UNE_DEAP_SEX_AGE_RT')

Live Data Dashboard لوحة البيانات

Real data from Sudan's APIs, accessible through simple SQL queries. بيانات حقيقية من واجهات برمجة السودان.

Sudan Population Growth (World Bank)

Sudanese Refugees Worldwide (UNHCR)

Maternal Mortality Ratio (WHO)

Regional Population Comparison 2024

Interactive Map — Sudan's 18 States خريطة تفاعلية — 18 ولاية سودانية

Real polygon boundaries from GADM v4.1 embedded as MultiPolygon GeoJSON. Click a state for details. حدود مضلعات حقيقية من GADM v4.1 مدمجة كـ MultiPolygon GeoJSON. انقر على ولاية للتفاصيل.

SQL Playground ساحة SQL التجريبية

Try example queries. Install the extension locally to run your own. جرب استعلامات المثال. ثبت الإضافة محلياً لتشغيل استعلاماتك.

DuckDB SQL
Click "Run" to execute the query.

All SQL Functions جميع دوال SQL

Discovery & Metadata

FunctionTypeDescription
SUDAN_Providers()tableList all 5 data providers with Arabic names and URLs
SUDAN_WB_Indicators(search)tableSearch World Bank indicators by keyword
SUDAN_WHO_Indicators(search)tableSearch WHO GHO indicators by keyword
SUDAN_Search(query)tableCross-provider indicator search

Data Functions

FunctionSignatureSource
SUDAN_WorldBank(indicator, countries := ['SDN'])World Bank V2 API
SUDAN_WHO(indicator, countries := ['SDN'])WHO GHO OData API
SUDAN_FAO(dataset, element, countries := ['SDN'])FAOSTAT API
SUDAN_UNHCR(population_type, countries := ['SDN'])UNHCR Population API
SUDAN_ILO(indicator, countries := ['SDN'])ILO SDMX API

Geospatial Functions

FunctionTypeDescription
SUDAN_Boundaries(level)tableAdmin boundaries as MultiPolygon GeoJSON from GADM v4.1 ('country', 'state', 'locality')
SUDAN_States()table18 states with bilingual names, ISO codes, centroids, and polygon boundaries
SUDAN_GeoCode(name)scalarState name (Arabic or English) → ISO code

Supported Countries الدول المدعومة

All functions default to Sudan. Use the countries parameter for regional comparison. جميع الدوال تعمل افتراضياً للسودان. استخدم معامل countries للمقارنة الإقليمية.

SDNSudanالسودان
EGYEgyptمصر
ETHEthiopiaإثيوبيا
TCDChadتشاد
SSDSouth Sudanجنوب السودان
ERIEritreaإريتريا
LBYLibyaليبيا
CAFCentral African Rep.أفريقيا الوسطى

Changelog سجل التغييرات

v0.1.1 — Real Polygon Boundaries

February 2026
  • Replaced Point centroids with real MultiPolygon boundaries from GADM v4.1
  • SUDAN_Boundaries('state') now returns actual state polygons (780–53,852 chars each)
  • SUDAN_Boundaries('country') returns full country outline (103K chars)
  • SUDAN_States() geojson column now contains polygon boundaries
  • Coordinates simplified to 3 decimal places (~111m accuracy)
  • 9 test cases with 52 assertions

v0.1.0 — Initial Release

February 2026
  • 12 SQL functions across 5 international APIs
  • World Bank, WHO, FAO, UNHCR, ILO data providers
  • Embedded GeoJSON boundaries for 18 Sudan states
  • Bilingual support (Arabic/English)
  • Regional comparison with 8 neighboring countries
  • In-memory response caching

Roadmap

Upcoming
  • DuckDB Community Extensions listing
  • Locality-level boundaries (admin-2)
  • Filter pushdown for year ranges
  • Additional data providers (OCHA, HDX)

Building from Source البناء من المصدر

Windows

git clone --recurse-submodules https://github.com/Osman-Geomatics93/duckdb-sudan-.git cd duckdb-sudan- build_release.bat build\release\duckdb.exe -unsigned

Linux / macOS

git clone --recurse-submodules https://github.com/Osman-Geomatics93/duckdb-sudan-.git cd duckdb-sudan- GEN=ninja make release ./build/release/duckdb -unsigned

Interactive Notebooks دفاتر تفاعلية

Learn SQL and explore Sudan's data interactively in Google Colab. No installation needed — click and start querying. تعلّم SQL واستكشف بيانات السودان تفاعلياً في Google Colab. بدون تثبيت — انقر وابدأ الاستعلام.

📚
SQL Beginner
SELECT * FROM SUDAN_States();
18 rows

SQL Basics with Sudan Data أساسيات SQL مع بيانات السودان

تعلم SQL من الصفر باستخدام بيانات حقيقية

A hands-on SQL tutorial using real Sudan data. Covers SELECT, WHERE, JOIN, GROUP BY, HAVING, CASE, and geospatial queries — all powered by live API data from the extension. دليل عملي لتعلم SQL باستخدام بيانات السودان الحقيقية. يغطي SELECT، WHERE، JOIN، GROUP BY، HAVING، CASE، والاستعلامات الجغرافية.

📄 70+ cells ⏱ ~20 min 📍 jupysql magic 🌐 DuckDB spatial
🌎
Geospatial Plotly Folium Advanced
px.choropleth_mapbox(gdf, ...)
🗺 dark map

Geospatial Analysis Dashboard لوحة التحليل الجغرافي المكاني

خرائط تفاعلية ولوحات بيانات حديثة

13 interactive visualizations: choropleth maps, animated population race, refugee Sankey flows, regional sunburst, health dashboard, agriculture treemap, dark-themed Folium map with popups, radar charts, GDP gauges, and an executive dashboard. 13 رسماً تفاعلياً: خرائط حرارية، سباق سكاني متحرك، مخطط سانكي للاجئين، شمسي إقليمي، لوحة صحية، خريطة شجرية للزراعة، خريطة Folium داكنة، مخطط راداري، ولوحة تنفيذية.

📊 13 sections 🗺 Plotly dark theme 🌏 Folium multi-layer 💾 5 export formats