ibis icon indicating copy to clipboard operation
ibis copied to clipboard

docs(blog/how to): Ibis + duckdb spatial + geoparquet + lonboard

Open ncclementi opened this issue 1 year ago • 7 comments

Please describe the issue

After this support added to duckdb to read geoparquet (still on nightly as there is no new release), and this PR on Ibis https://github.com/ibis-project/ibis/pull/9549, we should now be able to plot on lonboard directly from an Ibis table.

Write a blog/how to about it. Not sure what's the best option, I don't have a strong opinion.

Code of Conduct

  • [X] I agree to follow this project's Code of Conduct

ncclementi avatar Jul 15 '24 21:07 ncclementi

With #9549 it should work to pass lonboard.viz(ibis_table) or lonboard.ScatterplotLayer(table=ibis_table) directly. Let me know if it doesn't

kylebarron avatar Jul 16 '24 02:07 kylebarron

@kylebarron Confirmed, I can plot directly from an Ibis table both with viz or a map with multiple Layers.

The only caveat is that if the data is not on WGS84, because duckdb doesn't have info of the CRS then it errors when trying to plot. Transforming to the right projection does the trick.

I'll try to put a doc, blog or something up at some point this week.

ncclementi avatar Jul 16 '24 17:07 ncclementi

I wonder if we should wait for the next duckdb patch release or give instructions on how to install from nightly. Happy to give instructions and then update once released.

ncclementi avatar Jul 16 '24 17:07 ncclementi

@kylebarron Idea: Would you be interested in co-writing a blog? I think it would be great to have more context around how lonboard works/integrates with Ibis. Also open to plot the any of the data sets in your examples, or something new that we think could be interesting to showcase.

I can get the initial PR going with code and wording, but I'm thinking in having sections like "What is lonboard", "How it works (brief) and "Why you should use it", that would definitely benefit from your review/authoring.

Thoughts?

ncclementi avatar Jul 16 '24 21:07 ncclementi

Yeah that sounds great! I always struggle to find compelling datasets, so if you have one you like, I'm happy to use that one

kylebarron avatar Jul 16 '24 22:07 kylebarron

I've been trying to play around with some more interesting data from overture maps, and while at it I landed in a few bugs hence the delay. xref: https://github.com/ibis-project/ibis/issues/9662 xref: https://github.com/duckdb/duckdb/issues/13120 (this one is a problem as a nightly version is needed to be able to get the geoparquet support)

ncclementi avatar Jul 22 '24 23:07 ncclementi

The fix was in for the latest duckdb nightly, but there is a still a bug, a different one though. We are now blocked on https://github.com/duckdb/duckdb/issues/13285

ncclementi avatar Aug 02 '24 16:08 ncclementi