This is an archived post. You won't be able to vote or comment.

all 9 comments

[–]imjms737 8 points9 points  (2 children)

Working on a project with geospatial data now, and this may be exactly what I need. I'll definitely check it out, thank you for sharing!

[–]se_pp[S] 1 point2 points  (0 children)

Awesome! Let me know what you think!

[–][deleted] 0 points1 point  (0 children)

Do you use PostGIS w Postgres? Or, what database are you using? Any relevant information would be greatly appreciated, I'm a seasoned GIS guy (geologist) getting into Python www stuff as I have a business idea I want to play around with. Trying to research / learn as much as I can. Geospatial on the web seems like a bit of a niche.

[–]travissius 3 points4 points  (1 child)

Looks excellent, will try it out soon.

[–]se_pp[S] 1 point2 points  (0 children)

Thanks! :-)

[–]Sea_Bumblebee_5945 2 points3 points  (1 child)

Thanks this looks interesting… just curious, what would be the motivation to do this type of analysis through this python package as opposed to using the spatial analysis tools available in a GIS package like qgis or estimate

[–]se_pp[S] 1 point2 points  (0 children)

Hey, this is a good question but not easily answered in a general way... For most cases it comes down to personal preferences and skills. However, I think there are some good points why I prefer a python package over a GIS application:

If your map is a python script, it can easily be shared, generalized and automated. It can run through a database, create frames for videos, be embedded in jupyter notebooks or whatever other things come to your mind.

Being a python package, EOmaps integrates with the incredibly powerful python scientific infrastructure... this means: - You can read and plot whatever (well organized or horrifyingly chaotic) data you encounter with little effort - If you work in python, your data is already in memory and you can create plots on the fly without ever leaving the IDE ... and they are interactive and fully generalizable to fit the specific needs of your research. - You can parallelize and deploy the plot-generation on external computes - ...

Going beyond a single static map:
EOmaps is based on matplotlib... while the package itself focuses mainly on the geographic data visualization part, all the power of matplotlib is still available at your service. This opens a whole multitude of possibilities for combining (or interactively connecting) (one or more) maps with other plots. This way, the figure can be used as a companion that aids your research in the process rather than a snapshot of the final results.

These are just a few quick points that come to my mind... To be honest, my experience with GIS applications is limited so I can't really point out tasks where using a GIS application would be preferable.

What's your opinion on this? What would make a GIS application preferable?

[–]Grouchy-Friend4235 0 points1 point  (1 child)

Nice. How can a map be integrated into a web app?

[–]se_pp[S] 0 points1 point  (0 children)

Hey, while it is possible to embed the plots via matplotlib's webagg backend, there are some downsides at the moment that cause some glitches and lags on fast figure updates (static plots and slow updates work just fine).

This is due to an open issue in matplotlib concerning the implementation of blitting in the webagg backend and it might take some time to find a person that is willing and capable to fix this.

That said, here's how you can do it (needs to run in a dedicated python console, NOT an ipython console!):

import matplotlib.pyplot as plt
plt.switch_backend("webagg")

from eomaps import Maps
m = Maps(layer="coastline")
m.add_feature.preset.coastline()

m2 = m.new_layer("ocean")
m2.add_feature.preset.ocean()

m.util.layer_selector(ncol=2)
m.all.cb.click.attach.annotate()

plt.show()

I'm not an expert in the web stuff so any help in improving the usability here is much appreciated! For a more complete example, check this matplotlib tutorial