mapyta 0.10.0.dev1__tar.gz → 1.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. mapyta-1.0.1/.coderabbit.yaml +63 -0
  2. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/.github/workflows/docs-preview.yml +2 -0
  3. mapyta-1.0.1/.github/workflows/docs-upstream-check.yml +45 -0
  4. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/.github/workflows/docs.yml +2 -0
  5. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/.gitignore +7 -0
  6. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/.ruff.toml +2 -1
  7. mapyta-1.0.1/CLAUDE.md +86 -0
  8. mapyta-1.0.1/PKG-INFO +158 -0
  9. mapyta-1.0.1/README.md +130 -0
  10. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/.nav.yml +1 -0
  11. mapyta-1.0.1/docs/_fixtures/3e418339079069f9.json.gz +0 -0
  12. mapyta-1.0.1/docs/_fixtures/4bffdd07687c4298.json.gz +0 -0
  13. mapyta-1.0.1/docs/_fixtures/81f1d855441a5e16.json.gz +0 -0
  14. mapyta-1.0.1/docs/_fixtures/9d43a222b10b4e35.json.gz +0 -0
  15. mapyta-1.0.1/docs/_fixtures/index.json +6 -0
  16. mapyta-1.0.1/docs/_hooks/__init__.py +1 -0
  17. mapyta-1.0.1/docs/_hooks/example_output.py +128 -0
  18. mapyta-1.0.1/docs/_hooks/network_cache.py +243 -0
  19. mapyta-1.0.1/docs/_overrides/assets/images/hero-map.png +0 -0
  20. mapyta-1.0.1/docs/_overrides/assets/images/mapyta-logo-dark-mode.png +0 -0
  21. mapyta-1.0.1/docs/_overrides/assets/images/mapyta-logo-light-mode.png +0 -0
  22. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/_overrides/assets/stylesheets/extra.css +13 -0
  23. mapyta-0.10.0.dev1/README.md → mapyta-1.0.1/docs/index.md +30 -25
  24. mapyta-1.0.1/docs/showcase.md +367 -0
  25. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/animated.md +9 -8
  26. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/choropleth.md +57 -0
  27. mapyta-1.0.1/docs/tutorial/layers.md +86 -0
  28. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/open-data.md +9 -9
  29. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/tooltips-popups.md +25 -1
  30. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/mapyta/config.py +9 -2
  31. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/mapyta/map.py +237 -41
  32. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/properdocs.yml +4 -1
  33. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/pyproject.toml +9 -2
  34. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/tests/test_map.py +180 -13
  35. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/tests/test_markers.py +74 -1
  36. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/uv.lock +3 -1
  37. mapyta-0.10.0.dev1/PKG-INFO +0 -171
  38. mapyta-0.10.0.dev1/docs/_scripts/generate_index.py +0 -41
  39. mapyta-0.10.0.dev1/docs/tutorial/layers.md +0 -48
  40. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/.github/workflows/lint.yml +0 -0
  41. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/.github/workflows/publish.yml +0 -0
  42. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/.github/workflows/tests.yml +0 -0
  43. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/.pre-commit-config.yaml +0 -0
  44. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/LICENSE +0 -0
  45. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/_overrides/assets/images/favicon.ico +0 -0
  46. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/_overrides/assets/images/logo-dark-mode.svg +0 -0
  47. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/_overrides/assets/images/mapyta-logo-dark-mode.svg +0 -0
  48. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/_overrides/assets/images/mapyta-logo-light-mode.svg +0 -0
  49. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/_overrides/assets/javascripts/katex.js +0 -0
  50. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/_overrides/main.html +0 -0
  51. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/_scripts/__init__.py +0 -0
  52. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/_scripts/generate_reference_pages.py +0 -0
  53. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/.nav.yml +0 -0
  54. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/advanced.md +0 -0
  55. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/clusters.md +0 -0
  56. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/configuration.md +0 -0
  57. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/coordinates.md +0 -0
  58. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/dataframe.md +0 -0
  59. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/drawing.md +0 -0
  60. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/export.md +0 -0
  61. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/faq.md +0 -0
  62. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/first-map.md +0 -0
  63. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/geodataframe.md +0 -0
  64. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/geometries.md +0 -0
  65. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/heatmaps.md +0 -0
  66. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/index.md +0 -0
  67. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/markers.md +0 -0
  68. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/min-zoom.md +0 -0
  69. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/search.md +0 -0
  70. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/docs/tutorial/text-annotations.md +0 -0
  71. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/mapyta/__init__.py +0 -0
  72. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/mapyta/coordinates.py +0 -0
  73. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/mapyta/dataframe.py +0 -0
  74. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/mapyta/export.py +0 -0
  75. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/mapyta/geojson.py +0 -0
  76. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/mapyta/markdown.py +0 -0
  77. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/mapyta/markers.py +0 -0
  78. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/mapyta/mouse_position.py +0 -0
  79. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/mapyta/style.py +0 -0
  80. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/mapyta/tiles.py +0 -0
  81. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/tests/__init__.py +0 -0
  82. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/tests/conftest.py +0 -0
  83. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/tests/test_data.py +0 -0
  84. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/tests/test_dataframe.py +0 -0
  85. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/tests/test_draw.py +0 -0
  86. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/tests/test_export.py +0 -0
  87. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/tests/test_geometry.py +0 -0
  88. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/tests/test_layers.py +0 -0
  89. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/tests/test_map_creation.py +0 -0
  90. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/tests/test_merge_and_chaining.py +0 -0
  91. {mapyta-0.10.0.dev1 → mapyta-1.0.1}/tests/test_utilities.py +0 -0
