News for hackers. Stuff that matters.

kylebarron

Re:Our Continuation of MkDocs on Wednesday May 06, 2026 @11:46AM (#48037578)
See recent discussion in [0]

[0]: https://news.ycombinator.com/item?id=47482185

Looks great!

Another seemingly extremely similar project released in the last few days: https://github.com/raulcd/datanomy

Re:Notebooks as reusable Python programs on Wednesday March 19, 2025 @05:22PM (#43417461)
Agreed, I find this to be a super productive environment, because you get all of vscode's IDE plus the niceties of Jupyter and IPython.

I wrote a small vscode extension that builds upon this to automatically infer code blocks via indentation, so that you don't have to select them manually: [0]

[0]: https://github.com/kylebarron/vscode-jupyter-python

Re:Stop Using Zip Codes for Geospatial Analysis (2019) on Friday February 07, 2025 @03:03PM (#42976835)
Equal distances to each adjacent neighbor: https://www.uber.com/blog/h3/
Re:Railroad Tycoon II on Tuesday January 14, 2025 @10:33AM (#42698467)
This worked for me last month on a Mac M2: https://www.portingkit.com/game/278
Re:Show HN: OpenFreeMap – Open-Source Map Hosting on Tuesday September 24, 2024 @05:11PM (#41640942)
https://visgl.github.io/react-map-gl/ is a react interface to MapLibre
Re:Show HN: OpenFreeMap – Open-Source Map Hosting on Tuesday September 24, 2024 @05:09PM (#41640916)
I develop Lonboard [0], a Python library for plotting large geospatial data. If you have small data (~max 30,000 coordinates), leaflet-based Python libraries like folium and ipyleaflet can be fine, but because Lonboard uses deck.gl for GPU-accelerated rendering, it's 30-50x faster than leaflet for large datasets [1].

[0]: https://developmentseed.org/lonboard/latest/

[1]: https://developmentseed.org/lonboard/latest/how-it-works/

It can read from HTTP urls, but you'd need to manage signing the URLs yourself. On the writing side, it currently writes to an ArrayBuffer, which then you could upload to a server or save on the user's machine.
Arrow JS is just ArrayBuffers underneath. You do want to amortize some operations to avoid unnecessary conversions. I.e. Arrow JS stores strings as UTF-8, but native JS strings are UTF-16 I believe.

Arrow is especially powerful across the WASM <--> JS boundary! In fact, I wrote a library to interpret Arrow from Wasm memory into JS without any copies [0]. (Motivating blog post [1])

[0]: https://github.com/kylebarron/arrow-js-ffi

[1]: https://observablehq.com/@kylebarron/zero-copy-apache-arrow-...

Re:Friends don't let friends export to CSV on Tuesday March 26, 2024 @10:36PM (#39835161)
That's why I'm working on the GeoParquet spec [0]! It gives you both compression-by-default and super fast reads and writes! So it's usually as small as gzipped CSV, if not smaller, while being faster to read and write than GeoPackage.

Try using `GeoDataFrame.to_parquet` and `GeoPandas.read_parquet`

[0]: https://github.com/opengeospatial/geoparquet

Re:Friends don't let friends export to CSV on Tuesday March 26, 2024 @10:26PM (#39835098)
Your issue is that you're using the default (old) binding to GDAL, based on Fiona [0].

You need to use pyogrio [1], its vectorized counterpart, instead. Make sure you use `engine="pyogrio"` when calling `to_file` [2]. Fiona does a loop in Python, while pyogrio is exclusively compiled. So pyogrio is usually about 10-15x faster than fiona. Soon, in pyogrio version 0.8, it will be another ~2-4x faster than pyogrio is now [3].

[0]: https://github.com/Toblerity/Fiona

[1]: https://github.com/geopandas/pyogrio

[2]: https://geopandas.org/en/stable/docs/reference/api/geopandas...

[3]: https://github.com/geopandas/pyogrio/pull/346

Re:Friends don't let friends export to CSV on Tuesday March 26, 2024 @09:36AM (#39827643)
Sorry, this is not true _at all_ for geospatial data.

A quick benchmark [0] shows that saving to GeoPackage, FlatGeobuf, and GeoParquet are roughly 10x faster than saving to CSV. Additionally, the CSV is much larger than any other format.

[0]: https://gist.github.com/kylebarron/f632bbf95dbb81c571e4e64cd...

Re:Vega-Altair: Declarative Visualization in Python on Monday February 26, 2024 @01:43AM (#39508243)
Is this open? Is there a way to read more about it? Issues/pull requests?
Re:Goodbye, Node.js Buffer on Tuesday October 24, 2023 @01:52PM (#38002706)
nodejs-polars is node-specific and uses native FFI. polars can be compiled to Wasm but doesn't yet have a js API out of the box.

As for the fastest way to serialize data to Pandas data to the browser, you should use Parquet; it's the fastest to write on the Python side and read on the JS side, while also being compressed. See https://github.com/kylebarron/parquet-wasm (full disclosure, I wrote this)

Re:Protomaps – A free and open source map of the world on Monday October 23, 2023 @09:32AM (#37985354)
pmtiles are only the counterpart to the "overviews" part of COG. pmtiles doesn't give you analysis-ready data. For that, look to FlatGeobuf or GeoParquet (once it gets a spatial index in v1.1 of the spec)
Re:What Every Developer Should Know About GPU Computing on Saturday October 21, 2023 @05:08PM (#37970441)
10,000 coordinates are certainly not enough to see the difference, but at some scale this would be faster on the GPU.

This is implemented in an nvidia geospatial library call cuspatial: https://docs.rapids.ai/api/cuspatial/legacy/api_docs/spatial...

Re:Show HN: TG – Fast geometry library for C on Saturday September 23, 2023 @01:55PM (#37625642)
I'm working on bringing GeoRust algorithms [0] (which include boolean operations) to the web via WebAssembly. See this blog post [1] for an intro. There's also separate work on binding GEOS to Wasm [2], but I'm more excited about GeoArrow in the long term because you can interpret Wasm geometries in JS without any copies across the boundary [3].

[0]: https://docs.rs/geo/latest/geo/#algorithms

[1]: https://observablehq.com/@kylebarron/prototyping-georust-geo...

[2]: https://github.com/chrispahm/geos-wasm

[3]: https://observablehq.com/@kylebarron/zero-copy-apache-arrow-...

Re:Tom MacWright's Projects on Friday June 23, 2023 @01:05PM (#36449571)
I'm surprised this link works and doesn't redirect given https://macwright.com/2022/09/15/hacker-news.html
Re:Where Do Stolen Bikes Go? on Sunday April 09, 2023 @09:40AM (#35502628)
The line visuals at the bottom are not using Mapbox for the data rendering. Rather they're using the open source Kepler.gl [0], (a user-friendly wrapping of the deck.gl library [1]). These can use Mapbox for the underlying basemap, but the data rendering is done separately.

(This is easy to tell if you look at the page source. The map at the bottom is an embed from a static HTML kepler.gl map [2]). Disclaimer: I've contributed to deck.gl

[0]: https://kepler.gl/

[1]: https://deck.gl/

[2]: https://senseable.mit.edu/bike-trafficking/assets/kepler.htm...

Re:Pandas v2.0 Released on Monday April 03, 2023 @12:03PM (#35426155)
DuckDB is not backed by Arrow, but by something similar enough that it can be zero copy to Arrow in many cases https://duckdb.org/2021/12/03/duck-arrow.html
Re:Serverless maps at 1/700 the cost of Google Maps API on Friday March 10, 2023 @08:39AM (#35094176)
Most of these examples go up to zoom 10 or so because they cover a wide area. It's not prohibitive to increase that zoom in a small area because the total number of tiles will still be low. Also keep in mind that for vector data it's possible to "overzoom" and allow the client zoom levels to be higher than the physical data levels.

In terms of self hosted maps for outdoors use, I have some open source repos from a few years ago that may help with that. [0] is a style based on the openmaptiles vector tile schema for outdoors purposes. I believe that readme has some overall instructions, plus other repos in the org are for making data. (Nowadays planetiler is probably the best way to make OSM vector tiles though)

[0]: https://github.com/nst-guide/osm-liberty-topo

Re:Pandas 2.0 and the Arrow revolution on Tuesday February 28, 2023 @04:58PM (#34975494)
Maybe due to SIMD?

Older »