The most accurate open-source SVG maps of Tunisia
Country · 7 economic regions · 5 districts · 24 governorates · 279 delegations · 2,083 imadas
5 levels of detail · 8 visual modes · SVG · GeoJSON · TopoJSON · العربية · Français · English
🧭 Live explorer · ⬇️ Download · ⚡ Quick start · 📚 Docs · ✅ Accuracy report
Why Map Tunisia?
Most Tunisia SVGs online are hand-traced, outdated, missing islands, or stop at the 24 governorates. Map Tunisia is built from OpenStreetMap, the most precise open source of Tunisian boundaries, and cross-checked against official INS and ISIE lists. The result is a complete, exactly nested set of maps that you can drop into any project.
🎯 Accurate
|
🧩 Complete
|
🛠️ Ready to use
|
🖼️ Gallery
Six partitions, exactly nested
Eight modes
Five levels of detail (Djerba, at the same zoom)
More examples: labelled maps in both scripts, dark delegations, nested sectors
governorates · medium · labeled |
governorates · medium · labeled-ar |
delegations · low · dark |
delegations · medium · nested |
⚡ Quick start
1. Use a file directly. Every SVG scales to any size:
<img src="https://cdn.jsdelivr.net/gh/Alaa-Taieb/map-tunisia@main/dist/svg/governorates/tunisia-governorates-medium-light.svg" alt="Map of the governorates of Tunisia" width="420">
2. Inline it and style it with CSS. Every shape has an id and data-* attributes:
#TN-61 { fill: #ffb703; } /* Sfax, by ISO 3166-2 code */ .unit[data-region="sud-ouest"] { fill: #8ecae6; } /* a whole economic region */ .unit:hover { fill: #e63946; }
3. Add behaviour with a few lines of JavaScript:
document.querySelectorAll('.map-tunisia .unit').forEach((el) => el.addEventListener('click', () => alert(`${el.dataset.nameFr} · ${el.dataset.nameAr} — ${Number(el.dataset.population2024).toLocaleString()} inhabitants`)));
4. Place your own points. All SVGs share one frame (UTM 32N, 1 unit = 1 km):
import { project } from 'https://cdn.jsdelivr.net/gh/Alaa-Taieb/map-tunisia@main/src/projection.js'; const [x, y] = project([10.7600, 34.7406]); // Sfax → SVG coordinates svg.insertAdjacentHTML('beforeend', `<circle cx="${x}" cy="${y}" r="3" fill="crimson"/>`);
More recipes for React, D3 + TopoJSON, Leaflet, MapLibre, Python (GeoPandas, Plotly), R, QGIS, Figma, print and laser cutting are in the usage guide.
⬇️ Download
Every file lives in dist/ and follows one naming scheme:
dist/svg/<partition>/tunisia-<partition>-<lod>-<mode>.svg 140 SVG maps
dist/geojson/tunisia-<partition>-<lod>.geojson WGS84, with all attributes
dist/topojson/tunisia-<partition>-<lod>.topojson WGS84, shared borders
dist/data/<partition>.csv | .json names, codes, populations, areas, label points
| Popular file | Size |
|---|---|
| Governorates, labelled · Arabic | 135 KB |
| Governorates, interactive | 135 KB |
| Delegations, light | 446 KB |
| Sectors (imadas), nested | 1.8 MB |
| Country outline, for icons | 4 KB |
| Governorates TopoJSON · GeoJSON | 105 KB · 306 KB |
Browse every combination in the file catalog or the live explorer, or grab everything with Download ZIP.
For JavaScript projects: npm install github:Alaa-Taieb/map-tunisia, then import { svgPath, project } from 'map-tunisia' (API).
📦 What's inside
Partitions
| Partition | Units | Description | |
|---|---|---|---|
country |
1 | تونس | National outline with every island |
regions |
7 | الأقاليم الاقتصادية | INS economic regions: Grand Tunis, Nord-Est, Nord-Ouest, Centre-Est, Centre-Ouest, Sud-Est, Sud-Ouest |
districts |
5 | الأقاليم | The aqalim of Decree 2023-589 (National Council of Regions and Districts) |
governorates |
24 | الولايات | The wilayas, with ids TN-11 … TN-83 (ISO 3166-2) |
delegations |
279 | المعتمديات | The mutamadiyat, INS 2024 nomenclature |
sectors |
2,083 | العمادات | The imadas, the finest administrative level |
Levels of detail
| Level | Tolerance | Use it for | Governorates file |
|---|---|---|---|
full |
none (OSM precision) | GIS, print, deep zoom | 1.3 MB |
high |
≈ 20 m | posters, zoomable maps | 390 KB |
medium |
≈ 100 m | websites, dashboards, slides | 135 KB |
low |
≈ 500 m | small embeds, mobile | 37 KB |
tiny |
≈ 2.5 km | icons, thumbnails | 17 KB |
Modes
| Mode | Mode | ||
|---|---|---|---|
plain |
neutral, ready for your CSS | labeled |
names in Latin script, callouts where crowded |
outline |
strokes only: print, laser, overlays | labeled-ar |
names in Arabic, right-to-left |
light |
colourful, neighbours never share a colour | nested |
higher-level borders drawn heavier |
dark |
for dark UIs | interactive |
hover + tooltips, no JavaScript |
Details and guidance: partitions, levels & modes · every id and attribute: data dictionary.
✅ Accuracy
Map Tunisia starts from OpenStreetMap and fixes what raw OSM gets wrong. Everything is reproducible and documented in the accuracy report, regenerated with every build.
| Raw OpenStreetMap | Map Tunisia | |
|---|---|---|
| Delegations | 264 + a stale duplicate (2014 nomenclature) | 279, matching the INS 2024 list code by code |
| Nesting | levels drawn independently; lakes missing from delegations | one planar topology: 0 gaps, 0 overlaps |
| Kébili and Jendouba | 10 sectors in the wrong delegation | reassigned, checked against INS codes and ISIE maps |
| Names | rotated or duplicated names, typos, invisible characters | 24 names corrected; Unicode normalised |
| Country polygon | includes the 12-NM territorial sea | land only, following the coastline |
| Islets | 63 mapped only as coastline | included |
How it works: all boundaries are noded into one set of faces, conflicts are resolved by documented rules, inland lakes are split by nearest-boundary allocation, and post-2014 delegations are rebuilt from their imadas using the electoral authority's (ISIE) official lists. Then mapshaper simplifies with topology preserved. Read the methodology.
🧭 One frame, real kilometres
Every SVG uses the same viewBox="0 0 406 838" in WGS 84 / UTM zone 32N with 1 unit = 1 km. Files of different
partitions overlay perfectly, distances can be read straight off the map, and the dependency-free
project() helper (tested to < 1 mm against PROJ) places any longitude/latitude.
See projection & coordinates.
🛠️ Build from source
npm install npm run build # dist/ from data/ in ~30 s npm test # 160+ checks: counts, ids, nesting, areas, populations, XML validity, sizes, projection # refresh from the latest OpenStreetMap data (Python 3.10+) pip install -r scripts/extract/requirements.txt npm run fetch && npm run extract && npm run build
The pipeline: pyosmium + Shapely (extraction and topology) → mapshaper (dissolve, projection, simplification) → a custom SVG writer (labels with polylabel, map colouring, accessible markup). See CONTRIBUTING.md.
🗺️ Roadmap
- 6 nested partitions, 5 levels of detail, 8 modes
- All 279 delegations of the 2024 nomenclature
- GeoJSON / TopoJSON / CSV, projection helper, live explorer
- Municipalities (baladiyat) as a separate, non-nested partition
- Optional water layer: lagoons, sebkhas, chotts and dams
- Cities and capitals as point layers
- Tamazight (Tifinagh) and English-transliteration label modes
- Published npm package and versioned release ZIPs
Ideas and votes are welcome in the issues.
🤝 Contributing
Spotted a wrong border, name or code? Report a data error. It's the most valuable contribution you can make. Code, docs and new modes are welcome too: see CONTRIBUTING.md and the Code of Conduct.
📜 License & attribution
- Code (scripts,
src/, explorer, tests): MIT - Maps and data (
dist/,data/, illustrations): ODbL 1.0, derived from OpenStreetMap
When you use the maps, please credit:
Map data © OpenStreetMap contributors · Map Tunisia by Alaa Taieb
Using Map Tunisia in research? See CITATION.cff (GitHub's Cite this repository button).
👤 Author
![]() Alaa Taieb Creator & maintainer |
Map Tunisia is created and maintained by Alaa Taieb. If this project helps you, please ⭐ star the repository, share it, and credit it when you publish a map. It helps others find it. |
Acknowledgements
- The thousands of OpenStreetMap contributors who mapped Tunisia's boundaries and coastline
- Institut National de la Statistique (INS) for the geocodes and census figures, and the ISIE for its public circonscription maps
- Geofabrik for the daily extracts
- mapshaper, pyosmium, Shapely, pyproj and polylabel, the open-source tools this project stands on
Made with ❤️ for Tunisia 🇹🇳 · صُنع بحبّ لتونس
