07 Geographic Data ¶
PyViz is designed to offer a set of general tools that can help visualize all sorts of different types of data, usually without any domain-specific support needed. However, it does include special handling for the case of visualizing data at geographic locations, because of the sometimes-complex transformations needed for this common case.
The GeoViews package provides a library of Element types that extend standard HoloViews functionality by making the elements aware of geographic projections. The plotting code will automatically transform coordinates to the appropriate projection during plotting so you can work with latitudes and longitudes while GeoViews will handle the complexities of projecting data to appropriate coordinates for display. GeoViews makes extensive use of Cartopy, a general-purpose library for working with geographic data, which in turn builds on many lower-level libraries like PROJ.4, GEOS, and GDAL. It also works well with GeoPandas .
import cartopy.crs as ccrs import holoviews as hv import geoviews as gv import geoviews.feature as gf hv.extension('bokeh', 'matplotlib')