HN user

kylebarron

2,283 karma

[ my public key: https://keybase.io/kylebarron; my proof: https://keybase.io/kylebarron/sigs/O4FA9yLyd-i9UYt2acVY5lGgYfEdxy-4PR-5eg4glLs ]

https://kylebarron.dev https://twitter.com/kylebarron2

loginwithhn: SCpV7msREH

Posts111
Comments148
View on HN
nec.transitcosts.com 9mo ago

How to Build High-Speed Rail on the Northeast Corridor

kylebarron
3pts0
kylebarron.dev 9mo ago

Making performant Python bindings to compiled code

kylebarron
2pts0
github.com 1y ago

Obstore: Efficient streaming object store operations in Python

kylebarron
2pts0
kylebarron.dev 1y ago

Literate Flatbush: Understanding a fast, elegant RTree implementation

kylebarron
1pts0
github.com 2y ago

Parquet-WASM: Rust-based WebAssembly bindings to read and write Parquet data

kylebarron
179pts14
duckdb.org 3y ago

DuckDB for Swift

kylebarron
3pts0
arrow.apache.org 3y ago

ADBC 1.0: Database Access for Apache Arrow

kylebarron
2pts0
www.nytimes.com 3y ago

U.S.D.A. Approves First Vaccine for Honeybees

kylebarron
8pts0
senseable.mit.edu 3y ago

Proximate - How does remote work affect innovation?

kylebarron
3pts0
observablehq.com 3y ago

Zero-Copy Apache Arrow with WebAssembly

kylebarron
5pts0
blog.jupyter.org 4y ago

Mamba Meets JupyterLite

kylebarron
1pts0
developer.apple.com 4y ago

Swift Charts – Construct and customize charts on every Apple platform

kylebarron
3pts0
techblog.wikimedia.org 4y ago

Modernizing our tech stack for serving maps at Wikipedia

kylebarron
4pts0
zaplib.com 4y ago

Zaplib Post-Mortem

kylebarron
2pts0
observablehq.com 4y ago

GeoParquet on the Web

kylebarron
1pts0
siboehm.com 4y ago

Lleaves – Compiling decision trees for fast prediction using LLVM

kylebarron
4pts0
twitter.com 4y ago

Judge in Apple / Epic issues permanent injunction against Apple

kylebarron
3pts1
data-apis.org 4y ago

Consortium for Python Data API Standards

kylebarron
2pts0
numfocus.medium.com 5y ago

GDAL Joins NumFOCUS Sponsored Projects

kylebarron
1pts0
www.nytimes.com 5y ago

Startups Aim Beyond Earth

kylebarron
4pts1
www.anaconda.com 5y ago

Anaconda Collaborates with Intel to Improve Speed and Scale for ML Workflows

kylebarron
3pts0
www.unfolded.ai 5y ago

Unfolded and Foursquare Join Forces to Build Future of Geospatial Analytics

kylebarron
9pts1
kylebarron.dev 5y ago

Show HN: Serverless USGS historical topographic map tiles

kylebarron
134pts21
arrow.apache.org 5y ago

Apache Arrow 4.0

kylebarron
144pts56
www.unfolded.ai 5y ago

Bringing Analysis-Ready Raster Data to the Browser

kylebarron
1pts0
snarky.ca 5y ago

The social contract of open source

kylebarron
3pts0
blog.jupyter.org 5y ago

Nbterm: Jupyter Notebooks in the Terminal

kylebarron
7pts0
www.nytimes.com 5y ago

Boeing Tells Airlines to Stop Flying Some 737 Max Planes

kylebarron
26pts1
cesium.com 5y ago

Cesium for Unreal Now Available

kylebarron
254pts46
stackoverflow.com 5y ago

The Key by Stack Overflow

kylebarron
12pts3

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-...

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

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)

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-...

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...

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

That's exactly my complaint though. I don't want to work in a notebook frame of mind. I don't want to have to demarcate `#%%` every time I run code (especially because you'd need to scroll down to put another `#%%` where the code you're running should stop.)

As I noted in a sibling comment, I wrote a quick extension [0] that makes this easier by automatically inferring code blocks, but VSCode Jupyter is lacking in other ways: you can't have multiple Jupyter kernels running at the same time and it doesn't show you runtime completions in the editor (necessary for compiled packages without type support).

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

I completely agree. For the last couple years I've used VSCode for everything _except_ interactive Python development because Atom + Hydrogen is just too good.

I'm giving VS Code + its Jupyter extension a shot for now. It's significantly worse than Hydrogen, but I tried to make it a little less bad with a quick extension to auto-infer code blocks [0].

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