geovizpy 0.1.4__py3-none-any.whl → 0.1.5__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,117 @@
1
+ Metadata-Version: 2.4
2
+ Name: geovizpy
3
+ Version: 0.1.5
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 excellent `geoviz` library. For detailed information on the underlying mapping logic, please refer to the [original geoviz documentation](https://github.com/neocarto/geoviz).
28
+
29
+ ## Features
30
+
31
+ - **Simple, chainable API**: Build complex maps by chaining intuitive methods.
32
+ - **Variety of Map Types**: Create choropleth, proportional symbol, typology, and other thematic maps.
33
+ - **Interactive Controls**: Add hover-to-expand controls for toggling layer visibility and exporting the map as SVG or PNG.
34
+ - **Customizable**: Extensive options to customize colors, legends, strokes, and more.
35
+ - **Standalone HTML**: Renders self-contained HTML files with no server required.
36
+ - **Image Export**: Save maps directly to PNG or SVG from Python (requires optional dependencies).
37
+
38
+ ## Installation
39
+
40
+ ### Standard Installation
41
+
42
+ You can install the core library using pip:
43
+
44
+ ```bash
45
+ pip install geovizpy
46
+ ```
47
+
48
+ Or install directly from the source repository:
49
+
50
+ ```bash
51
+ pip install git+https://codeberg.org/fbxyz/geovizpy.git
52
+ ```
53
+
54
+ ### For Image Export
55
+
56
+ To save maps as PNG or SVG files directly from Python, you need to install the optional `export` dependencies, which include `playwright`.
57
+
58
+ 1. **Install the extra dependencies:**
59
+
60
+ ```bash
61
+ pip install "geovizpy[export]"
62
+ ```
63
+
64
+ 2. **Install Playwright's browser binaries:**
65
+
66
+ ```bash
67
+ playwright install
68
+ ```
69
+
70
+ On Linux, you may also need to install host dependencies:
71
+
72
+ ```bash
73
+ sudo playwright install-deps
74
+ ```
75
+
76
+ ## Quick Start
77
+
78
+ Here is a simple example of how to create a choropleth map:
79
+
80
+ ```python
81
+ from geovizpy import Geoviz
82
+ import json
83
+
84
+ # Load your GeoJSON data
85
+ # (Assuming 'world.json' is in a 'data' subdirectory)
86
+ with open("data/world.json") as f:
87
+ world_data = json.load(f)
88
+
89
+ # Initialize the map
90
+ viz = Geoviz(projection="EqualEarth", width=800)
91
+
92
+ # Add layers
93
+ viz.outline()
94
+ viz.graticule()
95
+
96
+ # Add a choropleth layer
97
+ viz.choro(
98
+ data=world_data,
99
+ var="gdppc",
100
+ colors="Blues",
101
+ legend=True,
102
+ leg_title="GDP per Capita"
103
+ )
104
+
105
+ # Add interactive controls
106
+ viz.add_layer_control(layers=["choropleth_gdp"])
107
+ viz.add_export_control()
108
+
109
+ # Save the map
110
+ viz.save("my_map.html") # Renders an interactive HTML file
111
+ # viz.save("my_map.png") # Renders a static PNG image (requires export dependencies)
112
+ ```
113
+
114
+ ## Documentation
115
+
116
+ For more detailed information on all available methods and parameters, please see the [full documentation](https://your-username.github.io/geovizpy/).
117
+
@@ -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=lrPZnAbvOdvtjA5DrcHkcID_CMwFcpreQwzDspf0ES4,14603
9
+ geovizpy-0.1.5.dist-info/METADATA,sha256=SNuEBOpCeC8TT1o-bV5WkT3jB-E5wos0fGx9rd3EOcg,3386
10
+ geovizpy-0.1.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
+ geovizpy-0.1.5.dist-info/top_level.txt,sha256=3D5AFdMd9bWEvGQUWDy6jccJamUwdKmchgCmxLHaAYs,9
12
+ geovizpy-0.1.5.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,,