turkiye
Python helpers for plotting Türkiye administrative boundaries and resolving province/district identities.
The package bundles Türkiye ADM2 district boundaries, derives province boundaries from them, and subtracts major lake polygons from the default map so large inland waters are not colored as part of an administrative division.
Install
pip install turkiye
District Map
Data can identify districts with il and ilce columns. Turkish characters
and ASCII spellings are both accepted for matching, so ÇANAKKALE and
CANAKKALE point to the same province. Central districts can be matched by
either their district name or MERKEZ, so Şırnak's central district accepts
both SIRNAK and MERKEZ.
from turkiye import load_boundaries, plot
districts = load_boundaries("ilce")[["il", "ilce"]]
districts["example_value"] = range(1, len(districts) + 1)
ax = plot(
districts,
level="ilce",
color="example_value",
label="Example value",
backend="matplotlib",
)
Set backend="matplotlib" for static maps like the one above.
Plotting Backends
Use plot() with backend="plotly" for interactive maps or
backend="matplotlib" for static Matplotlib output. The explicit
plot_interactive() and plot_static() helpers are available when you want to
call a backend directly.
import pandas as pd
from turkiye import plot, plot_interactive, plot_static
province_values = pd.DataFrame(
{"value": [1, 2]},
index=pd.Index(["ANKARA", "ISTANBUL"], name="il"),
)
interactive_fig = plot(province_values, color="value")
same_interactive_fig = plot_interactive(province_values, color="value")
static_ax = plot(province_values, backend="matplotlib", color="value")
same_static_ax = plot_static(province_values, color="value")
For static output:
ax = plot(province_values, backend="matplotlib", color="value")
Boundary Data
from turkiye import load_boundaries
provinces = load_boundaries("il")
districts = load_boundaries("ilce")
The default bundled source supports il and ilce. Province geometries are
derived by dissolving the bundled district layer. belde and mahalle
identities can be resolved where historical metadata exists, but bundled
geometry falls back to the nearest available district geometry.
Boundary frames include il_aliases and ilce_aliases columns for inspection.
Plot joins use those aliases automatically: matching is case-insensitive,
Turkish/ASCII-insensitive, and central districts accept both their province
name and MERKEZ.
Metadata
Release files for turkiye 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| turkiye-0.1.1.tar.gz | 11.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| turkiye-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.3 MB
Release files / turkiye-0.1.1.tar.gz
| Download URL | turkiye-0.1.1.tar.gz |
|---|---|
| Size | 11.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9482d909b29712c10e330bafb266740e1432a2e7aa3cd4471cb9eba99f7c80b9
|
|
BLAKE2b-256 checksum How to use checksums |
d53d4ee15628e5deae58b82208da1652057f2db32264456fc18cdc0594ba0411
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 22, 2026.
Transparency logRelease files / turkiye-0.1.1-py3-none-any.whl
| Download URL | turkiye-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3eea0c45398de73aa600c3ccf9d213fb0a9297223dbe8237e8f920926b963f40
|
|
BLAKE2b-256 checksum How to use checksums |
5cdfd8b88e0918658e441b2be9765f72a16dbac233d99494240a3c117cf341b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 22, 2026.
Transparency log