CSV Points Map
Operator: Abdulla Al Fahad. How tools are built and checked
A list of stores, customers or sensors with a latitude and a longitude on every row is a map waiting to be drawn, but the usual routes are a subscription mapping service or a desktop GIS. This page plots up to 200,000 such rows on a world map in your browser, and the basemap is a land outline that ships with the site, so nothing needs a map server.
Points can be coloured by a text or number column, sized by a number column, grouped into clusters when they crowd each other, or shown as a heatmap. Clicking a marker opens a popup with the columns you ticked.
The result leaves as a PNG, an SVG of the current view, or one HTML file that contains the points, the land outline and a small script, so it opens from an email attachment or a shared drive with no network access.
Key features
- Latitude and longitude read strictly: values outside -90 to 90 and -180 to 180, non-numbers and 0, 0 are skipped and counted, and a note appears when the columns look swapped
- Colour by a text column (the ten most common values, plus Other) or by a number column in five quantile classes
- Marker size by a number column, scaled by the square root so area follows the value
- Clusters in 44-pixel squares that split as you zoom, or a heatmap with a radius from 8 to 80 pixels
- Popups with up to 8 columns, drag to pan, scroll or buttons to zoom, and a Fit button
- PNG at 400 to 4,000 pixels wide, SVG of the current view, and a self-contained interactive HTML file
Coordinates, projection and what the exported HTML contains
The table needs two numeric columns. Decimal degrees are expected, with a dot or a single comma as the decimal mark; degrees-minutes-seconds text is not read. Any other columns can be used for colour, size and popups, and the page picks columns named lat, latitude, lon, lng or long by default. Rows beyond 200,000 are refused.
How it works
Coordinates are projected with Web Mercator, the projection used by most web maps: longitude maps linearly to the horizontal axis and latitude is stretched towards the poles, which is clamped at 85.05 degrees. Zoom doubles the world width at each step, starting from 256 pixels at zoom 0, and the opening view is fitted to the bounding box of your points.
Land comes from the Natural Earth 1:110 million land outline in the world-atlas package, a file of about 55 KB served from this site. Clusters group the points that fall into the same 44-pixel square and are drawn at their average position; a single point inside a square is drawn as itself.
Common use cases
- A retail analyst plots 2,300 store locations coloured by region and sends the HTML file to a regional manager who has no mapping account.
- A researcher checks that 450 sample sites really sit where the field notes say, by plotting them and seeing two points land in the sea.
- An events team draws a heatmap of 18,000 ticket-buyer postcodes that were already converted to coordinates elsewhere.
How to use this tool
- Drop the table, paste it, or load the simulated store list.
- Check the latitude and longitude columns, then pick colour, size and popup columns.
- Switch between points and heatmap, and pan and zoom; download a PNG, SVG or HTML map.
Example
First row of the 120-store simulated list, with the settings it loads
store,city,region,lat,lon,sales
S001,London,Europe,51.7375,0.1191,74120
(119 more rows around London, Berlin, New York, Singapore and Sydney)
Colour by region, size by sales, popups: store, region, salesMap of the whole list
120 points drawn, 0 skipped
Legend: Europe, Asia, North America and Oceania
At the opening zoom in an 800 pixel wide map the points group into 5 clusters; zooming in splits them into single stores
The exported HTML map holds the 120 points, the ticked popup columns and the land outline in one file of about 97 KB with no external referencesTips for best results
- A heatmap shows density, so it hides which point is which; use clusters when the question is about individual places and the heatmap when it is about where there are many.
- Colour by a number column groups values into quintiles, so each colour holds about a fifth of the points; use it to spot outliers, not to read exact values.
- Tick only the popup columns you want to share: the exported HTML contains those columns for every point and no others.
- Check the SVG in a vector editor if you plan to restyle it; markers are circles with one fill per colour class.
Common pitfalls
The page does not geocode. Turning addresses into coordinates means sending them to a third-party service, so the file must already have latitude and longitude columns.
Web Mercator inflates areas far from the equator, so a cluster in Iceland looks much larger than the same cluster in Kenya. Compare density with care at high latitudes.
The land outline is coarse (1:110 million): small islands and detail of coastlines are not shown, and a point on a small island may appear in the sea.
The optional OpenStreetMap tile layer is the only thing that contacts another server. It is off by default, and tiles are not part of any export.
Common errors and how to fix them
- No row has a usable latitude and longitude.
- Check that you picked the right columns and that they hold plain decimal degrees such as 51.5074 and -0.1278, without N, S, E or W letters.
- The table has 340,000 rows; the map handles up to 200,000 points.
- Filter the table to the region or period you need, or aggregate to one row per place first.
- The land outline could not be loaded (HTTP 404).
- The page fetches /worldatlas/land-110m.json from this site once. Reload the page; if the error persists, the site's copy of that file is missing.
Best practices
- Keep a unique ID column and tick it as a popup column, so someone looking at a marker can find the row in the source table.
- Remove rows with placeholder coordinates before sharing; the page skips 0, 0, but values such as 1, 1 are valid points on the map.
What the HTML export contains
The file is plain HTML with one script and no external resources: the land outline is stored as coordinates, each point is stored with its position, colour, radius and the text of the popup columns, and nothing is loaded from the network. The script handles drag, wheel and button zoom, clusters, the heatmap toggle and popups, and it writes popup text with textContent so values from your table cannot inject markup. The file grows with the number of points: the 120-store example comes to about 97 KB, most of it the land outline, and each further point adds its coordinates and the popup text you ticked.
Frequently asked questions
Why does my map show a point in the sea?
Either the coordinates have swapped latitude and longitude, a sign is wrong (a missing minus on a western longitude puts a point in Asia), or the point is on a small island that the coarse 1:110 million outline leaves out.
Can I add street-level detail?
Only through the opt-in OpenStreetMap tile layer in the on-screen map, which makes your browser request tiles from tile.openstreetmap.org. Tiles are not included in the PNG, SVG or HTML exports.
When should I use the choropleth map instead?
A choropleth shades countries or states by a value joined on a name or code. This page draws individual points from coordinates, with clusters, size and a heatmap.