Private Batch CSV & Warehouse SQL
Bulk geocoding a customer table, patient registry, or insurance portfolio usually comes with two major headaches: paying thousands of dollars per million rows, and dealing with vendor terms of service that forbid permanently storing or caching the coordinates you just paid for — not to mention uploading sensitive PII to third-party servers.
texspace is MIT licensed, meaning you can geocode and store every coordinate, postal code, parcel APN, and timezone in your warehouse forever with zero restrictions. Choose the workflow that matches your dataset size: private in-browser CSV processing (0 rows uploaded), vectorized DuckDB SQL, Python, or multi-threaded CLI batching.
What this solves#
- Zero-upload privacy for sensitive CSVs: Process customer, healthcare, or HR spreadsheets right inside your browser tab — no spreadsheet row is ever sent to a server.
- Permanent storage in your database: Unlike Google Maps or Mapbox ToS, you can permanently save latitude, longitude, standardized addresses, and timezones in Snowflake, Postgres, BigQuery, or Parquet.
- Warehouse-speed offline processing: Run vectorized geocoding directly inside DuckDB SQL across all CPU cores without writing network retry loops or hitting API rate limits.
- Built-in deduplication & enrichment: Automatically deduplicate repeated addresses and optionally append local IANA timezones or parcel APNs in the same pass.
Option 1: Browser CSV Tool & Client-Side geo.batch() (Zero Rows Uploaded)#
Need to geocode a CSV right now without writing code? Drag and drop any CSV onto texspace.dev/batch — everything runs locally in your browser.
To embed client-side batch geocoding inside your own admin dashboard or web app:
import { Texspace } from "texspace";
const geo = await Texspace.open("https://shards.texspace.dev/txg/v2");
const addresses = [
"2750 Middlefield Rd, Palo Alto, CA 94306",
"4865 Mission St Apt 4B, San Francisco, CA 94112",
"10 Downing Street, London, SW1A 2AA",
];
const report = await geo.batch(addresses, {
includeTimezone: true,
onProgress: ({ completed, total, matched, query }) => {
console.log(`[${completed}/${total}] matched=${matched}: ${query}`);
},
});
for (const row of report.results) {
console.log(row.query, "->", row.hit?.lat, row.hit?.lon, row.hit?.timezone?.tzid);
}Option 2: Vectorized DuckDB SQL Extension (Millions of Rows Locally)#
For analytics teams working with Parquet or large CSVs, load the native texspace DuckDB extension to geocode entire 2,048-row chunks in parallel across every CPU core:
LOAD 'texspace.duckdb_extension';
SELECT
id,
address,
g.label,
g.lat,
g.lon,
g.match_level,
g.confidence,
g.unit,
g.apn
FROM (
SELECT id, address, texspace_geocode('data/global', address) AS g
FROM read_csv('customers.csv')
);All 6 built-in SQL functions (texspace_geocode, texspace_geocode_json, texspace_reverse, texspace_geoip, texspace_timezone, texspace_version) cache open index handles automatically across queries.
Option 3: Python & CLI Bulk Processing#
from texspace import TexspaceEngine
with TexspaceEngine("data/global") as geo:
for row in customer_rows:
hit = geo.search(row["address"], limit=1)["results"]
if hit:
row["lat"] = hit[0]["lat"]
row["lon"] = hit[0]["lon"]
row["confidence"] = hit[0]["confidence"]# Pull local data once (one state or the full planet)
texspace pull us_ca --with-buildings --with-parcels --out data/us_ca
# Geocode an entire CSV across all CPU cores (`--threads 0`)
texspace batch \
--db data/us_ca \
--input addresses.csv \
--output geocoded.csv \
--threads 0curl -X POST "http://127.0.0.1:4000/v1/batch" \
-H "Content-Type: application/json" \
-d '{
"limit": 1,
"profile": "delivery",
"queries": [
"2750 Middlefield Rd, Palo Alto, CA 94306",
"4865 Mission St Apt 4B, San Francisco, CA 94112"
]
}'Go Deeper#
- Embedded SDKs Reference — DuckDB extension build, Python
ctypeswrapper, and Rust crate APIs. - CLI Reference —
texspace pull,texspace batch, andtexspace update. - Hosting & Deployment — Hardware sizing for regional vs. full-planet batch throughput.