Skip to content

Commit eed4100

Browse files
authored
Merge pull request #178 from raphaelquast/dev
EOmaps v7.1
2 parents 519122e + ebcd495 commit eed4100

36 files changed

+2132
-602
lines changed

.github/workflows/testMaps.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
# set operating systems to test
1414
os: [ubuntu-latest]
1515
# set python versions to test
16-
python-version: ["3.9", "3.10"]
16+
python-version: ["3.8", "3.9", "3.10"]
1717

1818
name: test_Maps ${{ matrix.os }} ${{ matrix.python-version }}
1919
steps:
@@ -32,7 +32,7 @@ jobs:
3232
miniforge-variant: Mambaforge
3333
miniforge-version: latest
3434

35-
activate-environment: testMaps
35+
activate-environment: eomaps
3636

3737
show-channel-urls: true
3838
use-only-tar-bz2: true

docs/EOmaps_examples.rst

Lines changed: 119 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,85 @@
77

88
... a collection of examples that show how to create beautiful interactive maps.
99

10+
11+
.. |eximg01| image:: _static/fig1.gif
12+
:width: 100%
13+
:align: middle
14+
:target: `ex_1`_
15+
.. |eximg02| image:: _static/fig2.png
16+
:width: 100%
17+
:align: middle
18+
:target: `ex_2`_
19+
.. |eximg03| image:: _static/fig3.gif
20+
:width: 100%
21+
:align: middle
22+
:target: `ex_3`_
23+
.. |eximg04| image:: _static/fig4.gif
24+
:width: 100%
25+
:align: middle
26+
:target: `ex_4`_
27+
.. |eximg05| image:: _static/fig5.gif
28+
:width: 100%
29+
:align: middle
30+
:target: `ex_5`_
31+
.. |eximg06| image:: _static/fig6.gif
32+
:width: 100%
33+
:align: middle
34+
:target: `ex_6`_
35+
.. |eximg07| image:: _static/fig7.gif
36+
:width: 100%
37+
:align: middle
38+
:target: `ex_7`_
39+
.. |eximg08| image:: _static/fig8.gif
40+
:width: 100%
41+
:align: middle
42+
:target: `ex_8`_
43+
.. |eximg09| image:: _static/fig9.gif
44+
:width: 100%
45+
:align: middle
46+
:target: `ex_9`_
47+
.. |eximg10| image:: _static/example_row_col_selector.gif
48+
:width: 100%
49+
:align: middle
50+
:target: `ex_10`_
51+
.. |eximg11| image:: _static/example_inset_maps.png
52+
:width: 100%
53+
:align: middle
54+
:target: `ex_11`_
55+
.. |eximg12| image:: _static/example_lines.png
56+
:width: 100%
57+
:align: middle
58+
:target: `ex_12`_
59+
.. |eximg13| image:: _static/example_gridlines.png
60+
:width: 100%
61+
:align: middle
62+
:target: `ex_13`_
63+
.. |eximg14| image:: _static/example_contour.png
64+
:width: 100%
65+
:align: middle
66+
:target: `ex_14`_
67+
68+
.. |eximg15| replace:: ...
69+
70+
71+
.. table::
72+
:width: 100%
73+
74+
+-----------+-----------+-----------+-----------+-----------+
75+
| |eximg01| | |eximg02| | |eximg03| | |eximg04| | |eximg05| |
76+
+-----------+-----------+-----------+-----------+-----------+
77+
| |eximg06| | |eximg07| | |eximg08| | |eximg09| | |eximg10| |
78+
+-----------+-----------+-----------+-----------+-----------+
79+
| |eximg11| | |eximg12| | |eximg13| | |eximg14| | |eximg15| |
80+
+-----------+-----------+-----------+-----------+-----------+
81+
1082
.. contents:: Contents:
1183
:local:
1284
:depth: 1
1385

1486

87+
.. _ex_1:
88+
1589
Basic data visualization
1690
-------------------------
1791

@@ -30,6 +104,7 @@ There are 3 basic steps required to visualize your data:
30104
.. image:: _static/fig1.gif
31105
:width: 75%
32106

107+
.. _ex_2:
33108

34109
Customize the appearance of the plot
35110
------------------------------------
@@ -44,14 +119,15 @@ Customize the appearance of the plot
44119

45120
|toggleStart|
46121

47-
.. literalinclude:: ../tests/example3.py
122+
.. literalinclude:: ../tests/example2.py
48123

49124
|toggleEnd|
50125

51-
.. image:: _static/fig3.png
126+
.. image:: _static/fig2.png
52127
:width: 75%
53128

54129

130+
.. _ex_3:
55131

56132
Data-classification and multiple Maps in a figure
57133
-------------------------------------------------
@@ -67,14 +143,16 @@ Data-classification and multiple Maps in a figure
67143

68144
|toggleStart|
69145

70-
.. literalinclude:: ../tests/example2.py
146+
.. literalinclude:: ../tests/example3.py
71147

72148
|toggleEnd|
73149

74-
.. image:: _static/fig2.gif
150+
.. image:: _static/fig3.gif
75151
:width: 75%
76152

