Metadata-Version: 2.4
Name: cartograpy
Version: 2.0.2
Summary: Packages python pour créer des cartes facilement
Author-email: Anicet Cyrille KAMBOU <kanicetcyrille@gmail.com>
License: MIT License
        
        Copyright (c) 2025 mr-kam
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://mr-kam.github.io/cartograpy/
Project-URL: Repository, https://github.com/mr-kam/cartograpy
Project-URL: Documentation, https://mr-kam.github.io/cartograpy/
Project-URL: Bug Tracker, https://github.com/mr-kam/cartograpy/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Scientific/Engineering :: GIS
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cartopy>=0.23
Requires-Dist: click>=8.0
Requires-Dist: drawarrow>=0.1
Requires-Dist: geopandas>=0.14
Requires-Dist: geojson>=3.0
Requires-Dist: geopy>=2.4
Requires-Dist: gpxpy>=1.6
Requires-Dist: highlight-text>=0.2
Requires-Dist: matplotlib>=3.8
Requires-Dist: numpy>=1.26
Requires-Dist: osmnx>=1.9
Requires-Dist: pandas>=2.1
Requires-Dist: pillow>=10.0
Requires-Dist: pykml>=0.2
Requires-Dist: pypalettes>=0.1
Requires-Dist: pyproj>=3.6
Requires-Dist: rasterio>=1.3
Requires-Dist: reportlab>=4.0
Requires-Dist: rlPyCairo>=0.4
Requires-Dist: requests>=2.31
Requires-Dist: requests-cache>=1.1
Requires-Dist: scipy>=1.11
Requires-Dist: seaborn>=0.13
Requires-Dist: shapely>=2.0
Requires-Dist: svglib>=1.5
Requires-Dist: tabulate>=0.9
Requires-Dist: tqdm>=4.66
Requires-Dist: wbdata>=1.0
Requires-Dist: fiona>=1.10.1
Requires-Dist: matplotlib-map-utils==3.1.2
Requires-Dist: jupyter>=1.1.1
Requires-Dist: geemap>=0.37.2
Requires-Dist: pyfonts>=1.3.0
Requires-Dist: marimo[recommended]>=0.23.0
Requires-Dist: scienceplots>=2.1
Requires-Dist: mplcyberpunk>=0.7
Requires-Dist: geohexgrid>=3.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: jupyterlab>=4.0.0; extra == "dev"
Dynamic: license-file

<img src="https://raw.githubusercontent.com/Mr-KAM/cartograpy/master/assets/img/logo.png" alt="Logo cartograpy" width="220">

# cartograpy

