
geo4bolivia
Bolivia’s subnational data and the fundamental analyses of spatial data science — in one Python package.
geo4bolivia is the Python package of the GeoDevelopment Observatory of Bolivia. It finds variables across every dataset of the observatory and explains them (sources, licenses, actual years, how to cite them), loads any indicator in one line as a tidy panel with unit names and boundaries, and moves it across municipalities, provinces and departments with each variable’s own rule. It then runs the fundamental analyses in one call each. Every analysis returns an interactive Plotly figure, a table, and a reading of the result in plain words.
What’s inside
Explore: correlations, extremes, distributions, scatter plots and trends, and classed maps of one or several periods or of their change.
Spatial dependence: spatial weights, Moran’s I and LISA cluster maps.
Convergence: β-convergence (OLS or spatial models), σ-convergence and convergence clubs.
Transitions and mobility: Markov and spatial Markov chains, LISA transitions and rank mobility.
Regional inequality: Gini and Theil indices, and the Theil decomposition between and within groups.
Models: regression with fixed effects, panel models, spatial diagnostics and spatial models with direct and indirect impacts.
Spatial heterogeneity: multiscale geographically weighted regression (MGWR).
Your own indicators: link your tables by municipal codes, summarise rasters by unit, aggregate and save in the observatory’s format.
Installation
Install the latest release from PyPI (Python 3.11+):
pip install geo4bolivia # data, maps and the core analyses
pip install "geo4bolivia[dynamics]" # + Markov transitions (giddy)
pip install "geo4bolivia[panel]" # + panel models (linearmodels)
pip install "geo4bolivia[mgwr]" # + multiscale GWR
pip install "geo4bolivia[all]" # everything, incl. raster zonal statistics
At a glance
!pip install -q geo4bolivia
import geo4bolivia as geo
# Multidimensional poverty in Bolivia's 343 municipalities, ~2012 and ~2024
mpi = geo.load("sdg01", variables="sdg1_2_mpi")
res = geo.lisa(mpi, "sdg1_2_mpi", year=2024) # where poverty clusters
print(res.interpret())
res.fig
The get-started guide, the articles and the function reference show every function at work on Bolivia’s data, each with a Colab notebook. An LLM page and llms.txt help AI assistants write correct code with the package.
Acknowledgement
geo4bolivia is developed at the QuaRCS Lab. Its analyses are adapted from its sister packages, geometrics and expdpy, which remain the companions for specialised methods, and build on PySAL, geopandas, statsmodels, Plotly and Great Tables. The data of the SDG Atlas of Bolivia 2026 and the municipal boundaries are from SDSN Bolivia, used with permission.