@@ -0,0 +1,63 @@
1
+ # CodeRabbit configuration — https://docs.coderabbit.ai/reference/yaml-template
2
+ language: en-US
3
+
4
+ reviews:
5
+ profile: chill
6
+ request_changes_workflow: false
7
+ high_level_summary: true
8
+ poem: false
9
+ review_status: true
10
+ collapse_walkthrough: false
11
+ sequence_diagrams: true
12
+ changed_files_summary: true
13
+
14
+ path_filters:
15
+ - "!**/*.lock"
16
+ - "!**/*.html" # generated Folium/Leaflet map outputs
17
+ - "!site/**" # mkdocs production build
18
+ - "!plan/**" # scratch / planning notes
19
+ - "!**/__pycache__/**"
20
+ - "!venv/**"
21
+ - "!.venv/**"
22
+
23
+ path_instructions:
24
+ - path: "mapyta/**"
25
+ instructions: |
26
+ Public API is the single `Map` class in map.py; the config dataclasses in config.py
27
+ (MapConfig, StrokeStyle, FillStyle, CircleStyle, HeatmapStyle, PopupStyle, TooltipStyle);
28
+ and the names re-exported from __init__.py. Everything else is internal.
29
+
30
+ DOCUMENTATION GATE — apply on every PR that adds or changes public API:
31
+ - If a public method, parameter, default, return type, or config field is added,
32
+ renamed, removed, or changes behaviour, the PR MUST also update documentation.
33
+ If it does not touch docs/, flag it and say exactly which doc is missing/stale.
34
+ - New user-facing feature (e.g. a new `add_*` method or style option) → expect a new
35
+ or updated page under docs/tutorial/, not only a docstring change.
36
+ - The API reference is generated from docstrings, so every public symbol needs an
37
+ accurate NumPy-convention docstring (Parameters / Returns / Raises). Flag added or
38
+ changed public symbols whose docstring is missing or no longer matches the signature.
39
+ - path: "tests/**"
40
+ instructions: |
41
+ pytest. Test public behaviour (the `Map` API).
42
+ Check assertions are meaningful and fixtures/temp files are cleaned up.
43
+ - path: "docs/tutorial/**"
44
+ instructions: |
45
+ Tutorial pages. When docs ARE included in a PR, hold them to the existing house style
46
+ so they read consistently with the rest of docs/tutorial/:
47
+ - Structure: an H1 title, a one- to two-sentence intro, a runnable example fenced as
48
+ ```python exec="true" html="true" source="tabbed-right"``` ending in
49
+ `print(m.to_html()) # markdown-exec: hide`, then a `## How it works` section.
50
+ - Examples must use the current public API and run as written; flag any drift from
51
+ the real signatures, removed parameters, or renamed methods.
52
+ - Match the surrounding tone, heading depth, and Markdown conventions of sibling pages.
53
+ - path: "docs/**"
54
+ instructions: |
55
+ Documentation prose. Flag code samples and prose that drift from the current public API.
56
+
57
+ chat:
58
+ auto_reply: true
59
+
60
+ knowledge_base:
61
+ opt_out: false
62
+ learnings:
63
+ scope: auto
@@ -29,6 +29,8 @@ jobs:
29
29
 
