Skip to content

Simplifying geospatial plots in python. Aims to be seaborn equivalent for geospatial plots. Built on top of geopandas.

License

Notifications You must be signed in to change notification settings

ambeelabs/gspatial_plot

Repository files navigation

gspatial_plot

License Code style: black Downloads Documentation Status

A geospatial plotting library built on top of geopandas. The aim of this library is to simplify generation of various geospatial plot and provide a simple interface to various commonly used geospatial plot types.

Documentation

https://gspatial-plot.readthedocs.io/en/latest/index.html

Features

  1. Simple API

  2. Better defaults compared to vanilla geopandas plot

  3. Customizations made simple

  4. Compatible with other geopandas or matplotlib axis objects

  5. Provides functions for plotting bubbleplots, cartograms, heatmaps, spikemaps and densityplots

Installing

pip install gspatial-plot

Usage

import gspatial_plot as gsp

usa = gsp.us_states


usa = usa[
    ~usa["NAME"].isin(
        [
            "Hawaii",
            "Guam",
            "American Samoa",
            "Commonwealth of the Northern Mariana Islands",
            "Alaska",
        ]
    )
]


gsp.randommap(usa, seed=3, annot=True, annot_column="NAME", figsize=(30, 30))
gsp.shapeplot(usa, figsize=(15, 15))
gsp.pointplot(usa_points, base=usa)
gsp.choropleth(usa, "AWATER")
gsp.bubblemap(usa, usa["AWATER"])
gsp.cartogram(
    usa,
    "AWATER",
)
gsp.densityplot(usa, clip=True, clip_factor=1.5)
gsp.heatmap(usa, "AWATER")
gsp.spikemap(usa, "AWATER")
gsp.offline_static_basemap()
gsp.offline_folium_basemap(crs="EPSG4326")

About

Simplifying geospatial plots in python. Aims to be seaborn equivalent for geospatial plots. Built on top of geopandas.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published