Skip to content

gpdvega is a bridge between GeoPandas and Altair that allows to seamlessly chart geospatial data

License

Notifications You must be signed in to change notification settings

iliatimofeev/gpdvega

Repository files navigation

gpdvega Coverage Status Build Status HitCount GitHub license GitHub issues

gpdvega is a bridge between GeoPandas a geospatial extension of Pandas and the declarative statistical visualization library Altair, which allows to seamlessly chart geospatial data using altair.

Example

import altair as alt
import geopandas as gpd
import gpdvega

alt.renderers.enable('notebook') # render for Jupyter Notebook

world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))

# GeoDataFrame could be passed as usual pd.DataFrame
alt.Chart(world[world.continent!='Antarctica']).mark_geoshape(
).project(
).encode(
    color='pop_est', # shorthand infer types as for regular pd.DataFrame
    tooltip='id:Q' # GeoDataFrame.index is accessible as id
).properties(
    width=500,
    height=300
)

output

Install

Dependencies

gpdvega requires:

  • Altair (>= 2.2.0 )
  • GeoPandas (>= 0.4.0)

User installation

using pip

pip install gpdvega

Changelog

See the changelog for a history of notable changes to gpdvega

About

gpdvega is a bridge between GeoPandas and Altair that allows to seamlessly chart geospatial data

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published