/EOmaps

A library to create interactive maps of geographical datasets

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

tests codecov       pypi Conda Version       Documentation Status Buy Me A Coffee


A library to create interactive maps of geographical datasets.

  • 🌍 EOmaps provides a simple and intuitive interface to visualize and interact with geographical datasets
    • ⬥ Data can be provided as 1D or 2D lists, numpy-arrays or pandas.DataFrames
    •       ... usable also for large datasets with > 1M datapoints!
    • ⬥ WebMap layers, annotations, markers can be added with a single line of code
    • ⬥ EOmaps is built on top of matplotlib and cartopy and integrates well pandas and geopandas
  • 🌎 Quickly turn your maps into powerful interactive data-analysis widgets
    • ⬥ use callback functions to interact with the data (or an underlying database)
    • ⬥ compare multiple data-layers, WebMaps etc.

🌲🌳 Checkout the documentation for more details and examples 🌳🌲

🔨 Installation

To install EOmaps (and all its dependencies) via the conda package-manager, simply use:

conda install -c conda-forge eomaps

For more information, have a look at the installation instructions in the documentation!

🚀 Contribute

Found a bug or got an idea for an interesting feature? Open an issue or start a discussion and I'll see what I can do!
(I'm of course also happy about actual pull requests on features and bug-fixes!)


EOmaps example image 2 EOmaps example image 1 EOmaps example image 3 EOmaps example image 1 EOmaps example image 1 EOmaps example image 1

🌳 Basic usage

🛸 Checkout the documentation! 🛸

  • A list of coordinates and values is all you need as input!
    • plots of large (>1M datapoints) irregularly sampled datasets are generated in a few seconds!
  • Represent your data
    • as shapes with actual geographic dimensions (ellipses, rectangles, geodetic circles)
    • via Voroni diagrams and Delaunay triangulations to get interpolated contour-plots
    • via dynamic data-shading to speed up plots with extremely large datasets
  • Re-project the data to any crs supported by cartopy
  • Quickly add features and additional layers to the plot
    • Markers, Annotations, WebMap Layers, NaturalEarth features, Scalebars, Compasses (or North-arrows) etc.
  • Interact with the data via callback-functions.
import pandas as pd
from eomaps import Maps

# the data you want to plot
lon, lat, data = [1,2,3,4,5], [1,2,3,4,5], [1,2,3,4,5]

# initialize Maps object
m = Maps(crs=Maps.CRS.Orthographic())

# set the data
m.set_data(data=data, xcoord=lon, ycoord=lat, crs=4326)
# set the shape you want to use to represent the data-points
m.set_shape.geod_circles(radius=10000) # (e.g. geodetic circles with 10km radius)

# (optionally) set the appearance of the plot
m.set_plot_specs(cmap="viridis", label="a nice label")
# (optionally) classify the data
m.set_classify_specs(scheme=Maps.CLASSIFIERS.Quantiles, k=5)

# plot the map
m.plot_map()

# add a colorbar with a histogram on top
m.add_colorbar()

# add a scalebar
m.add_scalebar()

# add a compass
m.add_compass()

# add some basic features from NaturalEarth
m.add_feature.preset.coastline()

# use callback functions make the plot interactive!
m.cb.pick.attach.annotate()

# ---- add another plot-layer on a different level (1) to the map
#      (by default only layer 0 is shown!)
m3 = m.new_layer(layer=1)
...
# peek on layer 1 if you click on the map
m.cb.click.attach.peek_layer(layer=1, how=0.4)
# switch between the layers if you press "0" or "1" on the keyboard
m.cb.keypress.attach.switch_layer(layer=0, key="0")
m.cb.keypress.attach.switch_layer(layer=1, key="1")

# ---- add new layers directly from a GeoTIFF / NetCDF or CSV files
m4 = m.new_layer_from_file.GeoTIFF(...)
m4 = m.new_layer_from_file.NetCDF(...)
m4 = m.new_layer_from_file.CSV(...)

🌼 Thanks to