geovizpy 0.1.4__py3-none-any.whl → 0.1.6__py3-none-any.whl

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.
@@ -0,0 +1,118 @@
1
+ Metadata-Version: 2.4
2
+ Name: geovizpy
3
+ Version: 0.1.6
4
+ Summary: A Python wrapper for the geoviz JavaScript library
5
+ Author: fbxyz
6
+ Project-URL: Source, https://codeberg.org/fbxyz/geovizpy
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.6
11
+ Description-Content-Type: text/markdown
12
+ Provides-Extra: export
13
+ Requires-Dist: playwright; extra == "export"
14
+ Dynamic: author
15
+ Dynamic: classifier
16
+ Dynamic: description
17
+ Dynamic: description-content-type
18
+ Dynamic: project-url
19
+ Dynamic: provides-extra
20
+ Dynamic: requires-python
21
+ Dynamic: summary
22
+
23
+ # geovizpy
24
+
25
+ **geovizpy** is a Python wrapper for the `geoviz` JavaScript library, designed to bring the power of D3.js-based thematic mapping to Python. It allows you to create high-quality, interactive maps directly from Python scripts or Jupyter notebooks.
26
+
27
+ This library is a wrapper around the `geoviz` library. For detailed information on the underlying mapping logic, please refer to the [original geoviz documentation](https://github.com/neocarto/geoviz).
28
+
29
+ ![Choropleth Map Example](https://codeberg.org/fbxyz/geovizpy/raw/branch/main/docs/source/_static/choropleth.png)
30
+
31
+ ## Features
32
+
33
+ - **Simple, chainable API**: Build complex maps by chaining intuitive methods.
34
+ - **Variety of Map Types**: Create choropleth, proportional symbol, typology, and other thematic maps.
35
+ - **Interactive Controls**: Add hover-to-expand controls for toggling layer visibility and exporting the map as SVG or PNG.
36
+ - **Customizable**: Extensive options to customize colors, legends, strokes, and more.
37
+ - **Standalone HTML**: Renders self-contained HTML files with no server required.
38
+ - **Image Export**: Save maps directly to PNG or SVG from Python (requires optional dependencies).
39
+
40
+ ## Installation
41
+
42
+ ### Standard Installation
43
+
44
+ You can install the core library using pip:
45
+
46
+ ```bash
47
+ pip install geovizpy
48
+ ```
49
+
50
+ Or install directly from the source repository:
51
+
52
+ ```bash
53
+ pip install git+https://codeberg.org/fbxyz/geovizpy.git
54
+ ```
55
+
56
+ ### For Image Export
57
+
58
+ To save maps as PNG or SVG files directly from Python, you need to install the optional `export` dependencies:
59
+
60
+ 1. **Install the extra dependencies:**
61
+
62
+ ```bash
63
+ pip install "geovizpy[export]"
64
+ ```
65
+
66
+ 2. **Install Playwright's browser binaries:**
67
+
68
+ ```bash
69
+ playwright install
70
+ ```
71
+
72
+ On Linux, you may also need to install host dependencies:
73
+
74
+ ```bash
75
+ sudo playwright install-deps
76
+ ```
77
+
78
+ ## Quick Start
79
+
80
+ Here is a simple example of how to create a choropleth map:
81
+
82
+ ```python
83
+ from geovizpy import Geoviz
84
+ import json
85
+
86
+ # Load your GeoJSON data
87
+ # (Assuming 'world.json' is in a 'data' subdirectory)
88
+ with open("data/world.json") as f:
89
+ world_data = json.load(f)
90
+
91
+ # Initialize the map
92
+ viz = Geoviz(projection="EqualEarth", width=800)
93
+
94
+ # Add layers
95
+ viz.outline()
96
+ viz.graticule()
97
+
98
+ # Add a choropleth layer
99
+ viz.choro(
100
+ data=world_data,
101
+ var="gdppc",
102
+ colors="Blues",
103
+ legend=True,
104
+ leg_title="GDP per Capita"
105
+ )
106
+
107
+ # Add interactive controls
108
+ viz.add_layer_control(layers=["choropleth_gdp"])
109
+ viz.add_export_control()
110
+
111
+ # Save the map
112
+ viz.save("my_map.html") # Renders an interactive HTML file
113
+ # viz.save("my_map.png") # Renders a static PNG image (requires export dependencies)
114
+ ```
115
+
116
+ ## Documentation
117
+
118
+ For more detailed information on all available methods and parameters, please see the [full documentation](https://geovizpy.readthedocs.io/en/latest/).
@@ -0,0 +1,12 @@
1
+ geovizpy/__init__.py,sha256=gvgVlK5oB6meBmYgXkXFVohPKkO3ev9UupPA8BQNzYg,120
2
+ geovizpy/controls.py,sha256=pvSrbrkgyB8VURVXED3Etou3Wk2wfWB5p4nnvHLFrgM,1319
3
+ geovizpy/effects.py,sha256=6F78g0IJEbEG8EsKurmBapE8UX0sho7zKHDnzqJ0ci0,1433
4
+ geovizpy/geoviz.py,sha256=bG1A5AQIhsfIJ9RQ4RJteG9HRuu70k2xI9l_eydQTH0,1415
5
+ geovizpy/legends.py,sha256=IPn_1drQ9MkmJlQ54XwBqAlTRSyq98sm8gzgE-ATRog,2218
6
+ geovizpy/marks.py,sha256=xqwf8ELY05lnrrXGQljMe-mm315vUt_-qOmdFAsYhwA,5520
7
+ geovizpy/plots.py,sha256=EVjPPBFyUFQpXH7sAuxCz_sctonJVUxoi8edbehKrpI,3089
8
+ geovizpy/renderer.py,sha256=ql9eaRGo-274MEA6ZXcLY4QpidJdmHlt65IuHiwAbko,16543
9
+ geovizpy-0.1.6.dist-info/METADATA,sha256=l9WRhOd_vESt9qOK071kioRARK4OTvpCymOEtXRbHhE,3463
10
+ geovizpy-0.1.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
+ geovizpy-0.1.6.dist-info/top_level.txt,sha256=3D5AFdMd9bWEvGQUWDy6jccJamUwdKmchgCmxLHaAYs,9
12
+ geovizpy-0.1.6.dist-info/RECORD,,
@@ -1,46 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: geovizpy
3
- Version: 0.1.4
4
- Summary: A Python wrapper for the geoviz JavaScript library
5
- Author: fbxyz
6
- Project-URL: Source, https://codeberg.org/fbxyz/geovizpy
7
- Classifier: Programming Language :: Python :: 3
8
- Classifier: License :: OSI Approved :: MIT License
9
- Classifier: Operating System :: OS Independent
10
- Requires-Python: >=3.6
11
- Description-Content-Type: text/markdown
12
- Dynamic: author
13
- Dynamic: classifier
14
- Dynamic: description
15
- Dynamic: description-content-type
16
- Dynamic: project-url
17
- Dynamic: requires-python
18
- Dynamic: summary
19
-
20
- # geovizpy
21
-
22
- A Python wrapper for the [geoviz](https://github.com/neocarto/geoviz) JavaScript library.
23
- It allows you to create thematic maps using a simple Python API and render them to HTML.
24
-
25
- ## Installation
26
-
27
- ```bash
28
- pip install git+https://github.com/fbxyz/geovizpy.git
29
- ```
30
-
31
- ## Usage
32
-
33
- ```python
34
- from geovizpy import Geoviz
35
- import json
36
-
37
- # Load your GeoJSON data
38
- with open("examples/world.json") as f:
39
- world_data = json.load(f)
40
-
41
- # Create a map
42
- viz = Geoviz(projection="EqualEarth")
43
- viz.outline()
44
- viz.choro(data=world_data, var="gdppc")
45
- viz.render_html("map.html")
46
- ```
@@ -1,5 +0,0 @@
1
- geovizpy/__init__.py,sha256=goB5sY5MzuKwxd8llb6zCjtAusMsF4JJjhJs_bDuNcY,15015
2
- geovizpy-0.1.4.dist-info/METADATA,sha256=HAldRqSa084nhQZ-KpoHGuHXmjrJrnjiiAJlm40Fb8k,1118
3
- geovizpy-0.1.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
4
- geovizpy-0.1.4.dist-info/top_level.txt,sha256=3D5AFdMd9bWEvGQUWDy6jccJamUwdKmchgCmxLHaAYs,9
5
- geovizpy-0.1.4.dist-info/RECORD,,