CSV to TopoJSON Converter
Skip the GeoJSON-then-d3.topojson-conversion two-step — go straight from spreadsheet to D3-ready file.
Common issues converting CSV to TopoJSON
- Point-only output. CSVs don't carry polygon geometry; the resulting topology has Point features only, so the arc-sharing benefit is minimal.
- For point data, plain GeoJSON is usually a better fit than TopoJSON — fewer code paths, no quantization-precision tradeoff. Use this only if your D3 pipeline specifically requires TopoJSON input.
- Lat/lng columns are auto-detected (lat/latitude/y vs lng/lon/longitude/x). Override the detection if your column names are unusual.
- Numeric properties carry over as JSON numbers; string properties as JSON strings. ZIP / phone-code columns prefix-quoted in Excel survive as strings.
Frequently asked questions
Why would I use TopoJSON for point data?
Honestly, you probably wouldn't — GeoJSON is more direct. The main reason is if you're combining points with admin boundaries in the same topology and want a single fetch.
Can I geocode addresses on the fly?
No — supply lat/lng columns already. Run addresses through Nominatim, Mapbox, or Google Geocoding first, then convert.
Will my CSV property types survive?
Numeric values become JSON numbers, strings stay strings, booleans (if explicit) become booleans. Empty cells become nulls.
What CRS does the output use?
WGS 84 (EPSG:4326). If your CSV is in a projected CRS — typical when coordinates look like hundreds of thousands — reproject to lat/lng first.