77153

154+
.. _ex_4:
155+
78156
Callbacks - turn your maps into interactive widgets
79157
---------------------------------------------------
80158

@@ -102,6 +180,8 @@ Callbacks - turn your maps into interactive widgets
102180
:width: 75%
103181

104182

183+
.. _ex_5:
184+
105185
Overlays, markers and annotations
106186
---------------------------------
107187

@@ -123,6 +203,9 @@ Overlays, markers and annotations
123203
The data displayed in the above gif is taken from:
124204
- NaturalEarth (https://www.naturalearthdata.com/)
125205

206+
207+
.. _ex_6:
208+
126209
WebMap services and layer-switching
127210
-----------------------------------
128211

@@ -143,6 +226,8 @@ The data displayed in the above gif is taken from:
143226
- OpenStreetMap hosted by Mundialis (https://www.mundialis.de/en/ows-mundialis/)
144227

145228

229+
.. _ex_7:
230+
146231
Vektor data - interactive geometries
147232
-------------------------------------
148233

@@ -178,6 +263,8 @@ The data displayed in the above gif is taken from:
178263
- NaturalEarth (https://www.naturalearthdata.com/)
179264

180265

266+
.. _ex_8:
267+
181268
Using Scalebars
182269
---------------
183270

@@ -217,6 +304,8 @@ The data displayed in the above gif is taken from:
217304

218305

219306

307+
.. _ex_9:
308+
220309
Data analysis widgets - Timeseries and histograms
221310
-------------------------------------------------
222311

@@ -238,6 +327,8 @@ This example shows how to use EOmaps to analyze a database that is associated wi
238327
:width: 75%
239328

240329

330+
.. _ex_10:
331+
241332
Data analysis widgets - Select 1D slices of a 2D dataset
242333
--------------------------------------------------------
243334

@@ -259,7 +350,7 @@ Use custom callback functions to perform arbitrary tasks on the data when clicki
259350
:width: 75%
260351

261352

262-
.. _EOmaps_examples_inset_maps:
353+
.. _ex_11:
263354

264355
Inset-maps - get a zoomed-in view on selected areas
265356
---------------------------------------------------
@@ -285,6 +376,8 @@ Quickly create nice inset-maps to show details for specific regions.
285376
:width: 75%
286377

287378

379+
.. _ex_12:
380+
288381
Lines and Annotations
289382
---------------------
290383

@@ -310,6 +403,7 @@ Connect the anchor-points via:
310403
:width: 75%
311404

312405

406+
.. _ex_13:
313407

314408
Gridlines and Grid Labels
315409
-------------------------
@@ -327,3 +421,23 @@ Draw custom grids and add grid labels.
327421

328422
.. image:: _static/example_gridlines.png
329423
:width: 75%
424+
425+
.. _ex_14:
426+
427+
Contour plots and Contour Levels
428+
--------------------------------
429+
430+
Use the ``contour``-shape to draw contour-plots of regular (or irregular data)
431+
or to indicate contour-levels on top of other plots.
432+
433+
(requires EOmaps >= v7.1)
434+
435+
|toggleStart|
436+
437+
.. literalinclude:: ../tests/example_contour.py
438+
439+
|toggleEnd|
440+
441+
442+
.. image:: _static/example_contour.png
443+
:width: 75%

docs/FAQ.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ simply provide it as an explicit argument!
210210
---------------------------
211211

212212
General changes in behavior
213-
+++++++++++++++++++++++++++
213+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
214214

215215
- | 🔶 Starting with EOmaps v6.0 multiple calls to ``m.plot_map()``
216216
| **on the same Maps-object completely remove (and replace)** the previous dataset!
@@ -226,7 +226,8 @@ General changes in behavior
226226
- the ordering of artists inside a layer is determined by their ``zorder`` (e.g. ``m.plot_map(zorder=123)``)
227227

228228
Removed (previously depreciated) functionalities
229-
++++++++++++++++++++++++++++++++++++++++++++++++
229+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
230+
230231
- ❌ the ``m.figure`` accessor has been removed!
231232

232233
- Use ``m.ax``, ``m.f``, ``m.colorbar.ax_cb``, ``m.colorbar.ax_cb_plot`` instead

docs/_static/example_contour.png

97.8 KB
Loading
File renamed without changes.
File renamed without changes.
119 KB
Loading

docs/api_companion_widget.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,21 @@ EOmaps comes with an awesome companion widget that provides many useful features
5252
matplotlib.use("qt5agg")
5353
5454
For more details, have a look at :ref:`configuring_the_editor`.
55+
56+
57+
58+
Additional information on Features and WebMaps
59+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
60+
61+
Starting with EOmaps v7.1 the widget provides a new useful functionality to **quickly access important
62+
information** of :ref:`Features <ne_features>` and :ref:`WebMaps <webmap_layers>` that were used to create a map.
63+
64+
If there is additional information available for an artist of a map, a |question_symbol| symbol will appear
65+
next to the corresponding entry in the **Edit** tab that will open a popup window containing the following information:
66+
67+
- **Notes** and **infos** on the features
68+
- Links to **sources**, **references** and **licensing details** (without warranty for correctness!)
69+
- The **source code** to reproduce the current appearance of the feature
70+
71+
.. image:: _static/minigifs/companion_widget_feature_info.gif
72+
:width: 50%

docs/api_data_visualization.rst

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,13 @@ Possible shapes that work nicely for datasets with up to ~500 000 data-points:
180180
delaunay_triangulation
181181

182182

183-
184183
Possible shapes that work nicely for up to a few million data-points:
185184

186185
.. autosummary::
187186
:nosignatures:
188187

189188
raster
189+
contour
190190

191191

192192
While :py:class:`raster` can still be used for datasets with a few million datapoints, for extremely large datasets
@@ -218,7 +218,7 @@ Possible shapes that can be used to quickly generate a plot for extremely large
218218
m2 = m.new_layer() # create a new Maps-object on the same layer
219219
m2.set_data(data, x, y) # assign another dataset to the new Maps object
220220
m2.set_shape.geod_circles(radius=50000, # draw geodetic circles with 50km radius
221-
n=100) # use 100 intermediate points to represent the shape
221+
n=100) # use 100 intermediate points to represent the shape
222222
m2.plot_map(ec="k", cmap="Reds", # plot the data
223223
zorder=2, set_extent=False) # (and avoid resetting the plot-extent)
224224
@@ -428,25 +428,25 @@ To apply a uniform color to all datapoints, you can use `matpltolib's named colo
428428
m.set_data(data=None, x=[10,20,30], y=[10,20,30])
429429
430430
# Use any of matplotlibs "named colors"
431-
m1 = m.new_layer(copy_data_specs=True)
431+
m1 = m.new_layer(inherit_data=True)
432432
m1.set_shape.ellipses(radius=10)
433433
m1.plot_map(fc="r", zorder=0)
434434
435-
m2 = m.new_layer(copy_data_specs=True)
435+
m2 = m.new_layer(inherit_data=True)
436436
m2.set_shape.ellipses(radius=8)
437437
m2.plot_map(fc="orange", zorder=1)
438438
439439
# Use RGB or RGBA tuples
440-
m3 = m.new_layer(copy_data_specs=True)
440+
m3 = m.new_layer(inherit_data=True)
441441
m3.set_shape.ellipses(radius=6)
442442
m3.plot_map(fc=(1, 0, 0.5), zorder=2)
443443
444-
m4 = m.new_layer(copy_data_specs=True)
444+
m4 = m.new_layer(inherit_data=True)
445445
m4.set_shape.ellipses(radius=4)
446446
m4.plot_map(fc=(1, 1, 1, .75), zorder=3)
447447
448448
# For grayscale use a string of a number between 0 and 1
449-
m5 = m.new_layer(copy_data_specs=True)
449+
m5 = m.new_layer(inherit_data=True)
450450
m5.set_shape.ellipses(radius=2)
451451
m5.plot_map(fc="0.3", zorder=4)
452452
@@ -466,26 +466,26 @@ To explicitly color each datapoint with a pre-defined color, simply provide a li
466466
467467
# Use any of matplotlibs "named colors"
468468
# (https://matplotlib.org/stable/gallery/color/named_colors.html)
469-
m1 = m.new_layer(copy_data_specs=True)
469+
m1 = m.new_layer(inherit_data=True)
470470
m1.set_shape.ellipses(radius=10)
471471
m1.plot_map(fc=["indigo", "g", "orange"], zorder=1)
472472
473473
# Use RGB tuples
474-
m2 = m.new_layer(copy_data_specs=True)
474+
m2 = m.new_layer(inherit_data=True)
475475
m2.set_shape.ellipses(radius=6)
476476
m2.plot_map(fc=[(1, 0, 0.5),
477477
(0.3, 0.4, 0.5),
478478
(1, 1, 0)], zorder=2)
479479
480480
# Use RGBA tuples
481-
m3 = m.new_layer(copy_data_specs=True)
481+
m3 = m.new_layer(inherit_data=True)
482482
m3.set_shape.ellipses(radius=8)
483483
m3.plot_map(fc=[(1, 0, 0.5, 0.25),
484484
(1, 0, 0.5, 0.75),
485485
(0.1, 0.2, 0.5, 0.5)], zorder=3)
486486
487487
# For grayscale use a string of a number between 0 and 1
488-
m4 = m.new_layer(copy_data_specs=True)
488+
m4 = m.new_layer(inherit_data=True)
489489
m4.set_shape.ellipses(radius=4)
490490
m4.plot_map(fc=[".1", ".2", "0.3"], zorder=4)
491491

docs/api_inset_maps.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ For convenience, inset-map objects have the following special methods defined:
4343
InsetMaps.add_indicator_line
4444

4545

46-
Checkout the associated example on how to use inset-maps: :ref:`EOmaps_examples_inset_maps`
46+
Checkout the associated example on how to use inset-maps: :ref:`ex_11`
4747

4848
To quickly re-position (and re-size) inset-maps, have a look at the :ref:`layout_editor`!
4949

0 commit comments

Comments
 (0)