30
30
  - if: github.event.action != 'closed'
31
31
  name: Build docs
32
+ env:
33
+ MAPYTA_DOCS_OFFLINE: "1"
32
34
  run: uv run properdocs build --clean --strict
33
35
 
34
36
  - name: Deploy preview
@@ -0,0 +1,45 @@
1
+ name: Docs upstream check
2
+
3
+ # The tutorial examples call PDOK and CBS. Regular builds replay recorded fixtures so
4
+ # an upstream hiccup can never fail an unrelated pull request. This job is the other
5
+ # half of that deal: once a week it re-records against the live services, so a renamed
6
+ # column or a retired dataset surfaces here instead of silently rotting in the docs.
7
+
8
+ on:
9
+ schedule:
10
+ - cron: "0 6 * * 1"
11
+ workflow_dispatch:
12
+
13
+ permissions:
14
+ contents: read
15
+
16
+ jobs:
17
+ upstream:
18
+ runs-on: ubuntu-latest
19
+ steps:
20
+ - uses: actions/checkout@v5
21
+
22
+ - uses: astral-sh/setup-uv@v5
23
+ with:
24
+ python-version: "3.13"
25
+
26
+ - name: Install docs dependencies
27
+ run: uv sync --group docs
28
+
29
+ - name: Rebuild docs against live upstream services
30
+ env:
31
+ MAPYTA_DOCS_REFRESH: "1"
32
+ run: uv run properdocs build --clean --strict
33
+
34
+ - name: Report fixture drift
35
+ run: |
36
+ if git diff --quiet -- docs/_fixtures; then
37
+ echo "Upstream responses unchanged."
38
+ exit 0
39
+ fi
40
+ echo "::warning::Upstream responses changed — recorded fixtures are out of date."
41
+ git diff --stat -- docs/_fixtures
42
+ echo
43
+ echo "Refresh them locally with:"
44
+ echo " MAPYTA_DOCS_REFRESH=1 uv run --group docs properdocs build --clean --strict"
45
+ exit 1
@@ -21,6 +21,8 @@ jobs:
21
21
  run: uv sync --group docs
22
22
 
23
23
  - name: Build docs
24
+ env:
25
+ MAPYTA_DOCS_OFFLINE: "1"
24
26
  run: uv run properdocs build --clean --strict
25
27
 
26
28
  - name: Deploy to GitHub Pages
@@ -18,3 +18,10 @@ htmlcov/
18
18
 
19
19
  # Local Claude Code settings
20
20
  .claude/
