CSV map plotter

A spreadsheet with a latitude and a longitude column becomes a map: every row a point, labelled by the column you choose, coloured by another. Click a point for the whole row.

How to use it

  1. Paste the CSV or drop the file. The first line must hold the column names.
  2. Choose the column for labels and, if you like, a column to colour by.
  3. Click a point on the map for the full row. Click a row in the table to fly to it.
  4. Export as GeoJSON or KML, or PNG for a picture.

5 practical uses

  1. See customers, stores or sites from a spreadsheet on a map.
  2. Check a set of coordinates for errors by looking at them.
  3. Map survey points, sensor locations or samples.
  4. Colour points by type, status or region.
  5. Turn a spreadsheet into GeoJSON or KML for another tool.

The maths behind it

The CSV is parsed with a small state machine that handles quotes, commas, semicolons and tabs. The latitude and longitude columns are found by name, each row becomes a GeoJSON point, and the map engine projects the points to Web Mercator. Colours by category assign one of ten colours to each distinct value in order of first appearance.

Notes

Commas, semicolons and tabs all work as separators, so a paste from a spreadsheet is fine. Rows without valid coordinates are skipped and counted. Colouring by a column with many different values gives many colours; it works best for a handful of categories. Nothing is uploaded: the file is read in the browser.

To make the coordinates first, see address to coordinates (batch mode).

Questions and answers

Which column names are recognised for coordinates?

lat, latitude or y for the latitude; lng, lon, long, longitude or x for the longitude. Case does not matter.

Is my file uploaded?

No. The file is read in your browser and never leaves it.

How many rows can it plot?

Thousands. The table lists the first 500; the map shows them all.

Embed this tool on your website

Paste this code where the tool should appear. It shows the tool alone, without this page's text, and links back here. It is free to use; the map data credit stays on the map.

<iframe src="https://waymorphic.com/tools/csv-map-plotter?embed=1" width="100%" height="760" style="border:0;border-radius:12px;max-width:100%" loading="lazy" allow="geolocation; fullscreen; clipboard-write" title="CSV map plotter – Waymorphic Map"></iframe>

Change height to suit your page. To open the tool with a place already set, add the settings from this page's address bar (the part after #) to the end of the src. The embedded tool asks the visitor's browser for their location only when they press the button, and the allow attribute lets that work inside the frame.