Urban-Analytics-Technology-Platform / popgetter-cli

A rust library and CLI for accessing popgetter data
0 stars 0 forks source link

Enable compilation of lib/core crate to WASM #73

Open sgreenbury opened 4 months ago

sgreenbury commented 4 months ago
sgreenbury commented 3 months ago

Polars compatibility

See https://github.com/Urban-Analytics-Technology-Platform/popgetter-cli/commit/46f04329beb5c99561070b26fc3f0e3842aa0bc9

Other compatibility

Revisions to popgetter

Next steps

dabreegster commented 3 months ago

In case it's helpful, https://crates.io/crates/streaming-http-range-client and https://github.com/michaelkirk/geomedea/tree/main/geomedea-wasm might be helpful to figure out how to do streaming HTTP range requests in WASM. And if you want to chat about this stuff, join the georust Discord https://discord.gg/Fp2aape and ping Michael and Kyle

sgreenbury commented 3 months ago

Thanks @dabreegster for the helpful suggestions! polars also has an implementation (though currently this cannot used directly with WASM since the "cloud" feature depends on a multi-threaded tokio runtime) that might be useful for understanding how to construct the required range requests and convert to a polars dataframe.

I've added a functional WASM implementation for getting the metrics so that it does not block popgetter-browser but this does not have a range request for subsets of columns/rows yet https://github.com/Urban-Analytics-Technology-Platform/popgetter-cli/pull/76

sgreenbury commented 1 month ago

Next steps from discussion @stuartlynn @sgreenbury @andrewphilipsmith:

sgreenbury commented 1 month ago

See 153 for an alternative approach without "parquet" feature.