Giter Club home page Giter Club logo

Comments (13)

martinfleis avatar martinfleis commented on June 1, 2024 2

The API of explore is almost the same as for plot, with a few minor differences related to interactivity. The core of it is illustrated in the docs https://geopandas.org/en/stable/docs/user_guide/interactive_mapping.html. For most of the stuff, you should be just able to replace gdf.plot(...) with gdf.explore(...) and it should show the same map, just in leaflet instead of matplotlib. Let me know if you'll have any specific questions on how to use that.

from geocompy.

michaeldorman avatar michaeldorman commented on June 1, 2024 2

I'm in favor of using just .explore in the basic interactive plots (if any) in Chapters 1-8.
In Chapter 9 "Interactive Mapping" section we can use more specialized methods, we can explore if hvplot issue can be solved or if there is another good alternative.

from geocompy.

martinfleis avatar martinfleis commented on June 1, 2024 2

leafmap is built on top of ipyleaflet and folium and is aimed at people who try to avoid code. I am sure it will become quite popular but the main question here is who is the audience of your book. If you try to teach ppl how to code, I'd focus on libraries based on code, not UI.

from geocompy.

anitagraser avatar anitagraser commented on June 1, 2024 2

I personally don't like the feeling of hvplot as it is less google mappy than leaflet is. And installation is hefty compared to folium.

I completely understand that argument. Activating mouse wheel zoom is one of the first things I do for GeoViews applications. But it definitely still feels different.

Personally, for me, the seamless integration of spatial and non-spatial plots that hvplot (with GeoViews) provides is the main argument pro hvplot in data science settings. I don't know of any other API that does this so well. In my experience, non-geo folks can be really reluctant to learn yet another API just to get some maps.

from geocompy.

Robinlovelace avatar Robinlovelace commented on June 1, 2024 1

.explore() all the way for now then?!

from geocompy.

martinfleis avatar martinfleis commented on June 1, 2024 1

IMHO hvplot is not among the most used libraries for interactive mapping (based purely on a feeling, not numbers, no idea where to get those). I know that @anitagraser depends on it in movingpandas but I think that most of people will first go for ipyleaflet or custom folium solutions if GeoDataFrame.explore() is not enough.

from geocompy.

anitagraser avatar anitagraser commented on June 1, 2024 1

most of people will first go for ipyleaflet or custom folium solutions

Yes, that's definitely in line with my observations so far. Not sure why, however. Naturally, it helps that many people are familiar with Leaflet.

from geocompy.

Robinlovelace avatar Robinlovelace commented on June 1, 2024

Thanks for the heads-up Martin, that is a great insight. Reduced imports are good. Looking here, geopandas_object.explore(arguments...) looks promising, any advice on how to use it? https://towardsdatascience.com/interactive-geographical-maps-with-geopandas-4586a9d7cc10

from geocompy.

Robinlovelace avatar Robinlovelace commented on June 1, 2024

Sounds good, will give it a spin 👍

from geocompy.

michaeldorman avatar michaeldorman commented on June 1, 2024

Nice! Wasn't aware of .explore, it looks great!

from geocompy.

anitagraser avatar anitagraser commented on June 1, 2024

Unfortunately, there seems to be another issue with hvplot in the context of this book: the interactive plots are not displayed in the Quarto HTML exports (The error is: "Unable to display output for mime type(s):")

from geocompy.

Robinlovelace avatar Robinlovelace commented on June 1, 2024

This is good feedback, may thanks Martin! Also interested in ppls thoughts on leafmap.

from geocompy.

martinfleis avatar martinfleis commented on June 1, 2024

I personally don't like the feeling of hvplot as it is less google mappy than leaflet is. And installation is hefty compared to folium.

from geocompy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.