[![PyPI](https://img.shields.io/pypi/v/cartograpy.svg)](https://pypi.org/project/cartograpy/)
[![Python](https://img.shields.io/pypi/pyversions/cartograpy.svg)](https://pypi.org/project/cartograpy/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/Mr-KAM/cartograpy/blob/master/LICENSE)
[![Docs](https://img.shields.io/badge/docs-mr--kam.github.io-blue.svg)](https://mr-kam.github.io/cartograpy/)

**Mapping in Python, the way it was always meant to be.**

Cartograpy est un package Python pour charger, traiter et cartographier des
données géographiques en quelques lignes de code : des frontières
administratives d'un pays jusqu'à la carte statique finale, prête à exporter,
partout dans le monde.

![Exemple de carte produite avec cartograpy](https://raw.githubusercontent.com/Mr-KAM/cartograpy/master/assets/img/create_python_maps.py.png)

## Fonctionnalités

- **Données** : téléchargez en une ligne des frontières administratives
  (`GeoBoundaries`), des données OpenStreetMap, hydrographiques, de géocodage,
  d'altitude (SRTM), des indicateurs World Bank, des séries météo/climat
  (NASA POWER) ou de l'imagerie Google Earth Engine ; résultats renvoyés en
  `GeoDataFrame`/`DataFrame`.
- **Traitement** : importez/exportez tous les formats courants (Shapefile,
  GeoJSON, KML, GPX, GPKG, CSV, Parquet…), reprojetez, découpez, fusionnez,
  calculez centroïdes, jointures et attributs dynamiques (`VectorTools`,
  `RasterTools`).
- **Cartographie** : cartes choroplèthes, points, polygones, raster, bivariées
  ou hexbin avec la classe `Map` : flèche du nord, barre d'échelle, mini-carte
  de situation, légendes, graticule, export PNG/SVG.
- **Style** : polices Google Fonts, 16 palettes intégrées + seaborn/matplotlib,
  styles graphiques (`scienceplots`, `mplcyberpunk`).
- **Projet** : `Project` structure dossiers et sorties, garde une trace du CRS
  et valide l'intégrité des jeux de données.

## Installation

```bash
pip install cartograpy
```

> [!NOTE]
> Python 3.11+. Utilisez un environnement virtuel pour éviter les conflits de
> dépendances (`venv`, `conda`, `uv`…). Sur Windows, si l'installation de
> GDAL/GEOS/PROJ échoue, installez `geopandas rasterio cartopy fiona` via
> `conda-forge` avant `pip install cartograpy`.

## Comment ça marche

![Flux : sources → data → processing → mapper → carte finale](https://mermaid.ink/svg/Zmxvd2NoYXJ0IExSCiAgICBTWyJTb3VyY2VzPGJyLz5maWNoaWVycyBsb2NhdXggwrcgR2VvQm91bmRhcmllcyDCtyBPU008YnIvPkh5ZHJvIMK3IFNSVE0gwrcgV29ybGQgQmFuayDCtyBHRUUiXSAtLT4gRFsiY2FydG9ncmFweS5kYXRhIl0KICAgIEQgLS0-fCJHZW9EYXRhRnJhbWUgLyBEYXRhRnJhbWUifCBQWyJjYXJ0b2dyYXB5LnByb2Nlc3NpbmciXQogICAgUCAtLT4gTVsiY2FydG9ncmFweS5tYXBwZXIiXQogICAgU1RbImNhcnRvZ3JhcHkuc3R5bGluZyJdIC0uLT4gTQogICAgTSAtLT4gT1siQ2FydGUgZmluYWxlPGJyLz5QTkcgwrcgU1ZHIMK3IEhUTUwiXQ==)

<details><summary>Source Mermaid du diagramme</summary>

```mermaid
flowchart LR
    S["Sources<br/>fichiers locaux · GeoBoundaries · OSM<br/>Hydro · SRTM · World Bank · GEE"] --> D["cartograpy.data"]
    D -->|"GeoDataFrame / DataFrame"| P["cartograpy.processing"]
    P --> M["cartograpy.mapper"]
    ST["cartograpy.styling"] -.-> M
    M --> O["Carte finale<br/>PNG · SVG · HTML"]
```

</details>

## Démarrage rapide

```python
from cartograpy.data import Bound
from cartograpy.mapper import Map

bound = Bound()
civ = bound.get_admin("CIV", adm=0)          # frontières nationales, via GeoBoundaries

m = Map(title="Côte d'Ivoire")
m.add_polygons(civ, facecolor="lightyellow", edge_color="black", alpha=1)
m.add_north_arrow()
m.add_scale_bar()
m.show()

m.save("cote-divoire.png", dpi=300)          # export prêt à imprimer
```

## Les modules

![Les modules : data, processing, mapper, styling, project](https://mermaid.ink/svg/Z3JhcGggVEQKICAgIEFbImNhcnRvZ3JhcHkiXSAtLT4gRFsiZGF0YTxici8-PGk-Y2hhcmdlbWVudC9zYXV2ZWdhcmRlLCBzb3VyY2VzIGVuIGxpZ25lPC9pPiJdCiAgICBBIC0tPiBQWyJwcm9jZXNzaW5nPGJyLz48aT50cmFpdGVtZW50IHZlY3RvcmllbCBldCByYXN0ZXI8L2k-Il0KICAgIEEgLS0-IE1bIm1hcHBlcjxici8-PGk-cmVuZHUgY2FydG9ncmFwaGlxdWUgc3RhdGlxdWUgZXQgd2ViPC9pPiJdCiAgICBBIC0tPiBTWyJzdHlsaW5nPGJyLz48aT5wb2xpY2VzLCBwYWxldHRlcywgc3R5bGVzIGdyYXBoaXF1ZXM8L2k-Il0KICAgIEEgLS0-IFBSWyJwcm9qZWN0PGJyLz48aT5vcmdhbmlzYXRpb24gZCd1biBwcm9qZXQgY2FydG9ncmFwaGlxdWU8L2k-Il0=)

<details><summary>Source Mermaid du diagramme</summary>

```mermaid
graph TD
    A["cartograpy"] --> D["data<br/><i>chargement/sauvegarde, sources en ligne</i>"]
    A --> P["processing<br/><i>traitement vectoriel et raster</i>"]
    A --> M["mapper<br/><i>rendu cartographique statique et web</i>"]
    A --> S["styling<br/><i>polices, palettes, styles graphiques</i>"]
    A --> PR["project<br/><i>organisation d'un projet cartographique</i>"]
```

</details>

Tout est importable depuis la racine (`from cartograpy import Map, Bound,
Project`) ou depuis chaque sous-module.

## Aller plus loin

La documentation complète (référence de l'API, guides pas-à-pas, galerie) est
disponible sur **[mr-kam.github.io/cartograpy](https://mr-kam.github.io/cartograpy/)**.

Pour une visite guidée interactive de toutes les fonctionnalités, voir le
notebook [`notebooks/README.ipynb`](https://github.com/Mr-KAM/cartograpy/blob/master/notebooks/README.ipynb).

## Licence

MIT : voir [`LICENSE`](https://github.com/Mr-KAM/cartograpy/blob/master/LICENSE).
