Comments (13)
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.
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.
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.
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.
.explore()
all the way for now then?!
from geocompy.
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.
most of people will first go for
ipyleaflet
or customfolium
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.
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.
Sounds good, will give it a spin 👍
from geocompy.
Nice! Wasn't aware of .explore
, it looks great!
from geocompy.
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.
This is good feedback, may thanks Martin! Also interested in ppls thoughts on leafmap.
from geocompy.
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)
- Tidy up README
- Run convert workflow regularly
- Add workflow to test on latest pkgs versions
- Update requirements.txt?
- Proposed update for `01-spatial-data.qmd` based on `pylint` and `black`
- Another example of built-in dataset? HOT 2
- Switch geocoding from `osmnx` to `geopandas` HOT 2
- [WARNING] Citeproc: citation matplotlib not found HOT 1
- Scale landsat data values HOT 6
- Geometric intersections section removal HOT 1
- Consider adding pyogrio example
- 'shapely' access methods
- Improve "Code and sample data" section HOT 8
- First sentence in preface seems to be missing a few tokens HOT 1
- Next page button is broken HOT 3
- Test and adapt to geopandas 1.0 HOT 4
- Add example for fetching data from WFS?
- Section and figure links not rendered HOT 3
- Switch to `geopandas` version `>=1.0.0` HOT 2
- Some figures are stretched HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geocompy.