21
+
22
+ # Maps exported by local experiments (docs builds write to a temp dir instead)
23
+ /*.html
24
+ /*.geojson
25
+
26
+ # markdown-exec build cache
27
+ .cache/
@@ -75,8 +75,9 @@ ignore = [
75
75
  "RUF002", # ambiguous-unicode-character-docstring
76
76
  "RUF003", # ambiguous-unicode-character-comment
77
77
  ]
78
- [lint.per-file-ignores]
78
+ [lint.per-file-ignores]
79
79
  "docs/*" = ["T201"]
80
+ "scripts/*" = ["T201", "INP001"]
80
81
 
81
82
  [format]
82
83
  quote-style = "double"
mapyta-1.0.1/CLAUDE.md ADDED
@@ -0,0 +1,86 @@
1
+ # CLAUDE.md
2
+
3
+ This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4
+
5
+ ## Commands
6
+
7
+ ```bash
8
+ # Run all tests
9
+ uv run pytest
10
+
11
+ # Run a single test file
12
+ uv run pytest tests/test_map_creation.py
13
+
14
+ # Run a single test by name
15
+ uv run pytest tests/test_map_creation.py -k "test_name"
16
+
17
+ # Lint
18
+ uv run ruff check .
19
+
20
+ # Format
21
+ uv run ruff format .
22
+
23
+ # Type check
24
+ uv run ty check
25
+
26
+ # Docs preview (live reload)
27
+ uv run --group docs properdocs serve
28
+
29
+ # Docs production build
30
+ uv run --group docs properdocs build --clean
31
+
32
+ # Re-record the PDOK/CBS responses used by the tutorial examples
33
+ MAPYTA_DOCS_REFRESH=1 uv run --group docs properdocs build --clean --strict
34
+
35
+ # Build the way CI does: fail instead of falling back to the network
36
+ MAPYTA_DOCS_OFFLINE=1 uv run --group docs properdocs build --clean --strict
37
+ ```
38
+
39
+ ## Architecture
40
+
41
+ `mapyta` is a high-level interactive map builder wrapping [Folium](https://python-visualization.github.io/folium/) (
42
+ which wraps Leaflet.js). The public API is a single `Map` class; everything else is internal.
43
+
44
+ ### Module responsibilities
45
+
46
+ | Module | Role |
47
+ |------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
48
+ | `map.py` | `Map` class — the entire public API for building and exporting maps |
49
+ | `config.py` | Dataclasses for configuration: `MapConfig`, `StrokeStyle`, `FillStyle`, `CircleStyle`, `HeatmapStyle`, `PopupStyle`, `TooltipStyle` |
50
+ | `coordinates.py` | CRS detection and transformation to WGS84 via `pyproj`; auto-detects Dutch RD New (EPSG:28992) from coordinate ranges |
51
+ | `markers.py` | Builds Folium `DivIcon` markers from emoji, text, or plain strings |
52
+ | `tiles.py` | `TILE_PROVIDERS` dict mapping shorthand keys (e.g. `"cartodb_positron"`, `"kadaster_brt"`) to tile URLs and attributions |
53
+ | `geojson.py` | Loads GeoJSON from dicts, file paths, or strings |
54
+ | `markdown.py` | Converts Markdown to HTML for tooltips/popups; `RawHTML` wrapper bypasses conversion |
55
+ | `style.py` | `resolve_style()` helper that coerces `dict | dataclass | None` to a typed dataclass |
56
+ | `export.py` | PNG/SVG export via headless Chrome (Selenium); guarded by `check_selenium()` which raises `ImportError` if the `export` optional dependency group is not installed |
57
+
58
+ ### Documentation network fixtures
59
+
60
+ The tutorial pages under `docs/tutorial/open-data.md` execute live PDOK and CBS calls. `docs/_hooks/network_cache.py` records
61
+ each response once into `docs/_fixtures/` and replays it on every later build, so CI never depends on an upstream service being
62
+ reachable or stable. A missing fixture fails the build rather than silently dropping a map from the page.
63
+
64
+ The weekly `docs-upstream-check` workflow re-records against the live services and fails when a response changed — that is the
65
+ signal to refresh the fixtures and update the affected example.
66
+
67
+ `docs/_hooks/example_output.py` redirects the `to_html()` / `to_geojson()` / `to_image()` calls in the examples to a temporary
68
+ directory. The examples keep showing realistic paths like `m.to_html("provincies.html")` without littering the working tree.
69
+ Absolute paths are left alone.
70
+
71
+ ### Key design patterns
72
+
73
+ - **Fluent chaining**: all `add_*` and configuration methods return `Self`.
74
+ - **Feature groups**: `create_feature_group(name)` targets subsequent `add_*` calls to a named Folium `FeatureGroup`;
75
+ `reset_target()` returns to the base map.
76
+ - **CRS transparency**: geometries in any CRS are passed directly; `coordinates.py` handles transformation. Explicit
77
+ override via `source_crs` on `Map.__init__` or per call.
78
+ - **Optional Selenium**: image export is behind the `export` optional dependency (`pip install mapyta[export]`). The
79
+ guard in `export.py` provides a clear install message on `ImportError`.
80
+
81
+ ### Style conventions
82
+
83
+ - Docstrings follow NumPy convention (enforced by ruff `pydocstyle`).
84
+ - Line length: 150 characters.
85
+ - Quote style: double quotes.
86
+ - `T20` (no `print`) is enforced everywhere except `docs/`.
mapyta-1.0.1/PKG-INFO ADDED
@@ -0,0 +1,158 @@
1
+ Metadata-Version: 2.5
2
+ Name: mapyta
3
+ Version: 1.0.1
4
+ Summary: Mapyta, open source python package for GIS mapping and visualization.
5
+ Project-URL: Homepage, https://egarciamendez.github.io/mapyta
6
+ Project-URL: Documentation, https://egarciamendez.github.io/mapyta
7
+ Project-URL: Repository, https://github.com/egarciamendez/mapyta
8
+ Project-URL: Issues, https://github.com/egarciamendez/mapyta/issues
9
+ Author-email: Enrique García Méndez <enriquegarcia@live.nl>
10
+ License: MIT
11
+ License-File: LICENSE
12
+ Keywords: GIS,mapping,visualization
13
+ Classifier: Intended Audience :: Science/Research
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Classifier: Topic :: Scientific/Engineering :: GIS
19
+ Classifier: Topic :: Scientific/Engineering :: Visualization
20
+ Requires-Python: >=3.12
21
+ Requires-Dist: folium>=0.20.0
22
+ Requires-Dist: geopandas>=1.1.3
23
+ Requires-Dist: pyproj>=3.7.2
24
+ Requires-Dist: shapely>=2.1.2
25
+ Provides-Extra: export
26
+ Requires-Dist: selenium>=4.44.0; extra == 'export'
27
+ Description-Content-Type: text/markdown
28
+
29
+ <p align="center">
30
+ <a href="https://egarciamendez.github.io/mapyta">
31
+ <picture>
32
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/egarciamendez/mapyta/main/docs/_overrides/assets/images/mapyta-logo-dark-mode.png">
33
+ <img src="https://raw.githubusercontent.com/egarciamendez/mapyta/main/docs/_overrides/assets/images/mapyta-logo-light-mode.png" alt="Mapyta" width="320">
34
+ </picture>
35
+ </a>
36
+ </p>
37
+
38
+ <p align="center">
39
+ <em>One import. A few method calls. A full interactive map.</em>
40
+ </p>
41
+
42
+ <p align="center">
43
+ <a href="https://pypi.org/project/mapyta/"><img src="https://img.shields.io/pypi/v/mapyta.svg" alt="PyPI version"></a>
44
+ <a href="https://pypi.org/project/mapyta/"><img src="https://img.shields.io/pypi/pyversions/mapyta.svg" alt="Supported Python versions"></a>
45
+ <a href="https://github.com/egarciamendez/mapyta/actions/workflows/tests.yml"><img src="https://github.com/egarciamendez/mapyta/actions/workflows/tests.yml/badge.svg" alt="Tests"></a>
46
+ <a href="https://egarciamendez.github.io/mapyta"><img src="https://img.shields.io/badge/docs-mkdocs--material-blue.svg" alt="Documentation"></a>
47
+ <a href="https://github.com/egarciamendez/mapyta/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/mapyta.svg" alt="License: MIT"></a>
48
+ </p>
49
+
50
+ ---
51
+
52
+ **Documentation**: [https://egarciamendez.github.io/mapyta](https://egarciamendez.github.io/mapyta)
53
+
54
+ **Source Code**: [https://github.com/egarciamendez/mapyta](https://github.com/egarciamendez/mapyta)
55
+
56
+ ---
57
+
58
+ Build OpenStreetMap visualizations with hover tooltips, choropleths, heatmaps, and export to HTML or PNG all from Shapely geometries.
59
+
60
+ Perfect for geotechnical site plans, infrastructure overviews, or any spatial data visualization where you want more control than static images but don't need the full power of a GIS.
61
+
62
+ *Mapyta is standing on the shoulders of giants like Folium and Leaflet, but it's designed to be more intuitive and
63
+ Pythonic for users who are already familiar with Shapely and GeoPandas. It's not trying to replace a full GIS,
64
+ but rather to provide a simple way to create interactive maps without needing to learn a whole new set of tools.*
65
+
66
+ <p align="center">
67
+ <a href="https://egarciamendez.github.io/mapyta/showcase/">
68
+ <img src="https://egarciamendez.github.io/mapyta/assets/images/hero-map.png" alt="A mapyta map of Amsterdam with markers, areas, and a walking route" width="820">
69
+ </a>
70
+ </p>
71
+
72
+ 👉 **[See the Showcase](https://egarciamendez.github.io/mapyta/showcase/)** — every feature as a live, interactive map on a single page.
73
+
74
+ ---
75
+
76
+ ## Key features
77
+
78
+ - 🗺️ **[Shapely-native](https://egarciamendez.github.io/mapyta/tutorial/geometries/)** — pass `Point`, `Polygon`, `LineString` directly, including multi-geometries
79
+ - 📝 **[Markdown/HTML hover and popup text](https://egarciamendez.github.io/mapyta/tutorial/tooltips-popups/)** — bold, italic, links, lists, and code in tooltips
80
+ - 📌 **[Emoji & icon markers](https://egarciamendez.github.io/mapyta/tutorial/markers/)** — any text or Font Awesome icons as markers
81
+ - 🎨 **[Choropleth & heatmaps](https://egarciamendez.github.io/mapyta/tutorial/choropleth/)** — color-coded maps from numeric data
82
+ - 📊 **[GeoPandas integration](https://egarciamendez.github.io/mapyta/tutorial/geodataframe/)** — `Map.from_geodataframe()` one-liner
83
+ - 🗂️ **[DataFrame support](https://egarciamendez.github.io/mapyta/tutorial/dataframe/)** — `add_dataframe()` works with any Pandas or Polars DataFrame with a WKT geometry column
84
+ - 🌐 **[Auto CRS detection](https://egarciamendez.github.io/mapyta/tutorial/coordinates/)** — RD New (EPSG:28992) coordinates transform automatically
85
+ - 📤 **[Export anywhere](https://egarciamendez.github.io/mapyta/tutorial/export/)** — HTML, PNG, SVG, GeoJSON, async variants, and `BytesIO` buffers
86
+ - 🧩 **[Feature groups](https://egarciamendez.github.io/mapyta/tutorial/layers/)** — toggleable layers with a built-in layer control
87
+ - 🔌 **[Set of tile providers](https://egarciamendez.github.io/mapyta/tutorial/configuration/)** — OpenStreetMap, CartoDB, Esri, Stamen, and Kadaster
88
+
89
+ ---
90
+
91
+ ## Installation
92
+
93
+ Mapyta requires **Python 3.12+**.
94
+
95
+ ```bash
96
+ uv add mapyta
97
+ # or
98
+ pip install mapyta
99
+ ```
100
+
101
+ Exporting maps to **PNG/SVG images** additionally needs a headless browser (Chrome,
102
+ Chromium, or Edge) and the `export` extra:
103
+
104
+ ```bash
105
+ uv add "mapyta[export]"
106
+ # or
107
+ pip install "mapyta[export]"
108
+ ```
109
+
110
+ ## Quickstart
111
+
112
+ Create your first map:
113
+
114
+ ```python
115
+ from shapely.geometry import Point
116
+ from mapyta import Map
117
+
118
+ m = Map(title="Hello Utrecht")
119
+ m.add_point(
120
+ point=Point(5.121311, 52.090648),
121
+ tooltip="**Utrecht**",
122
+ popup="**Utrecht**\nCity in the Netherlands\nPopulation: ~350k",
123
+ caption="UTR",
124
+ )
125
+ m.to_html("hello.html")
126
+ ```
127
+
128
+ Open `hello.html` in any browser and you're done.
129
+
130
+ Want the map as an image instead? Get raw PNG bytes or a buffer, no file needed:
131
+
132
+ ```python
133
+ png_bytes = m.to_image() # bytes, for an HTTP response or an email attachment
134
+ buf = m.to_bytesio() # io.BytesIO, e.g. for Flask/FastAPI/Django
135
+ ```
136
+
137
+ See the **[Showcase](https://egarciamendez.github.io/mapyta/showcase/)** for choropleths,
138
+ heatmaps, clusters, drawing tools, and more — each as a live, interactive map — or work
139
+ through the **[Tutorial](https://egarciamendez.github.io/mapyta/tutorial/)** one concept
140
+ at a time.
141
+
142
+ ## Contributing
143
+
144
+ Issues and pull requests are welcome. To set up a local development environment:
145
+
146
+ ```bash
147
+ git clone https://github.com/egarciamendez/mapyta
148
+ cd mapyta
149
+ uv sync --all-extras --all-groups
150
+ uv run pytest
151
+ ```
152
+
153
+ Please open an [issue](https://github.com/egarciamendez/mapyta/issues) to discuss
154
+ substantial changes before starting.
155
+
156
+ ## License
157
+
158
+ This project is licensed under the terms of the MIT license.
mapyta-1.0.1/README.md ADDED
@@ -0,0 +1,130 @@
1
+ <p align="center">
2
+ <a href="https://egarciamendez.github.io/mapyta">
3
+ <picture>
4
+ <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/egarciamendez/mapyta/main/docs/_overrides/assets/images/mapyta-logo-dark-mode.png">
5
+ <img src="https://raw.githubusercontent.com/egarciamendez/mapyta/main/docs/_overrides/assets/images/mapyta-logo-light-mode.png" alt="Mapyta" width="320">
6
+ </picture>
7
+ </a>
8
+ </p>
9
+
10
+ <p align="center">
11
+ <em>One import. A few method calls. A full interactive map.</em>
12
+ </p>
13
+
14
+ <p align="center">
15
+ <a href="https://pypi.org/project/mapyta/"><img src="https://img.shields.io/pypi/v/mapyta.svg" alt="PyPI version"></a>
16
+ <a href="https://pypi.org/project/mapyta/"><img src="https://img.shields.io/pypi/pyversions/mapyta.svg" alt="Supported Python versions"></a>
17
+ <a href="https://github.com/egarciamendez/mapyta/actions/workflows/tests.yml"><img src="https://github.com/egarciamendez/mapyta/actions/workflows/tests.yml/badge.svg" alt="Tests"></a>
18
+ <a href="https://egarciamendez.github.io/mapyta"><img src="https://img.shields.io/badge/docs-mkdocs--material-blue.svg" alt="Documentation"></a>
19
+ <a href="https://github.com/egarciamendez/mapyta/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/mapyta.svg" alt="License: MIT"></a>
20
+ </p>
21
+
22
+ ---
23
+
24
+ **Documentation**: [https://egarciamendez.github.io/mapyta](https://egarciamendez.github.io/mapyta)
25
+
26
+ **Source Code**: [https://github.com/egarciamendez/mapyta](https://github.com/egarciamendez/mapyta)
27
+
28
+ ---
29
+
30
+ Build OpenStreetMap visualizations with hover tooltips, choropleths, heatmaps, and export to HTML or PNG all from Shapely geometries.
31
+
32
+ Perfect for geotechnical site plans, infrastructure overviews, or any spatial data visualization where you want more control than static images but don't need the full power of a GIS.
33
+
34
+ *Mapyta is standing on the shoulders of giants like Folium and Leaflet, but it's designed to be more intuitive and
35
+ Pythonic for users who are already familiar with Shapely and GeoPandas. It's not trying to replace a full GIS,
36
+ but rather to provide a simple way to create interactive maps without needing to learn a whole new set of tools.*
37
+
38
+ <p align="center">
39
+ <a href="https://egarciamendez.github.io/mapyta/showcase/">
40
+ <img src="https://egarciamendez.github.io/mapyta/assets/images/hero-map.png" alt="A mapyta map of Amsterdam with markers, areas, and a walking route" width="820">
41
+ </a>
42
+ </p>
43
+
44
+ 👉 **[See the Showcase](https://egarciamendez.github.io/mapyta/showcase/)** — every feature as a live, interactive map on a single page.
45
+
46
+ ---
47
+
48
+ ## Key features
49
+
50
+ - 🗺️ **[Shapely-native](https://egarciamendez.github.io/mapyta/tutorial/geometries/)** — pass `Point`, `Polygon`, `LineString` directly, including multi-geometries
51
+ - 📝 **[Markdown/HTML hover and popup text](https://egarciamendez.github.io/mapyta/tutorial/tooltips-popups/)** — bold, italic, links, lists, and code in tooltips
52
+ - 📌 **[Emoji & icon markers](https://egarciamendez.github.io/mapyta/tutorial/markers/)** — any text or Font Awesome icons as markers
53
+ - 🎨 **[Choropleth & heatmaps](https://egarciamendez.github.io/mapyta/tutorial/choropleth/)** — color-coded maps from numeric data
54
+ - 📊 **[GeoPandas integration](https://egarciamendez.github.io/mapyta/tutorial/geodataframe/)** — `Map.from_geodataframe()` one-liner
55
+ - 🗂️ **[DataFrame support](https://egarciamendez.github.io/mapyta/tutorial/dataframe/)** — `add_dataframe()` works with any Pandas or Polars DataFrame with a WKT geometry column
56
+ - 🌐 **[Auto CRS detection](https://egarciamendez.github.io/mapyta/tutorial/coordinates/)** — RD New (EPSG:28992) coordinates transform automatically
57
+ - 📤 **[Export anywhere](https://egarciamendez.github.io/mapyta/tutorial/export/)** — HTML, PNG, SVG, GeoJSON, async variants, and `BytesIO` buffers
58
+ - 🧩 **[Feature groups](https://egarciamendez.github.io/mapyta/tutorial/layers/)** — toggleable layers with a built-in layer control
59
+ - 🔌 **[Set of tile providers](https://egarciamendez.github.io/mapyta/tutorial/configuration/)** — OpenStreetMap, CartoDB, Esri, Stamen, and Kadaster
60
+
61
+ ---
62
+
63
+ ## Installation
64
+
65
+ Mapyta requires **Python 3.12+**.
66
+
67
+ ```bash
68
+ uv add mapyta
69
+ # or
70
+ pip install mapyta
71
+ ```
72
+
73
+ Exporting maps to **PNG/SVG images** additionally needs a headless browser (Chrome,
74
+ Chromium, or Edge) and the `export` extra:
75
+
76
+ ```bash
77
+ uv add "mapyta[export]"
78
+ # or
79
+ pip install "mapyta[export]"
80
+ ```
81
+
82
+ ## Quickstart
83
+
84
+ Create your first map:
85
+
86
+ ```python
87
+ from shapely.geometry import Point
88
+ from mapyta import Map
89
+
90
+ m = Map(title="Hello Utrecht")
91
+ m.add_point(
92
+ point=Point(5.121311, 52.090648),
93
+ tooltip="**Utrecht**",
94
+ popup="**Utrecht**\nCity in the Netherlands\nPopulation: ~350k",
95
+ caption="UTR",
96
+ )
97
+ m.to_html("hello.html")
98
+ ```
99
+
100
+ Open `hello.html` in any browser and you're done.
101
+
102
+ Want the map as an image instead? Get raw PNG bytes or a buffer, no file needed:
103
+
104
+ ```python
105
+ png_bytes = m.to_image() # bytes, for an HTTP response or an email attachment
106
+ buf = m.to_bytesio() # io.BytesIO, e.g. for Flask/FastAPI/Django
107
+ ```
108
+
109
+ See the **[Showcase](https://egarciamendez.github.io/mapyta/showcase/)** for choropleths,
110
+ heatmaps, clusters, drawing tools, and more — each as a live, interactive map — or work
111
+ through the **[Tutorial](https://egarciamendez.github.io/mapyta/tutorial/)** one concept
112
+ at a time.
113
+
114
+ ## Contributing
115
+
116
+ Issues and pull requests are welcome. To set up a local development environment:
117
+
118
+ ```bash
119
+ git clone https://github.com/egarciamendez/mapyta
120
+ cd mapyta
121
+ uv sync --all-extras --all-groups
122
+ uv run pytest
123
+ ```
124
+
125
+ Please open an [issue](https://github.com/egarciamendez/mapyta/issues) to discuss
126
+ substantial changes before starting.
127
+
128
+ ## License
129
+
130
+ This project is licensed under the terms of the MIT license.
@@ -1,4 +1,5 @@
1
1
  nav:
2
2
  - Mapyta: index.md
3
+ - Showcase: showcase.md
3
4
  - Tutorial: tutorial/
4
5
  - API reference
@@ -0,0 +1,6 @@
1
+ {
2
+ "3e418339079069f9": "GET https://service.pdok.nl/lv/bag/wfs/v2_0?service=WFS&version=2.0.0&request=GetFeature&typeName=bag%3Apand&outputFormat=application%2Fjson&bbox=119500%2C487000%2C121500%2C488500%2CEPSG%3A28992&srsName=EPSG%3A4326&count=500",
3
+ "4bffdd07687c4298": "GET https://service.pdok.nl/cbs/gebiedsindelingen/2024/wfs/v1_0?service=WFS&version=2.0.0&request=GetFeature&typeNames=gebiedsindelingen%3Agemeente_gegeneraliseerd&outputFormat=application%2Fjson",
4
+ "81f1d855441a5e16": "GET https://service.pdok.nl/cbs/gebiedsindelingen/2024/wfs/v1_0?service=WFS&version=2.0.0&request=GetFeature&typeNames=gebiedsindelingen%3Aprovincie_gegeneraliseerd&outputFormat=application%2Fjson",
5
+ "9d43a222b10b4e35": "GET https://opendata.cbs.nl/ODataApi/odata/70072ned/TypedDataSet?%24filter=startswith%28RegioS%2C%27GM%27%29+and+Perioden+eq+%272024JJ00%27&%24select=RegioS%2CBevolkingsdichtheid_27%2CTotaleBevolking_1"
6
+ }
@@ -0,0 +1 @@
1
+ """Build hooks for the documentation site."""