SciPy 2024

Ibis + DuckDB geospatial: a match made on Earth
07-11, 10:45–11:15 (US/Pacific), Room 315

Geospatial data is becoming more present in data workflows today, and plenty of Python tools allow us to work with it. In the past year, a new contender emerged: DuckDB introduced an extension for analyzing geospatial data. Everyone in the data world has been buzzing about DuckDB (~15k stars on GitHub), and now this duck quacks geospatial data too. But wait a minute, isn’t DuckDB all SQL? Yes, but fear not, Ibis has you covered! Ibis is a Python library that provides a dataframe-like interface, enabling users to write Python code to construct SQL expressions that can be executed on multiple backends, like DuckDB. In this talk, you will learn how to leverage the benefits of DuckDB geospatial while remaining in the Python ecosystem (yes, we will do a live demo). This is an introductory talk; everyone is welcome, and no previous experience with spatial databases or geospatial workflows is needed.


Ibis is an open-source Python library that provides a dataframe-like API, enabling you to write Python code to build expressions that can be executed across multiple backends (DuckDB, PostgreSQL, BigQuery, etc). Some of these backends offer support for geospatial operations that can be executed via Ibis without the need to write any SQL. In this talk, we aim to showcase our default backend: DuckDB.

In the past year, DuckDB has introduced support for over 100 geospatial operations, and Ibis has incorporated support for some of them. This allows you to experiment with these operations while remaining in Python land. If you have experience working with spatial databases, you are likely familiar with PostGIS, a library that extends PostgreSQL's capabilities to handle geospatial data. The DuckDB spatial extension provides a healthy subset of PostGIS-like options, but getting started is much simpler. No server-side setup, user configuration, or client configuration. DuckDB seamlessly integrates into existing GIS workflows, regardless of data formats or projections. With Ibis, performing your first spatial operations becomes even easier and, most importantly, it’s Python!

During this talk, we will introduce Ibis and demonstrate its geospatial functionality through an example, with DuckDB as a backend. We will also explore its compatibility with other Python libraries such as GeoPandas, leafmap, and lonboard for plotting purposes. By the end of the talk, you’ll learn how to get started with Ibis and work with spatial databases with DuckDB as a backend engine.

Naty is a senior software engineer at Voltron Data. She is a former academic with a Masters in Physics and PhD in Mechanical and Aerospace Engineering to her name. She is currently contributing to Ibis, but in the past has also contributed and maintained Dask. She is also an active member of Pyladies and a one of the directors of Women Who Code DC.

This speaker also appears in: