Render georeferenced point maps from a CSV file.
Requires uv.
uv add git+https://github.com/ptbrowne/csv-to-map.gitPoint csv-to-map at any CSV with Latitude and Longitude columns:
name,Latitude,Longitude
Reykjavík,64.1466,-21.9426
Akureyri,65.6835,-18.1105csv-to-map render sites.csv
# → sites.pngNo token needed — uses OpenStreetMap by default.
csv-to-map render sites.csv --style Esri.WorldImagery
csv-to-map render sites.csv --style OpenStreetMap.MapnikUse dot notation to pick any contextily provider. Mapbox styles use the same notation with a free Mapbox token:
export MAPBOX_TOKEN=pk.eyJ1...
csv-to-map render sites.csv --style Mapbox.outdoors-v12
csv-to-map render sites.csv --style Mapbox.satellite-streets-v12By default the map zooms to fit your data. To control the extent:
- Draw a rectangle at geojson.io and export it as GeoJSON
- Pass it with
--bbox:
csv-to-map render sites.csv --bbox my-area.jsonFor full control (labels, colors, lat/lon column names) use a config file. Copy the working example to get started:
csv-to-map init
csv-to-map render example/sites.csvThen edit example/config.json. The full reference is in config.schema.json — copy it locally with csv-to-map schema for IDE autocompletion.